API Documentation  API Documentation

Overview

Getting Started

We provide a fully restful API with direct and powerful access to a vast array of features. Companies, developers and researchers can incorporate our innovative services directly into software and services.

To make a Dynu REST request, follow the three steps below.

Note: You can run the examples listed here directly as-is. However, when creating your own application, be sure to update the OAuth keys in your code with those assigned to your own account.
Support
You may also review the IP update protocol to control the state of dynamic DNS and email services.

1

Obtain OAuth keys


The OAuth keys consists of client_id and secret. The keys uniquely identify your account and you can create, reset or clear the keys in the membership area of the control panel.

Tip: See how the OAuth keys work by running the example in the next step—the example uses a set of dummy keys so you can easily make your first call by pasting the example as-is into a terminal window.

2

Get an Access Token


Make a /token call using your application's OAuth keys for the basic authentication values (the keys are the values of your client_id and secret). In the request body, set grant_type to client_credentials. When you run the command, Dynu generates and returns a new access token.

Tip: If you're using cURL, supply the OAuth values like this: -u {Client-Id}:{Secret}. If you're using the Postman tool, enter the client_id and secret values on the Basic Auth tab using the client_id as the username and the secret as the password. Additionally, on the x-www-form-unlencoded tab, specify a grant_type of client_credentials.

Example access token request

curl -v https://api.dynu.com/v1/oauth2/token \
        -H "Accept: application/json" \
        -H "Accept-Language: en_US" \
        -u "EOJ2S-Z6OoN_le_KS1d75wsZ6y0SFdVsY9183IvxFyZp:EClusMEUk8e9ihI7ZdVLF5cZ6y0SFdVsY9183IvxFyZp" \
        -d "grant_type=client_credentials"

Tip: If you're using Windows, we recommend you make cURL calls using a Bash shell. If you're not using cURL calls, set the content-type to application/x-www-form-urlencoded for this request.

Sample response:

{
        "scope": "https://api.dynu.com/v1/Domain/.* https://api.dynu.com/v1/DNS/.* https://api.dynu.com/v1/Email/.*",
        "access_token": "<Access-Token>",
        ;"token_type": "Bearer",
        "expires_in": 28800
}

Note: The access token is valid for the number of seconds specified in the expires_in response value. You must have a valid access token to make API requests—request a new token when the current one expires.

3

Make an API call


With a valid access token in hand, you're ready to make a request to a REST interface. Below is call to obtain a list of domain names which have DNS service. The simple request uses only the required input fields.

The access token is an OAuth bearer token, and is included in the header of your requests with the following syntax: Authorization: Bearer <Access-Token>.

Important: You must supply a valid access token to complete this request (generate a valid token using the example call above).

Example /dns/domains request

curl -v https://api.dynu.com/v1/domain/domains \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"

If the call is successful, Dynu returns a list of domain names along with their basic details. You can find the same list of domain names in the control panel.

Response

  [
    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "unicode_name": "example.com",
      "token": "domain-token",
      "state": "complete",
      "language":null,
      "lockable": false,
      "auto_renew": true,
      "whois_protected": false,
      "expires_on": "2018-07-20T15:01:13",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    },
    {
      "id": 2,
      "user_id": 11,
      "name": "example.org",
      "unicode_name": "example.org",
      "token": "domain-token",
      "state": "complete",
      "language":null,
      "lockable":false,
      "auto_renew": true,
      "whois_protected": false,
      "expires_on": "2016-08-05T23:09:12",
      "created_at": "2015-08-05T23:09:12",
      "updated_at": "2015-09-10T13:05:38"
    }
  ]

Domain Registration


Domains


1

Get a domain


GET /domain/get/:domain
Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Get the domain with ID 1.

curl -v https://api.dynu.com/v1/domain/get/1 \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Get the domain example.com.

curl -v https://api.dynu.com/v1/domain/get/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "unicode_name": "example.com",
      "token": "domain-token",
      "state": "complete",
      "language":null,
      "lockable": false,
      "auto_renew": true,
      "whois_protected": false,
      "expires_on": "2018-07-20T15:01:13",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }
2

List domains


List all domains.

GET /domain/domains
Example

