Domains
All domains will be routed through our high performance CDN provider, bunny. Each domain can be connected by changing your nameservers, or by setting a cname record.
Lookup and Query
List All Domains
List all domains accessible to a user.
GET /api/domains
Returned Params
- domains: Array
- id: String
- hostname: String
- site_id: String
- account_id: String
- dns_zone: Object | associated dns zone
- id: String
- name: String
- dnssec: Boolean
- dnssec_data: Object (nil if dnssec = false)
- created_at: DateTime
- updated_at: DateTime
- account: Object
- id: String
- name: String
- dns_zone_records: Array | associated dns records
- id: String
- record_type: Integer
- ttl: Integer
- value: String
- name: String
- priority: Integer
- weight: Integer
- port: Integer
- flags: String
- record_type: Integer
- comment: String
- created_at: DateTime
- updated_at: DateTime
Load Domain by ID
GET /api/domains/:id
Returned Params
- domain: Object
- id: String
- hostname: String
- site_id: String
- account_id: String
- dns_zone: Object | associated dns zone
- id: String
- name: String
- dnssec: Boolean
- dnssec_data: Object (nil if dnssec = false)
- created_at: DateTime
- updated_at: DateTime
- account: Object
- id: String
- name: String
- dns_zone_records: Array | associated dns records
- id: String
- record_type: Integer
- ttl: Integer
- value: String
- name: String
- priority: Integer
- weight: Integer
- port: Integer
- flags: String
- record_type: Integer
- comment: String
- created_at: DateTime
- updated_at: DateTime
Search by Domain Name
POST /api/domains/query
This is a helper endpoint to find a domain without knowing it's ID.
The param q supports partial prefix matching. For example, given the domain example.com:
- Searching for
examplewill returnexample.com, however; - Searchinf for
comwill return nothing.
Params
- q: String
Returned Params
- domains: Array
- id: String
- hostname: String
- site_id: String
- account_id: String
- dns_zone: Object | associated dns zone
- id: String
- name: String
- dnssec: Boolean
- dnssec_data: Object (nil if dnssec = false)
- created_at: DateTime
- updated_at: DateTime
- account: Object
- id: String
- name: String
- dns_zone_records: Array | associated dns records
- id: String
- record_type: Integer
- ttl: Integer
- value: String
- name: String
- priority: Integer
- weight: Integer
- port: Integer
- flags: String
- record_type: Integer
- comment: String
- created_at: DateTime
- updated_at: DateTime
Check if domain is available
This will check if the domain is valid, and if it exists already in our system.
Params
- hostname: String
Use the HTTP status code to determine if it's available / valid.
HTTP 200: Exists and not availableHTTP 422: Not a valid domain, or missinghostnameparam.HTTP 404: Does not exist, and valid and available.
Returned Params
- status: String
Site Endpoints
List all domains for a site
GET /api/sites/:site_id/domains
Returned Params
- domains: Array
- id: String
- hostname: String
- dns_zone: Object | associated dns zone
- id: String
- name: String
- dnssec: Boolean
- dnssec_data: Object (nil if dnssec = false)
- created_at: DateTime
- updated_at: DateTime
- account: Object
- id: String
- name: String
- dns_zone_records: Array | associated dns records
- id: String
- record_type: Integer
- ttl: Integer
- value: String
- name: String
- priority: Integer
- weight: Integer
- port: Integer
- flags: String
- record_type: Integer
- comment: String
- created_at: DateTime
- updated_at: DateTime
Create a Domain
POST /api/sites/:site_id/domains
If no domain exists for a site, this will be automatically configured as the primary domain.
Params
- domain: String
- provision_method: String | options are: dns or cname.
Returned params for DNS
- id: String
- ns1: String
- ns2: String
Returned params for cname
- id: String
- cname: String
Promote a domain
PATCH /api/sites/:site_id/domains/:id
This takes no parameters and will promote the requested domain to the primary domain. The existing primary domain will become an alias.
Remove
This will remove the domain. If it is the primary domain, the site will be updated to use the default temporary url. It's recommended to first promote your new domain to the primary domain before deleting it.
DELETE /api/sites/:site_id/domain/:id