If you use Kinsta’s DNS, you can use the domains
endpoint to:
To get the list of domains, you need the company ID
. You can obtain the company_id from MyKinsta > username > Company settings > Billing details. The domains list will give you the domain_id
to get the list of DNS records.
Response object of domains requests
No or invalid API key provided to the request
Could not find the company or the user does not have permissions to retrieve data
Error occurred while retrieving domains
{- "company": {
- "domains": [
- {
- "id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "name": "mydomain.com",
- "site_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "is_active": true
}
]
}
}
Response object of domain DNS records requests
No or invalid API key provided to the request
Error occurred while retrieving domain DNS records
{- "domain": {
- "dns_records": [
- {
- "type": "A",
- "name": "abc.mydomain.com",
- "ttl": 3600,
- "resource_records": [
- {
- "value": "1.1.1.1"
}
]
}
]
}
}
DNS record create action started. Check MyKinsta for status
One or more of the required parameters were not provided to the request
No or invalid API key provided to the request
Error occurred while creating a domain DNS record
{- "type": "A",
- "name": "abc.mydomain.com",
- "ttl": 3600,
- "resource_records": [
- {
- "value": "1.1.1.1"
}
]
}
{- "operation_id": "domains:create-dns-record-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Creating a domain DNS record in progress",
- "status": 202
}
DNS record update action started. Check MyKinsta for status
One or more of the required parameters were not provided to the request
No or invalid API key provided to the request
Error occurred while updating a domain DNS record
{- "type": "A",
- "name": "abc.mydomain.com",
- "ttl": 3600,
- "new_resource_records": [
- {
- "value": "1.1.1.1"
}
], - "removed_resource_records": [
- {
- "value": "2.2.2.2"
}
]
}
{- "operation_id": "domains:update-dns-record-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Updating a domain DNS record in progress",
- "status": 202
}
Domain DNS record deletion action started. Check MyKinsta for status
One or more of the required parameters were not provided to the request
No or invalid API key provided to the request
Error occurred while deleting a domain DNS record
{- "type": "A",
- "name": "staging.mydomain.com"
}
{- "operation_id": "domains:delete-dns-record-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
- "message": "Deleting domain DNS record in progress",
- "status": 202
}