curl -v https://api.dynu.com/v1/domain/domains \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful.

  [
    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "unicode_name": "example.com",
      "token": "domain-token",
      "state": "complete",
      "language":null,
      "lockable": false,
      "auto_renew": true,
      "whois_protected": false,
      "expires_on": "2018-07-20T15:01:13",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    },
    {
      "id": 2,
      "user_id": 11,
      "name": "example.org",
      "unicode_name": "example.org",
      "token": "domain-token",
      "state": "complete",
      "language":null,
      "lockable":false,
      "auto_renew": true,
      "whois_protected": false,
      "expires_on": "2016-08-05T23:09:12",
      "created_at": "2015-08-05T23:09:12",
      "updated_at": "2015-09-10T13:05:38"
    }
  ]
3

Cancel a domain


Cancel the given domain from your account.

DELETE /domain/cancel/:domain
Please note that for domains which are registered with Dynu for over 5 days this will not cancel the domain registration.

Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Cancel the domain with ID 1.

curl -v https://api.dynu.com/v1/domain/cancel/1 \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Cancel the domain example.com.

curl -v https://api.dynu.com/v1/domain/cancel/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful with the state being 'Cancelled'.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "unicode_name": "example.com",
      "token": "domain-token",
      "state": "Cancelled",
      "language":null,
      "lockable": false,
      "auto_renew": true,
      "whois_protected": false,
      "expires_on": "2018-07-20T15:01:13",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }

Auto-Renewal


1

Enable auto-renewal for a domain name


Get /domain/autorenewal_enable/:domain
Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Enable auto-renewal for the domain example.com:

curl -v https://api.dynu.com/v1/domain/autorenewal_enable/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "unicode_name": "example.com",
      "token": "domain-token",
      "state": "Complete",
      "language":null,
      "lockable": false,
      "auto_renew": true,
      "whois_protected": false,
      "expires_on": "2018-07-20T15:01:13",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }
2

Disable auto-renewal for a domain name


Get /domain/autorenewal_disable/:domain
Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Disable auto-renewal for the domain example.com:

curl -v https://api.dynu.com/v1/domain/autorenewal_disable/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "unicode_name": "example.com",
      "token": "domain-token",
      "state": "Complete",
      "language":null,
      "lockable": false,
      "auto_renew": false,
      "whois_protected": false,
      "expires_on": "2018-07-20T15:01:13",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }

Lock/Unlock


1

Lock/Unlock a domain name


Get /domains/lock/:domain
Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Lock the domain name example.com:

curl -v https://api.dynu.com/v1/domain/lock/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "unicode_name": "example.com",
      "token": "domain-token",
      "state": "Complete",
      "language":null,
      "lockable": true,
      "auto_renew": true,
      "whois_protected": false,
      "expires_on": "2018-07-20T15:01:13",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }
2

Unlock a domain name


Get /domain/unlock/:domain
Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Unlock the domain example.com:

curl -v https://api.dynu.com/v1/domain/unlock/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "unicode_name": "example.com",
      "token": "domain-token",
      "state": "Complete",
      "language":null,
      "lockable": false,
      "auto_renew": false,
      "whois_protected": false,
      "expires_on": "2018-07-20T15:01:13",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }

Name Servers


1

Get name servers for a domain name


Get /domain/name_servers/:domain

Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Get name servers for the domain example.com:

curl -v https://api.dynu.com/v1/domain/name_servers/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the name servers.

  {
    "name servers": [
      "NS1.DYNU.COM",
      "NS2.DYNU.COM",
      "NS3.DYNU.COM",
      "NS4.DYNU.COM",
      "NS5.DYNU.COM"
    ]
  }
2

Add name servers for a domain name


POST /domain/name_server_add/:domain

Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Add name servers for the domain example.com:

curl -v https://api.dynu.com/v1/domain/name_server_add/example.com \
        -d "{\"name_servers\": [\"ns6.dynu.com\",\"ns7.dynu.com\"]}" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the name servers.

  {
    "name servers": [
      "NS1.DYNU.COM",
      "NS2.DYNU.COM",
      "NS3.DYNU.COM",
      "NS4.DYNU.COM",
      "NS5.DYNU.COM"
      "NS6.DYNU.COM"
      "NS7.DYNU.COM"
    ]
  }
3

Delete name servers for a domain name


POST /domain/name_server_remove/:domain

Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Remove name servers for the domain example.com:

curl -v https://api.dynu.com/v1/domain/name_server_remove/example.com \
        -d "{\"name_servers\": [\"ns6.dynu.com\",\"ns7.dynu.com\"]}" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the name servers.

  {
    "name servers": [
      "NS1.DYNU.COM",
      "NS2.DYNU.COM",
      "NS3.DYNU.COM",
      "NS4.DYNU.COM",
      "NS5.DYNU.COM"
    ]
  }
