Create and manage Sub-Accounts using the API.
Note: Sub-Accounts will be enrolled in DynID using the same username (email address) and password that is specified by the Master Account. Once an account is enrolled with a DynID, you cannot use the API to change username and password for web access.
REST Methods
Note: API is case sensitive. Make all parameters entries lower case. All parameters in red
are required.
Note: Write actions (POST, UPDATE, DELETE) may take several minutes to propagate and be reflected by the API. If a subsequent read request fails to reflect your changes, please wait a few minutes and try again.
VERB | RESOURCE | PARAMETERS | DESCRIPTION |
GET | /accounts |
|
Retrieves a list of up to 25 Email Sub-Accounts. |
GET | /accounts/xheaders |
|
Retrieve list of x-headers. |
POST | /accounts |
|
Creates or updates an Email Sub-Account. |
POST | /accounts/xheaders |
|
Updates custom x-header field values available for use with the specified account. |
POST | /accounts/delete |
|
Deletes a Sub-Account. |
GET /accountsRetrieves a list of up to 25 Email Sub-Accounts. Parameters
Example cURL Request: curl --request GET "https://emailapi.dynect.net/rest/json/accounts?apikey=ABC123XYZ"
Example Results (JSON) {"response":{"status":200,"message":"OK","data":{"accounts":[{"username":"test_username1","apikey":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},{"username":"test_username2","apikey":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}…]}} GET /accounts/xheadersRetrieves a list of the configured custom x-header field names associated with the account. All four (4) custom x-headers are returned, even if not set with a field name. Parameters
Example cURL Request: curl --request GET "https://emailapi.dynect.net/rest/json/accounts/xheaders?apikey=ABC123XYZ" Example Results (JSON) {"response":{"status":200,"message":"OK"}} POST /accountsCreates or updates an Email Sub-Account Parameters
Example cURL Request: curl --request POST "https://emailapi.dynect.net/rest/json/accounts" --data "apikey=ABC123XYZ&username=example@example.com&password=t3q5b5f3j6o4t3l4d3&accountname=MyCustomerAccount" Example Results (JSON) {"response":{"status":200,"message":"OK","data":{"apikey":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}}} POST /accounts/xheadersUpdates custom x-header field names available for use with the specified account. Parameters
There are four x-header fields (xheader1, xheader2, xheader3, and xheader4). Each custom x-header field name must begin with X-, and it can contain any combination of letters, numbers, dashes or underscores. For instance, X-CampaignID or X-Subscriber_ID. NOTE: You do not have to specify each of the four x-headers when using this method, but it is highly recommended, so you know which x-header fields are specified. Keep in mind that any blank xheader# fields will delete whatever x-header is currently set to that slot.
Example cURL Request: curl --request POST "https://emailapi.dynect.net/rest/json/accounts" --data "apikey=ABC123XYZ&xheader1=X-Address" Example Results (JSON) {"response":{"status":200,"message":"OK","data":"OK"}} POST /accounts/deleteDeletes an Email Sub-Account. Parameters
Example cURL Request curl --request POST "https://emailapi.dynect.net/rest/json/accounts/delete" --data "apikey=ABC123XYZ&username=example@example.com" Example Results (JSON) {"response":{"status":200,"message":"OK","data":[]}} |