URL Domains API
- Table of Contents
- Overview
- Attributes
- Get a List of URL Domains
- Get Details on a single URL Domain
- List the References to a URL Domain
- Create a URL Domain
- Update a URL Domain
- Delete a URL Domain
- Set Default URL Domain
- Get Default URL Domain
Overview
GreenArrow can perform click and open tracking using URL Domains.
Attributes
The following attributes are defined for URL Domains:
url_domain
hash /required
|
Get a List of URL Domains
GET /ga/api/v3/eng/url_domains
GET /ga/api/v3/eng/url_domains?page={page}
GET /ga/api/v3/eng/url_domains?page_token={page_token}
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 URL Domains in the following format.
url_domains
array of hashes
|
|||||||||||
pagination
hash
|
Example
GET /ga/api/v3/eng/url_domains
HTTP/1.1 200 OK
{
"success": true,
"data": {
"url_domains": [
{
"id": 1,
"domain": "example.com"
},
{
"id": 2,
"domain": "test-domain-1.com"
},
{
"id": 3,
"domain": "test-domain-2.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 single URL Domain
GET /ga/api/v3/eng/url_domains/{id}
Response
The response will contain details on the requested record.
url_domain
hash |
The attributes for this hash are defined in the Attributes section of this document. |
Example
GET /ga/api/v3/eng/url_domains/8
HTTP/1.1 200 OK
{
"success": true,
"data": {
"url_domain": {
"id": 8,
"domain": "test-domain-1.com",
"ssl": true
}
},
"error_code": null,
"error_messages": null
}
List the References to a URL Domain
GET /ga/api/v3/eng/url_domains/{id}/used_by
GET /ga/api/v3/eng/url_domains/{id}/used_by?page={page}
GET /ga/api/v3/eng/url_domains/{id}/used_by?page_token={page_token}
Parameters
page
integer /optional |
The page number to retrieve. Page numbering starts at |
page_token
string /optional |
The |
Response
used_by
array of hashes A list of objects that use this URL Domain. This list does not include any references made by GreenArrow Studio, but it may in the future.
|
|||||||||||
pagination
hash
|
Example
GET /ga/api/v3/eng/url_domains/2/used_by
HTTP/1.1 200 OK
{
"success": true,
"data": {
"used_by": [
{
"type": "mail_class",
"id": 1,
"name": "basic_mail_class"
},
{
"type": "mail_class",
"id": 3,
"name": "advanced_mail_class"
},
{
"type": "mail_class",
"id": 4,
"name": "tertiary_mc"
}
],
"pagination": {
"page": 0,
"per_page": 100,
"num_pages": 1,
"num_records": 3,
"next_page_token": null
}
},
"error_code": null,
"error_messages": null
}
Create a URL Domain
POST /ga/api/v3/eng/url_domains
Payload
url_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 URL Domain record as defined in the URL Domain Attributes.
Example
POST /ga/api/v3/eng/url_domains
{
"url_domain": {
"domain": "my-domain.com",
"ssl": false
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"url_domain": {
"id": 12,
"domain": "my-domain.com",
"ssl": false
}
},
"error_code": null,
"error_messages": null
}
Update a URL Domain
PUT /ga/api/v3/eng/url_domains/{id}
Payload
url_domain
hash /required |
This hash is described in the Attributes section of this page. |
Response
The response is the full URL Domain record as defined in the URL Domain Attributes.
Example
PUT /ga/api/v3/eng/url_domains/16
{
"url_domain": {
"domain": "new-domain.com",
"ssl": false
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"url_domain": {
"id": 16,
"domain": "new-domain.com",
"ssl": false
}
},
"error_code": null,
"error_messages": null
}
Delete a URL Domain
DELETE /ga/api/v3/eng/url_domains/{id}
URL Domains that are used by other records may not be deleted. Use the URL Domains API to get a list of such records.
References made to URL Domains from GreenArrow Studio will not prevent deletion of the URL Domain, but may in the future. Deleting a URL Domain that is used by a scheduled/in-progress GreenArrow Studio campaign will cause the campaign to either not send or send with the deleted domain.
Response
The response is a standard success or error response.
Example
DELETE /ga/api/v3/eng/url_domains/29
HTTP/1.1 200 OK
{
"success": true,
"data": {
},
"error_code": null,
"error_messages": null
}
Set Default URL Domain
PUT /ga/api/v3/eng/url_domains/default
Set the default URL Domain to be used by email sent from GreenArrow Engine when the SimpleMH mail class is configured to use the system default URL Domain.
Payload
default_url_domain
hash /required Either the
|
Response
default_url_domain
hash
|
Example
PUT /ga/api/v3/eng/url_domains/default
{
"default_url_domain": {
"domain": "test-domain-1.com"
}
}
HTTP/1.1 200 OK
{
"success": true,
"data": {
"default_url_domain": {
"id": 20,
"domain": "test-domain-1.com"
}
},
"error_code": null,
"error_messages": null
}
Get Default URL Domain
GET /ga/api/v3/eng/url_domains/default
Get the default URL Domain to be used by email sent from GreenArrow Engine when the SimpleMH mail class is configured to use the system default URL Domain.
Response
default_url_domain
hash
|
Example
GET /ga/api/v3/eng/url_domains/default
HTTP/1.1 200 OK
{
"success": true,
"data": {
"default_url_domain": {
"id": 27,
"domain": "test-domain-2.com"
}
},
"error_code": null,
"error_messages": null
}