4

Make a name server primary for a domain name


POST /domain/name_server_primary/:domain

Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Make NS3.DYNU.COM the primary name server for the domain example.com:

curl -v https://api.dynu.com/v1/domain/name_server_primary/example.com \
        -d "{\"name_servers\": \"ns3.dynu.com\"}" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the name servers with the primary name server in the beginning.

  {
    "name servers": [
      "NS3.DYNU.COM",
      "NS1.DYNU.COM",
      "NS2.DYNU.COM",
      "NS4.DYNU.COM",
      "NS5.DYNU.COM"
    ]
  }

DNS


Domains


1

Get a domain


GET /dns/get/:domain
Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Get the domain with ID 1.

curl -v https://api.dynu.com/v1/dns/get/1 \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Get the domain example.com.

curl -v https://api.dynu.com/v1/dns/get/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "token": "domain-token",
      "state": "complete",
      "ipv4_address":"174.23.124.56",
      "ipv6_address": "2001:cdba::3257:9652",
      "wildcard_alias": false,
      "ttl": 1800,
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }
2

List domains


GET /dns/domains
Example

curl -v https://api.dynu.com/v1/dns/domains \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns a list of domain names.

  [
    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "token": "domain-token",
      "state": "complete",
      "ipv4_address":"174.23.124.56",
      "ipv6_address": "fe80:0000:0000:0000:0202:b3ff:fe1e:8329",
      "wildcard_alias": false,
      "ttl": 1800,
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    },
    {
      "id": 2,
      "user_id": 11,
      "name": "example.org",
      "token": "domain-token",
      "state": "complete",
      "ipv4_address":"216.83.154.36",
      "ipv6_address": "2001:0db8:0000:0000:0240:63ff:feca:9a21",
      "wildcard_alias": false,
      "ttl": 1800,
      "created_at": "2015-08-18T05:01:13",
      "updated_at": "2015-11-10T19:03:15"
    },
    {
      "id": 3,
      "user_id": 11,
      "name": "example.net",
      "token": "domain-token",
      "state": "complete",
      "ipv4_address":"184.101.179.7",
      "ipv6_address": "2602:00ae:1a06:ce00:9d0e:3e91:89eb:d59f",
      "wildcard_alias": false,
      "ttl": 1800,
      "created_at": "2015-09-10T15:10:56",
      "updated_at": "2015-09-22T13:03:26"
    }
  ]
3

Delete a domain


Delete the given domain from your account.

DELETE /dns/delete/:domain

Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Delete the domain with ID 1.

curl -v https://api.dynu.com/v1/dns/delete/1 \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Delete the domain example.com.

curl -v https://api.dynu.com/v1/dns/delete/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful.

4

Add DNS for a domain


POST /dns/add/:domain
Example

Add DNS for domain name example.com with IP address 192.168.0.8 and IPv6 address 2001:cdba::3257:9652.

curl -v -X POST https://api.dynu.com/v1/dns/add \
        -d "{\"name\": \"example.com\", \"ipv4_address\":\"192.168.0.8\", \"ipv6_address\":\"2001:cdba::3257:9652\"}" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "token": "domain-token",
      "state": "complete",
      "ipv4_address":"192.168.0.8",
      "ipv6_address": "2001:cdba::3257:9652",
      "wildcard_alias": false,
      "ttl": "1800",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }

Wildcard Alias


1

Enable wildcard alias


GET /dns/enablewildcard/:domain
Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Enable wildcard alias for example.com.

curl -v https://api.dynu.com/v1/dns/enablewildcard/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "token": "domain-token",
      "state": "complete",
      "ipv4_address":"174.23.124.56",
      "ipv6_address": "2001:cdba::3257:9652",
      "wildcard_alias": true,
      "ttl": 1800,
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }
2

Disable wildcard alias


GET /dns/disablewildcard/:domain
Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Disable wildcard alias for example.com.

curl -v https://api.dynu.com/v1/dns/disablewildcard/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "token": "domain-token",
      "state": "complete",
      "ipv4_address":"174.23.124.56",
      "ipv6_address": "2001:cdba::3257:9652",
      "wildcard_alias": false,
      "ttl": 1800,
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }

IPv6 Address


1

Enable IPv6 address


