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
  • apikey
  • startindex
  • accountname
Retrieves a list of up to 25 Email Sub-Accounts.
GET /accounts/xheaders
  • apikey
Retrieve list of x-headers.
POST /accounts
  • apikey
  • username
  • password
  • accountname
  • companyname
  • phone
  • address
  • city
    (Field deprecated)
  • state
    (Field deprecated)
  • zipcode
    (Field deprecated)
  • country
    (Field deprecated)
  • timezone
    (Field deprecated)
  • bounce_url
  • spam_url
  • unsub_url
  • bounce_url_active
  • spam_url_active
  • unsub_url_active
  • trackopens
  • tracklinks
  • trackunsubscribes
  • generatenewapikey
Creates or updates an Email Sub-Account.
POST /accounts/xheaders
  • apikey
Updates custom x-header field values available for use with the specified account.
POST /accounts/delete
  • apikey
  • username
Deletes a Sub-Account.

 


GET /accounts

Retrieves a list of up to 25 Email Sub-Accounts.

Parameters

  • apikeyRequired. API key of the master account (Only the master account can have sub-accounts).
  • startindex — An integer to indicate the starting index of where to begin the list of sub-accounts. Defaults to 0, returning the first 25 sub-accounts. For accounts with a large number of sub-accounts, run the method multiple times, incrementing the start index by 25 for each iteration.
  • accountname – Returns a specified sub-account instead of a list of sub-accounts. A sub-account’s name is its email address.

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/xheaders

Retrieves 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

  • apikeyRequired. API key of the account with the desired information.

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 /accounts

Creates or updates an Email Sub-Account

Parameters

  • apikeyRequired. API key of the master account (Only the master account can create sub-accounts)
  • usernameRequired. Account username to be created — must be a valid email address, and must be unique amount all other sub-accounts.
  • passwordRequired. Account password to be assigned. May be passed as clear text.
  • accountnameRequired. A unique string-based name for the account.
  • companyname — Name of the company that the account is associated with.
  • phone — Phone number for the account.
  • address — Address
  • city(Field deprecated) City
  • state(Field deprecated) State
  • zipcode(Field deprecated) Zip
  • country(Field deprecated) Two-letter English abbreviation, based on the ISO 3166 standard
  • timezone(Field deprecated) The timezone of the account, in [+/-]h.mm format.Valid values and Examples:Eastern Time (USA/Canada): -5.00
    China/Hong Kong/Singapore: +8.00
  • bounce_url — Bounce Postback URL
  • spam_url — Spam (Complaint) Postback URL.
  • unsub_url – Unsubscribe Postback URL.
  • bounce_url_active – Enable or disable the Bounce Postback URL. Valid values: 1 (enable) or 0 (disable). The Bounce Postback URL must also be specified when toggling bounce_url_active.
  • spam_url_active – Enable or disable the Spam (Complaint) Postback URL. Valid values: 1 (enable) or 0 (disable). The Spam (Complaint) Postback URL must also be specified when toggling spam_url_active.
  • unsub_url_active – Enable or disable the Unsubscribe Postback URL. Valid values: 1 (enable) or 0 (disable). The Unsubscribe Postback URL must also be specified when toggling unsub_url_active.
  • trackopens — Toggle open tracking (1 or 0)
  • tracklinks — Toggle click tracking (1 or 0)
  • trackunsubscribes — Toggle automatic list-unsubscribe support (1 or 0)
  • generatenewapikey — Used to create a new API key for an existing account (1 or 0)

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/xheaders

Updates custom x-header field names available for use with the specified account.

Parameters

  • apikeyRequired. API key of the master account (Only the master account can create sub-accounts)
  • xheader(1, 2, 3, or 4)Required. Name of the indicated X-Header field. The POST method requires at least one X-header field be defined.

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/delete

Deletes an Email Sub-Account.

Parameters

  • apikeyRequired. API key of the master account (Only the master account can create sub-accounts)
  • usernameRequired. Account username to be updated — must be a valid email address, and must be unique amount all other sub-accounts.

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":[]}}