The following API calls are currently available for the Domain object:
GET LIST - Get a list of all domains in your account.
https://restapi.surveygizmo.com/v5/domain
| Parameters | Example | Required | 
|---|---|---|
| Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True | 
| page | page=3 | False | 
| resultsperpage | resultsperpage=100 | False | 
Response Example (.json format):
{
  "result_ok": true,
  "data": {
    "xxxxxx": {
      "id": xxxxxx,
      "customerID": "xxxxx",
      "type": "Private",
      "domain": "surveys.mycompany.com",
      "redirect": "",
      "eStatus": "Active",
      "created": "2015-05-12 17:36:30"
    },
    "xxxxxx": {
      "id": xxxxxx,
      "customerID": "xxxxx",
      "type": "Private",
      "domain": "reviews.mycompany.com",
      "redirect": "",
      "eStatus": "Active",
      "created": "2017-03-21 12:08:12"
    }
  }
}	 GET DOMAIN - Get information about a specific domain in your account.
https://restapi.surveygizmo.com/v5/domain/[DomainID]
| Parameters | Example | Required | 
|---|---|---|
| Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True | 
Response Example (.json format):
{
  "result_ok": true,
  "data": {
    "xxxxxx": {
      "id": xxxxxx,
      "customerID": "xxxxx",
      "type": "Private",
      "domain": "surveys.mycompany.com",
      "redirect": "",
      "eStatus": "Active",
      "created": "2015-05-12 17:36:30"
    }
  }
}CREATE DOMAIN - Create a new domain in your account.
https://restapi.surveygizmo.com/v5/domain?_method=PUT&domain=surveys.company.com
| Parameters | Value/Example | Required | 
|---|---|---|
| Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True | 
| domain* | your domain url (i.e., surveys.company.com) | True | 
| type | Private, Subdomain (case sensitive) | False | 
| redirect** | survey not found url (e.g., company.com) | False | 
*For Branded Subdomains, provide the first portion of the domain (highlighted below):
http://yourcompany.sgizmo.com/s3/survey-name.
**Private domain only
Response Example (.json format):
{
  "result_ok": true,
  "data": {
    "xxxxxx": {
      "id": xxxxxx,
      "customerID": "xxxxx",
      "type": "Private",
      "domain": "surveys.yourcompany.com",
      "redirect": "",
      "eStatus": "Active",
      "created": "2017-09-25 17:39:12"
    }
  }
}UPDATE DOMAIN - Update/Change domain information.
https://restapi.surveygizmo.com/v5/domain/[DomainID]?_method=POST
| Parameters | Value/Example | Required | 
|---|---|---|
| Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True | 
| domain* | your domain url (i.e., surveys.company.com) | False | 
| type | Private, Subdomain (case sensitive) | False | 
| redirect** | survey not found url (e.g., company.com) | False | 
*For Branded Subdomains, provide the first portion of the domain (highlighted below):
http://yourcompany.sgizmo.com/s3/survey-name.
**Private domain only
Example Response (.json format)
{
  "result_ok": true,
  "data": {
    "xxxxxx": {
      "id": xxxxxx,
      "customerID": "xxxxx",
      "type": "Private",
      "domain": "surveys.yourcompany.com",
      "redirect": "",
      "eStatus": "Active",
      "created": "2017-09-25 17:39:12"
    }
  }
}DELETE DOMAIN - Delete specific domain from your account.
https://restapi.surveygizmo.com/v5/domain/[DomainID]?_method=DELETE
| Parameters | Value/Example | Required | 
|---|---|---|
| Authentication Credentials | api_token=abcd12345&api_token_secret=abcd12345 | True | 
Response Example (.json format):
{
  "result_ok": true,
  "status": "success"
}