GET /dns/enableipv6/:domain
Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Enable IPv6 address for example.com.

curl -v https://api.dynu.com/v1/dns/enableipv6/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "token": "domain-token",
      "state": "complete",
      "ipv4_address":"174.23.124.56",
      "ipv6_address": "2001:cdba::3257:9652",
      "wildcard_alias": true,
      "ttl": 1800,
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }
2

Disable IPv6 address


GET /dns/disableipv6/:domain
Parameters
Name Type Description
:domain string, integer The domain name or id
Example

Disable IPv6 address for example.com.

curl -v https://api.dynu.com/v1/dns/disableipv6/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the domain.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "token": "domain-token",
      "state": "complete",
      "ipv4_address":"174.23.124.56",
      "ipv6_address": "",
      "wildcard_alias": false,
      "ttl": 1800,
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }

Email Service


Domains


1

List a list of domains


GET /email/domains
Example

curl -v https://api.dynu.com/v1/email/domains \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns a list of domain names with email service properties.

  [
    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "token": "domain-token",
      "state": "Complete",
      "type": "FullServiceEmail",
      "auto_renewal": true,
      "anti_spam": false,
      "etrn_host": null,
      "etrn_port": 0,
      "etrn_connection_security": null,
      "etrn_retry_in terval": 0,
      "catch_all_address":"yexiaos@hotmail.com",
      "plus_addressing": false,
      "plus_addressing_character": "+",
      "expires_on": "2016-07-28T14:57:08",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    },
    {
      "id": 2,
      "user_id": 11,
      "name": "example1.com",
      "token": "domain-token",
      "state": "Complete",
      "type": "SMTPOutboundRelay",
      "auto_renewal": true,
      "anti_spam": false,
      "etrn_host": null,
      "etrn_port": 0,
      "etrn_connection_security": null,
      "etrn_retry_in terval": 0,
      "plus_addressing": false,
      "plus_addressing_character": null,
      "expires_on": "2017-01-23T18:24:41",
      "created_at": "2016-01-23T18:01:27",
      "updated_at": "2016-01-2 3T18:01:27"
    },
    {
      "id": 3,
      "user_id": 11,
      "name": "example2.com",
      "token": "domain-token",
      "state": "Complete",
      "type": "EmailStoreForward",
      "auto_renewal": true,
      "anti_spam": false,
      "etrn_host": "mail.example2.com",
      "etrn_port": 26,
      "etrn_connection_security": "SSLTLS",
      "etrn_retry_in terval": 10,
      "plus_addressing": false,
      "plus_addressing_character": null,
      "expires_on": "2017-11-29T13:24:35",
      "created_at": "2015-11-29T13:19:52",
      "updated_at": "2016-01-09T0 3:49:20"
    },
    {
      "id": 4,
      "user_id": 11,
      "name": "example3.com",
      "token": "domain-token",
      "state": "Complete",
      "type": "EmailBackup",
      "auto_renewal": true,
      "anti_spam": false,
      "etrn_host": "mail.example3.com",
      "etrn_port": 2525,
      "etrn_connection_security": "None",
      "etrn_retry_in terval": 20,
      "plus_addressing": false,
      "plus_addressing_character": null,
      "expires_on": "2017-11-29T13:21:44",
      "created_at": "2015-11-29T13:21:35",
      "updated_at": "2015-12-23T13:47:27"
    },
    {
      "id": 5,
      "user_id": 11,
      "name": "example4.com",
      "token": "domain-token",
      "state": "Complete",
      "type": "EmailForward",
      "auto_renewal": true,
      "anti_spam": true,
      "etrn_host": null,
      "etrn_port": 0,
      "etrn_connection_security": null,
      "etrn_retry_in terval": 0,
      "plus_addressing": false,
      "plus_addressing_character": null,
      "expires_on": "2016-07-28T14:57:36",
      "created_at": "2015-11-29T14:57:36",
      "updated_at": "2015-12-23T14:26:39"
    },
  ]
2

Get a domain


Get a domain name with email service properties

Get /email/get/:domain

Parameters
Name Type Description
:domain string, integer The domain name
Example

Get the domain example.com.

