Sending Domains API
- Table of Contents
- Overview
- Attributes
- Get a List of Sending Domains
- Get a Single Sending Domain
- Create a Sending Domain
- Update a Sending Domain
- Delete a Sending Domain
This feature is only available on GreenArrow CloudMTA.
Overview
Sending Domains tie your RFC5322.From domain to a complete, automatically managed DNS configuration for DKIM signing and click/open/bounce tracking. See Sending Domains for a full conceptual overview.
Attributes
The following are the configurable attributes defined for Sending Domains.
|
sending_domain
hash /required
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get a List of Sending Domains
GET /ga/api/v3/eng/sending_domains
To keep the list response lightweight, the dns_records and unwanted_dns_records arrays are not included here — fetch a single domain (below) to retrieve them.
Parameters
The following parameters are valid for the above endpoint.
|
page
integer /optional |
The page number from which to retrieve. Page numbering starts at |
|
page_token
string /optional |
The |
|
domain
string /optional |
Filter by domain name. This performs a case-insensitive substring match, so |
|
dns_state
string /optional |
Filter by DNS verification state. One of |
|
sending_enabled
boolean /optional |
Filter by whether sending is enabled — |
Response
The response will contain a list of Sending Domains in the following format.
|
sending_domains
array of hashes |
Each hash contains all of the attributes listed in the Attributes section. |
||||||||||
|
pagination
hash
|
|||||||||||
Example
GET /ga/api/v3/eng/sending_domains
HTTP/1.1 200 OK
{
"sending_domains": [
{
"id": 1,
"domain": "example.com",
"tracking_subdomain": "trk",
"track_open": true,
"track_click": true,
"dkim_mode": "automatic",
"dkim_selector1": "ga1",
"dkim_selector2": "ga2",
"dkim_key_length": 1024,
"sending_enabled": true,
"dns_verified": true,
"dns_regression": false,
"shared_tracking_domain": null,
"route": null
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 1,
"next_page_token": null
}
}
Get a Single Sending Domain
GET /ga/api/v3/eng/sending_domains/{id}
The {id} may be either the numeric ID or the domain name (case-insensitive).
Example
GET /ga/api/v3/eng/sending_domains/1
GET /ga/api/v3/eng/sending_domains/example.com
HTTP/1.1 200 OK
{
"sending_domain": {
"id": 1,
"domain": "example.com",
"tracking_subdomain": "trk",
"track_open": true,
"track_click": true,
"dkim_mode": "automatic",
"dkim_selector1": "ga1",
"dkim_selector2": "ga2",
"dkim_key_length": 1024,
"sending_enabled": true,
"dns_verified": true,
"dns_regression": false,
"shared_tracking_domain": null,
"route": null,
"dns_records": [
{
"bind": "trk.example.com. IN CNAME trk.abc123def456.dnsforemail.com.",
"type": "CNAME",
"name": "trk.example.com",
"value": "trk.abc123def456.dnsforemail.com"
},
{
"bind": "ga1._domainkey.example.com. IN CNAME ga1.abc123def456.dnsforemail.com.",
"type": "CNAME",
"name": "ga1._domainkey.example.com",
"value": "ga1.abc123def456.dnsforemail.com"
},
{
"bind": "ga2._domainkey.example.com. IN CNAME ga2.abc123def456.dnsforemail.com.",
"type": "CNAME",
"name": "ga2._domainkey.example.com",
"value": "ga2.abc123def456.dnsforemail.com"
}
],
"unwanted_dns_records": []
}
}
Create a Sending Domain
POST /ga/api/v3/eng/sending_domains
Parameters
See the Attributes section for valid parameters.
Example
POST /ga/api/v3/eng/sending_domains
{
"sending_domain": {
"domain": "example.com"
}
}
HTTP/1.1 200 OK
{
"sending_domain": {
"id": 1,
"domain": "example.com",
"tracking_subdomain": "trk",
"track_open": true,
"track_click": true,
"dkim_mode": "automatic",
"dkim_selector1": "ga1",
"dkim_selector2": "ga2",
"dkim_key_length": 1024,
"sending_enabled": true,
"dns_verified": false,
"dns_regression": false,
"shared_tracking_domain": null,
"route": null,
"dns_records": [
{
"bind": "trk.example.com. IN CNAME trk.abc123def456.dnsforemail.com.",
"type": "CNAME",
"name": "trk.example.com",
"value": "trk.abc123def456.dnsforemail.com"
},
{
"bind": "ga1._domainkey.example.com. IN CNAME ga1.abc123def456.dnsforemail.com.",
"type": "CNAME",
"name": "ga1._domainkey.example.com",
"value": "ga1.abc123def456.dnsforemail.com"
},
{
"bind": "ga2._domainkey.example.com. IN CNAME ga2.abc123def456.dnsforemail.com.",
"type": "CNAME",
"name": "ga2._domainkey.example.com",
"value": "ga2.abc123def456.dnsforemail.com"
}
]
}
}
Update a Sending Domain
PUT /ga/api/v3/eng/sending_domains/{id}
The {id} may be either the numeric ID or the domain name (case-insensitive).
Parameters
See the Attributes section for valid parameters. Note that domain, tracking_subdomain, dkim_mode, dkim_selector1, dkim_selector2, and dkim_key_length are immutable after creation and cannot be changed.
Example
PUT /ga/api/v3/eng/sending_domains/1
PUT /ga/api/v3/eng/sending_domains/example.com
{
"sending_domain": {
"route": { "name": "my-route" },
"track_open": false
}
}
HTTP/1.1 200 OK
{
"sending_domain": {
"id": 1,
"domain": "example.com",
"tracking_subdomain": "trk",
"track_open": false,
"track_click": true,
"dkim_mode": "automatic",
"dkim_selector1": "ga1",
"dkim_selector2": "ga2",
"dkim_key_length": 1024,
"sending_enabled": true,
"dns_verified": true,
"dns_regression": false,
"shared_tracking_domain": null,
"route": {
"id": 3,
"name": "my-route"
},
"dns_records": [
{
"bind": "trk.example.com. IN CNAME trk.abc123def456.dnsforemail.com.",
"type": "CNAME",
"name": "trk.example.com",
"value": "trk.abc123def456.dnsforemail.com"
},
{
"bind": "ga1._domainkey.example.com. IN CNAME ga1.abc123def456.dnsforemail.com.",
"type": "CNAME",
"name": "ga1._domainkey.example.com",
"value": "ga1.abc123def456.dnsforemail.com"
},
{
"bind": "ga2._domainkey.example.com. IN CNAME ga2.abc123def456.dnsforemail.com.",
"type": "CNAME",
"name": "ga2._domainkey.example.com",
"value": "ga2.abc123def456.dnsforemail.com"
}
]
}
}
Delete a Sending Domain
DELETE /ga/api/v3/eng/sending_domains/{id}
The {id} may be either the numeric ID or the domain name (case-insensitive).
Example
DELETE /ga/api/v3/eng/sending_domains/1
DELETE /ga/api/v3/eng/sending_domains/example.com
HTTP/1.1 200 OK
{
"success": true
}
