Incoming Email Domains API
- Table of Contents
- Overview
- Attributes
- Domains
- Mailboxes
Overview
Incoming Email Domains are domains that GreenArrow Engine receives email at. Addresses at these domains are used for bounce processing, spam complaint processing, email forwarding, local mailbox delivery and SMTP AUTH.
Attributes
Incoming Email Domains
domain
hash /required
|
Alias Domains
domain
hash /required
|
User Mailboxes
mailbox
hash /required
|
Forwarding Mailboxes
mailbox
hash /required
|
Bounce Mailboxes
Bounce Mailboxes are used with the Full Bounce Processor, not the Lite Bounce Processor.
mailbox
hash /required
|
Spam Complaint Mailboxes
Spam Complaint Mailboxes are used with the Full Bounce Processor, not the Lite Bounce Processor.
mailbox
hash /required
|
Domains
Get a List of Domains
GET /ga/api/v3/eng/incoming_email_domains
GET /ga/api/v3/eng/incoming_email_domains/{id}/alias_domains
GET /ga/api/v3/eng/alias_domains
Parameters
The following parameters are valid for any of the above endpoints:
page
integer /optional |
The page number to retrieve. Page numbering starts at |
page_token
string /optional |
The |
domain
string /optional |
Filter the results to just a single domain name (case-insensitive). |
Examples:
GET /ga/api/v3/eng/incoming_email_domains?page={page}
GET /ga/api/v3/eng/incoming_email_domains/{id}/alias_domains?page_token={page_token}
GET /ga/api/v3/eng/alias_domains?domain={domain}
Response
The response will contain a list of Domains in the following format.
domains
array of hashes
|
|||||||||||
pagination
hash
|
Example 1: Get a List of Incoming Email Domains
GET /ga/api/v3/eng/incoming_email_domains
HTTP/1.1 200 OK
{
"success": true,
"data": {
"domains": [
{
"id": 1,
"type": "incoming_email_domain",
"domain": "example-domain.com"
},
{
"id": 2,
"type": "incoming_email_domain",
"domain": "second-domain.com"
},
{
"id": 3,
"type": "incoming_email_domain",
"domain": "example-last-domain.com"
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 3,
"next_page_token": null
}
},
"error_code": null,
"error_messages": null
}
Example 2: Get a List of Alias Domains for a Single Incoming Email Domain
GET /ga/api/v3/eng/incoming_email_domains/1/alias_domains
HTTP/1.1 200 OK
{
"success": true,
"data": {
"domains": [
{
"id": 4,
"type": "alias_domain",
"domain": "alias-1.com"
},
{
"id": 5,
"type": "alias_domain",
"domain": "second-alias.com"
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 2,
"next_page_token": null
}
},
"error_code": null,
"error_messages": null
}
Example 3: Get a List of Alias Domains
GET /ga/api/v3/eng/alias_domains
HTTP/1.1 200 OK
{
"success": true,
"data": {
"domains": [
{
"id": 4,
"type": "alias_domain",
"domain": "alias-1.com"
},
{
"id": 5,
"type": "alias_domain",
"domain": "second-alias.com"
},
{
"id": 6,
"type": "alias_domain",
"domain": "last-alias-domain.com"
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 3,
"next_page_token": null
}
},
"error_code": null,
"error_messages": null
}
Get Details on a Domain
GET /ga/api/v3/eng/incoming_email_domains/{id}
GET /ga/api/v3/eng/alias_domains/{id}
Response
domain
hash |
The attributes for this hash are defined in the Attributes section of this document. |
Example 1: Get an Incoming Email Domain
GET /ga/api/v3/eng/incoming_email_domains/1
HTTP/1.1 200 OK
{
"success": true,
"data": {
"domain": {
"id": 1,
"type": "incoming_email_domain",
"domain": "example-domain.com",
"email_status": "normal"
}
},
"error_code": null,
"error_messages": null
}
Example 2: Get an Alias Domain
GET /ga/api/v3/eng/alias_domains/4
HTTP/1.1 200 OK
{
"success": true,
"data": {
"domain": {
"id": 4,
"type": "alias_domain",
"domain": "alias-1.com",
"incoming_email_domain": {
"id": 1,
"domain": "example-domain.com"
}
}
},
"error_code": null,
"error_messages": null
}
Create a Domain
POST /ga/api/v3/eng/incoming_email_domains
POST /ga/api/v3/eng/incoming_email_domains/{id}/alias_domains
Payload
domain
hash /required |
An object as described in the Attributes section of this page. All required fields must be present. Do not specify read-only fields. |
Response
The response is the full Domain record as defined in the Attributes.
Example 1: Create an Incoming Email Domain
POST /ga/api/v3/eng/incoming_email_domains
{
"domain": {
"domain": "new-domain-1.com",
"email_status": "disabled"
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"domain": {
"id": 7,
"type": "incoming_email_domain",
"domain": "new-domain-1.com",
"email_status": "disabled"
}
},
"error_code": null,
"error_messages": null
}
Example 2: Create an Alias Domain
POST /ga/api/v3/eng/incoming_email_domains/3/alias_domains
{
"domain": {
"domain": "new-alias-1.com"
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"domain": {
"id": 7,
"type": "alias_domain",
"domain": "new-alias-1.com",
"incoming_email_domain": {
"id": 3,
"domain": "example-last-domain.com"
}
}
},
"error_code": null,
"error_messages": null
}
Update a Domain
PUT /ga/api/v3/eng/incoming_email_domains/{id}
PUT /ga/api/v3/eng/alias_domains/{id}
Payload
domain
hash /required |
This hash is described in the Attributes section of this page. |
Response
The response is the full Domain record as defined Attributes section of this document.
Example 1: Update an Incoming Email Domain
PUT /ga/api/v3/eng/incoming_email_domains/2
{
"domain": {
"domain": "updated-domain-name.com",
"email_status": "defer"
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"domain": {
"id": 2,
"type": "incoming_email_domain",
"domain": "updated-domain-name.com",
"email_status": "defer"
}
},
"error_code": null,
"error_messages": null
}
Example 2: Update an Alias Domain
PUT /ga/api/v3/eng/alias_domains/6
{
"domain": {
"domain": "updated-alias-name.com"
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"domain": {
"id": 6,
"type": "alias_domain",
"domain": "updated-alias-name.com",
"incoming_email_domain": {
"id": 2,
"domain": "second-domain.com"
}
}
},
"error_code": null,
"error_messages": null
}
Delete an Incoming Email Domain
DELETE /ga/api/v3/eng/incoming_email_domains/{id}
DELETE /ga/api/v3/eng/alias_domains/{id}
Response
The response is a standard success or error response.
Example
DELETE /ga/api/v3/eng/incoming_email_domains/3
HTTP/1.1 200 OK
{
"success": true,
"data": {
},
"error_code": null,
"error_messages": null
}
Mailboxes
Get a List of Mailboxes
GET /ga/api/v3/eng/incoming_email_domains/{domain_id}/mailboxes
GET /ga/api/v3/eng/incoming_email_domains/{domain_id}/mailboxes?page={page}
GET /ga/api/v3/eng/incoming_email_domains/{domain_id}/user_mailboxes
GET /ga/api/v3/eng/incoming_email_domains/{domain_id}/user_mailboxes?page_token={page_token}
GET /ga/api/v3/eng/incoming_email_domains/{domain_id}/forwarding_mailboxes
GET /ga/api/v3/eng/incoming_email_domains/{domain_id}/spam_complaint_mailboxes
GET /ga/api/v3/eng/incoming_email_domains/{domain_id}/bounce_mailboxes
Parameters
page
integer /optional |
The page number to retrieve. Page numbering starts at |
page_token
string /optional |
The |
Response
The response will contain a list of Users in the following format.
mailboxes
array of hashes
|
|||||||||||
pagination
hash
|
Example 1: List all Mailboxes on the Domain
GET /ga/api/v3/eng/incoming_email_domains/1/mailboxes
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailboxes": [
{
"id": 7,
"type": "user",
"localpart": "test_user1",
"is_wildcard": false
},
{
"id": 8,
"type": "user",
"localpart": "test_user2",
"is_wildcard": false
},
{
"id": 10,
"type": "forward",
"localpart": "test_forward1",
"is_wildcard": false
},
{
"id": 11,
"type": "forward",
"localpart": "test_forward2",
"is_wildcard": true
},
{
"id": 13,
"type": "scomp_mailbox",
"localpart": "test_scomp1",
"is_wildcard": false
},
{
"id": 14,
"type": "scomp_mailbox",
"localpart": "test_scomp2",
"is_wildcard": false
},
{
"id": 16,
"type": "bounce_mailbox",
"localpart": "test_bounce1",
"is_wildcard": false
},
{
"id": 17,
"type": "bounce_mailbox",
"localpart": "test_bounce2",
"is_wildcard": false
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 8,
"next_page_token": null
}
},
"error_code": null,
"error_messages": null
}
Example 2: List only User Mailboxes on the Domain
GET /ga/api/v3/eng/incoming_email_domains/1/user_mailboxes
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailboxes": [
{
"id": 7,
"type": "user",
"localpart": "test_user1",
"is_wildcard": false
},
{
"id": 8,
"type": "user",
"localpart": "test_user2",
"is_wildcard": false
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 2,
"next_page_token": null
}
},
"error_code": null,
"error_messages": null
}
Example 3: List Only Forwarding Mailboxes on the Domain
GET /ga/api/v3/eng/incoming_email_domains/1/forwarding_mailboxes
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailboxes": [
{
"id": 10,
"type": "forward",
"localpart": "test_forward1",
"is_wildcard": false
},
{
"id": 11,
"type": "forward",
"localpart": "test_forward2",
"is_wildcard": true
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 2,
"next_page_token": null
}
},
"error_code": null,
"error_messages": null
}
Example 4: List Only Bounce Mailboxes on the Domain
GET /ga/api/v3/eng/incoming_email_domains/1/bounce_mailboxes
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailboxes": [
{
"id": 16,
"type": "bounce_mailbox",
"localpart": "test_bounce1",
"is_wildcard": false
},
{
"id": 17,
"type": "bounce_mailbox",
"localpart": "test_bounce2",
"is_wildcard": false
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 2,
"next_page_token": null
}
},
"error_code": null,
"error_messages": null
}
Example 5: List Only Spam Complaint Mailboxes on the Domain
GET /ga/api/v3/eng/incoming_email_domains/1/spam_complaint_mailboxes
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailboxes": [
{
"id": 13,
"type": "scomp_mailbox",
"localpart": "test_scomp1",
"is_wildcard": false
},
{
"id": 14,
"type": "scomp_mailbox",
"localpart": "test_scomp2",
"is_wildcard": false
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 2,
"next_page_token": null
}
},
"error_code": null,
"error_messages": null
}
Get Details on a Mailbox
GET /ga/api/v3/eng/mailboxes/{id}
Response
The response will contain details on the requested record.
mailbox
hash |
The attributes for this hash are defined in the Attributes section of this document. |
Example 1: Get a User Mailbox
GET /ga/api/v3/eng/mailboxes/7
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 7,
"type": "user",
"localpart": "test_user1",
"domain": {
"id": 1,
"domain": "example-domain.com"
},
"is_wildcard": false,
"delivery_mode": "local",
"dotqmail": null,
"forward_to": null,
"locked": false
}
},
"error_code": null,
"error_messages": null
}
Example 2: Get a Forwarding Mailbox
GET /ga/api/v3/eng/mailboxes/10
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 10,
"type": "forward",
"localpart": "test_forward1",
"domain": {
"id": 1,
"domain": "example-domain.com"
},
"is_wildcard": false,
"forward_to": [
"[email protected]"
]
}
},
"error_code": null,
"error_messages": null
}
Example 3: Get a Spam Complaint Mailbox
GET /ga/api/v3/eng/mailboxes/13
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 13,
"type": "scomp_mailbox",
"localpart": "test_scomp1",
"domain": {
"id": 1,
"domain": "example-domain.com"
}
}
},
"error_code": null,
"error_messages": null
}
Example 4: Get a Bounce Mailbox
GET /ga/api/v3/eng/mailboxes/16
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 16,
"type": "bounce_mailbox",
"localpart": "test_bounce1",
"domain": {
"id": 1,
"domain": "example-domain.com"
}
}
},
"error_code": null,
"error_messages": null
}
Create a Mailbox
POST /ga/api/v3/eng/incoming_email_domains/{domain_id}/user_mailboxes
POST /ga/api/v3/eng/incoming_email_domains/{domain_id}/forwarding_mailboxes
POST /ga/api/v3/eng/incoming_email_domains/{domain_id}/spam_complaint_mailboxes
POST /ga/api/v3/eng/incoming_email_domains/{domain_id}/bounce_mailboxes
Payload
mailbox
hash /required |
An object as described in the Attributes section of this page. Use the definition for the kind of user you want to create. All required fields must be present. Do not specify read-only fields. |
Example 1: Create a User Mailbox
POST /ga/api/v3/eng/incoming_email_domains/2/user_mailboxes
{
"mailbox": {
"localpart": "new-user",
"is_wildcard": true,
"password": "new-secret-password",
"delivery_mode": "forward_and_local",
"forward_to": [
"[email protected]",
"[email protected]"
]
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 19,
"type": "user",
"localpart": "new-user",
"domain": {
"id": 2,
"domain": "second-domain.com"
},
"is_wildcard": true,
"delivery_mode": "forward_and_local",
"dotqmail": null,
"forward_to": [
"[email protected]",
"[email protected]"
],
"locked": false
}
},
"error_code": null,
"error_messages": null
}
Example 2: Create a Forwarding Mailbox
POST /ga/api/v3/eng/incoming_email_domains/2/forwarding_mailboxes
{
"mailbox": {
"localpart": "new-forward",
"forward_to": [
"[email protected]"
],
"is_wildcard": true
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 19,
"type": "forward",
"localpart": "new-forward",
"domain": {
"id": 2,
"domain": "second-domain.com"
},
"is_wildcard": true,
"forward_to": [
"[email protected]"
]
}
},
"error_code": null,
"error_messages": null
}
Example 3: Create a Spam Complaint Mailbox
POST /ga/api/v3/eng/incoming_email_domains/2/spam_complaint_mailboxes
{
"mailbox": {
"localpart": "new-scomp"
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 19,
"type": "scomp_mailbox",
"localpart": "new-scomp",
"domain": {
"id": 2,
"domain": "second-domain.com"
}
}
},
"error_code": null,
"error_messages": null
}
Example 4: Create a Bounce Mailbox
POST /ga/api/v3/eng/incoming_email_domains/2/bounce_mailboxes
{
"mailbox": {
"localpart": "new-bounce"
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 19,
"type": "bounce_mailbox",
"localpart": "new-bounce",
"domain": {
"id": 2,
"domain": "second-domain.com"
}
}
},
"error_code": null,
"error_messages": null
}
Update a Mailbox
PUT /ga/api/v3/eng/mailboxes/{id}
Payload
mailbox
hash /required |
An object as described in the Attributes section of this page. Use the definition for the kind of user you are updating. |
Example 1: Update a User Mailbox
PUT /ga/api/v3/eng/mailboxes/7
{
"mailbox": {
"localpart": "test_user1_updated",
"is_wildcard": true,
"delivery_mode": "forward_and_local",
"forward_to": [
"[email protected]"
],
"password": "secret-password-updated",
"locked": true
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 7,
"type": "user",
"localpart": "test_user1_updated",
"domain": {
"id": 1,
"domain": "example-domain.com"
},
"is_wildcard": true,
"delivery_mode": "forward_and_local",
"dotqmail": null,
"forward_to": [
"[email protected]"
],
"locked": true
}
},
"error_code": null,
"error_messages": null
}
Example 2: Update a Forwarding Mailbox
PUT /ga/api/v3/eng/mailboxes/10
{
"mailbox": {
"forward_to": [
"[email protected]"
],
"is_wildcard": true
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 10,
"type": "forward",
"localpart": "test_forward1",
"domain": {
"id": 1,
"domain": "example-domain.com"
},
"is_wildcard": true,
"forward_to": [
"[email protected]"
]
}
},
"error_code": null,
"error_messages": null
}
Example 3: Update a Spam Complaint Mailbox
PUT /ga/api/v3/eng/mailboxes/13
{
"mailbox": {
"localpart": "new-localpart"
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 13,
"type": "scomp_mailbox",
"localpart": "new-localpart",
"domain": {
"id": 1,
"domain": "example-domain.com"
}
}
},
"error_code": null,
"error_messages": null
}
Example 4: Update a Bounce Mailbox
PUT /ga/api/v3/eng/mailboxes/16
{
"mailbox": {
"localpart": "new-bounce-localpart"
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"mailbox": {
"id": 16,
"type": "bounce_mailbox",
"localpart": "new-bounce-localpart",
"domain": {
"id": 1,
"domain": "example-domain.com"
}
}
},
"error_code": null,
"error_messages": null
}
Delete a Mailbox
DELETE /ga/api/v3/eng/mailboxes/{id}
References made to Bounce Mailboxes from GreenArrow Studio will not prevent deletion of the Bounce Mailbox, but may in the future. Deleting a Bounce Mailbox that is used by a scheduled/in-progress GreenArrow Studio campaign will cause the campaign to either not send or send with the deleted address.
Response
The response is a standard success or error response.
Example
DELETE /ga/api/v3/eng/mailboxes/7
HTTP/1.1 200 OK
{
"success": true,
"data": {
},
"error_code": null,
"error_messages": null
}
Set Default Bounce Mailbox
PUT /ga/api/v3/eng/incoming_email_domains/default_bounce_mailbox
Set the default bounce mailbox to be used by email sent from GreenArrow Engine when the SimpleMH mail class is configured to use the system default bounce address.
Payload
default_bounce_mailbox
string /required |
The string form of the bounce mailbox to use as the default (i.e. This mailbox must already be configured as a bounce mailbox in GreenArrow Engine. |
Response
default_bounce_mailbox
string |
The string form of the bounce mailbox that will be used as the default (i.e. |
Example
PUT /ga/api/v3/eng/incoming_email_domains/default_bounce_mailbox
{
"default_bounce_mailbox": "[email protected]"
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"default_bounce_mailbox": "[email protected]"
},
"error_code": null,
"error_messages": null
}
Get Default Bounce Mailbox
GET /ga/api/v3/eng/incoming_email_domains/default_bounce_mailbox
Get the default bounce mailbox to be used by email sent from GreenArrow Engine when the SimpleMH mail class is configured to use the system default bounce address.
Response
default_bounce_mailbox
string |
The string form of the bounce mailbox that will be used as the default (i.e. |
Example
GET /ga/api/v3/eng/incoming_email_domains/default_bounce_mailbox
HTTP/1.1 200 OK
{
"success": true,
"data": {
"default_bounce_mailbox": "[email protected]"
},
"error_code": null,
"error_messages": null
}