curl -v https://api.dynu.com/v1/email/get/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful.returns the domain name with email service properties.

    {
      "id": 1,
      "user_id": 11,
      "name": "example.com",
      "token": "domain-token",
      "state": "Complete",
      "type": "FullServiceEmail",
      "auto_renewal": true,
      "anti_spam": false,
      "etrn_host": null,
      "etrn_port": 0,
      "etrn_connection_security": null,
      "etrn_retry_in terval": 0,
      "catch_all_address":"yexiaos@hotmail.com",
      "plus_addressing": false,
      "plus_addressing_character": "+",
      "expires_on": "2016-07-28T14:57:08",
      "created_at": "2015-07-28T15:01:13",
      "updated_at": "2015-09-10T13:03:15"
    }


Accounts


1

Add an email account


POST /email/email_account_add/:domain/:account
Parameters
Name Type Description
:account string, integer The email address
Add the email account admin@example.com.

curl -v -X POST https://api.dynu.com/v1/email/email_account_add/example.com \
        -d "{\"email_address\": [\"admin@example.com\",\"password\": \"somepassword\",\"state\": \"active\",\"use_forwarding\": \"true\", \"keep_original_messsage\": \"true\",\"forward_address\": \"thomas@gmail.com\" ]}" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful. Return the email account.

    {
      "id": 34,
      "domain_id": 277,
      "email_address": "admin@example.com",
      "password":null,
      "state": "Active",
      "use_forwarding":true,
      "keep_original_messsage": true,
      "forward_address": "thomas@gmail.com",
    }
}
2

Get an email account


GET /email/get/:account
Parameters
Name Type Description
:account string, integer The email address
Get the email account admin@example.com.

curl -v https://api.dynu.com/v1/email/get/admin@example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful. Returns the email account.

    {
      "id": 34,
      "domain_id": 277,
      "email_address": "admin@example.com",
      "password":null,
      "state": "Active",
      "use_forwarding":true,
      "keep_original_messsage": true,
      "forward_address": "thomas@gmail.com",
    }
3

List email accounts


GET /email/email_accounts/:domain
Example

curl -v https://api.dynu.com/v1/email/email_accounts/example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns a list of email accounts.

  [
    {
      "id": 34,
      "domain_id": 277,
      "email_address": "admin@example.com",
      "password":null,
      "state": "Active",
      "use_forwarding":true,
      "keep_original_messsage": true,
      "forward_address": "thomas@gmail.com",
    },
    {
      "id": 35,
      "domain_id": 277,
      "email_address": "tom@example.com",
      "password":null,
      "state": "Inactive",
      "use_forwarding":true,
      "keep_original_messsage": true,
      "forward_address": "tom@yahoo.com",
    },
    {
      "id": 36,
      "domain_id": 277,
      "email_address": "amanda@example.com",
      "password":null,
      "state": "Active",
      "use_forwarding":false,
      "keep_original_messsage": false,
      "forward_address": null,
    }
  ]
4

Remove an email account


Get /email/email_account_remove/:account
Parameters
Name Type Description
:account string, integer The email address
Example

Remove the email account admin@example.com.

curl -v https://api.dynu.com/v1/email/email_account_remove/admin@example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful. Returns the rest of email accounts for that domain name.

  [
    {
      "id": 35,
      "domain_id": 277,
      "email_address": "tom@example.com",
      "password":null,
      "state": "Inactive",
      "use_forwarding":true,
      "keep_original_messsage": true,
      "forward_address": "tom@yahoo.com",
    } ,
    {
      "id": 36,
      "domain_id": 277,
      "email_address": "amanda@example.com",
      "password":null,
      "state": "Active",
      "use_forwarding":false,
      "keep_original_messsage": false,
      "forward_address": null,
    }
  ]

5

Enable an email account


GET /email_account_enable/:account
Example

Enable email account amanda@example.com

curl -v https://api.dynu.com/v1/email/email_account_enable/amanda@example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the email account.

    {
      "id": 36,
      "domain_id": 277,
      "email_address": "amanda@example.com",
      "password":null,
      "state": "Active",
      "use_forwarding":false,
      "keep_original_messsage": false,
      "forward_address": null,
    }
6

Disable an email account


GET /email_account_disable/:account
Example

Disable email account amanda@example.com

curl -v https://api.dynu.com/v1/email/email_account_disable/amanda@example.com \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <token>"
Response

Responds with HTTP/1.1 200 OK if successful, returns the email account.

    {
      "id": 36,
      "domain_id": 277,
      "email_address": "amanda@example.com",
      "password":null,
      "state": "Inactive",
      "use_forwarding":false,
      "keep_original_messsage": false,
      "forward_address": null,
    }