1. Home
  2. Voting Board SDK
  3. API for Opted-Out Voters (Unsubscribed)

API for Opted-Out Voters (Unsubscribed)

It helps control the sync users who opted out unsubscribed from your voting boards with your mail email platform to avoid SPAM penalties.

Therefore, voting board admins must synchronize this information with their main mailing platform to ensure everything appears seamless from the end user’s perspective.

First make authorization. Read here.

Boards

List of Boards

Request GET boards

Example of a request:

curl --location --request GET 'https://ducalis.io/api/boards?token=YOUR_TOKEN_HERE'

Example of a response:

[
    {
        "id": 1111,
        "public_id": "c8cd3568bbd06257d3c419084e0fc948",
        "public_alias": "roadmap",
        "name": "Roadmap",
        "description": "Description1"
    },
    {
        "id": 2222,
        "public_id": "a86c8bdd704525c5a6210f596d098894",
        "public_alias": "routine",
        "name": "Routine",
        "description": "Description2"
    }
]

Import/Export Unsubscriptions

List of Users who Unsubscribed

Request GET boards/BOARD_ID/voting-users/unsubscribes.

BOARD_ID – ID from List of Boards

Request example:

curl --location --request GET 'https://ducalis.io/api/boards/BOARD_ID/voting-users/unsubscribes?token=YOUR_TOKEN_HERE'

Example of response:

{
    "items": [
        {
            "id": 25498,            
            "email": "test1@ducalis.io",
            "name": "test1",
            "all_unsubscribed_at": "2022-12-14 08:21:32"
        },
        {
            "id": 25498,            
            "email": "test2@ducalis.io",
            "name": "test2",           
            "all_unsubscribed_at": "2021-01-12 03:11:00"
        },
}
FieldDescription
idUser ID
emailUser Email
nameUser Name
all_unsubscribed_atWhen user unsubscribed

Adding users unsubscriptions

Request – POST boards/BOARD_ID/voting-users/unsubscribes/add

BOARD_ID – ID from List of Boards

In the body of the request, send a json with a list of emails to be unsubscribed (maximum 50 emails per request). For example:

[
   "test1@ducalis.io",
   "test1@ducalis.io"
]

Request example:

curl --location --request POST 'https://ducalis.io/api/boards/BOARD_ID/voting-users/unsubscribes/add?token=YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data-raw '[
   "test1@ducalis.io",
   "test1@ducalis.io"
]'

The response from the server will be empty.

Deleting users unsubscriptions

Request – POST boards/BOARD_ID/voting-users/unsubscribes/delete

BOARD_ID – ID from List of Boards

In the request’s body, you need to send a json with the list of emails for unsubscribed users to delete (max 50 emails per request). For example,

[
   "test1@ducalis.io",
   "test1@ducalis.io"
]

Request example:

curl --location --request POST 'https://ducalis.io/api/boards/BOARD_ID/voting-users/unsubscribes/delete?token=YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data-raw '[
   "test1@ducalis.io",
   "test1@ducalis.io"
]'

The response from the server will be empty.

Or you can Import Unsubscribed Users via .csv.

Updated on April 21, 2023

Was this article helpful?

Related Articles

Leave a Comment