CNAMEs
Manage custom domain records used by integrations for tracking and data collection.
A CNAME (Canonical Name) is a DNS record that maps a custom domain to Oktopost's infrastructure. In Oktopost, CNAMEs are used by integrations to enable tracking and data collection through your own domain. When you set up integrations with marketing automation , CNAMEs allow those integrations to track activity while maintaining your domain branding. Use these endpoints to create and manage CNAME records for your integrations.
After creating a CNAME record in Oktopost, you must also add the corresponding DNS record with your domain registrar. The CNAME will only function once both the Oktopost configuration and DNS record are in place.
List CNAME Records
Example Request
curl -i https://api.oktopost.com/v2/cnameExample Result
{
"Result":true,
"Items":[
{
"Id":"0CN000000000000",
"Created":"2017-05-17 15:00:00",
"Modified":"2017-05-17 15:00:00",
"AccountId": "001000000000001",
"Name":"ok.oktopost.com"
}
],
"Total":1
}Add CNAME Record
All CNAMEs must resolve to okt.to.
Example Request
curl -i https://api.oktopost.com/v2/cname -X POST \
-d cname="ok.oktopost.com"Example Result
{
"Result":true,
"Cname": {
"Id":"0CN000000000000",
"Created":"2017-05-17 15:00:00",
"Modified":"2017-05-17 15:00:00",
"AccountId": "001000000000001",
"Name":"ok.oktopost.com"
}
}Update CNAME Record
Example Request
curl -i https://api.oktopost.com/v2/cname/0CN000000000000 -X POST \
-d cname="ok.oktopost.com"Example Result
{
"Result":true,
"Cname": {
"Id":"0CN000000000000",
"Name":"ok.oktopost.com"
}
}Delete CNAME Record
CNAMEs are critical for integration functionality. Deleting a CNAME will break any integrations using that domain, potentially disrupting tracking and data sync.
This endpoint will not delete the CNAME record from the DNS but only from Oktopost.
Example Request
curl -i https://api.oktopost.com/v2/cname/0CN000000000000 -X DELETEExample Result
{
"Result":true
}