CNAMEs
List, add, update, and delete the custom domain records that integrations use for tracking.
A CNAME (Canonical Name) is a DNS record that maps a custom domain to Oktopost's infrastructure. In Oktopost, integrations use CNAMEs to track activity and collect data through your own domain. When you set up integrations with marketing automation platforms, CNAMEs let those integrations track activity while keeping your domain branding. Use these endpoints to create and manage CNAME records for your integrations.
After you create a CNAME record in Oktopost, you must also add the corresponding DNS record with your domain registrar. The CNAME works only once both the Oktopost configuration and the DNS record are in place.
List CNAME Records
Retrieve all CNAME records in the account.
GET /v2/cname
Example Request
curl -X GET "https://api.oktopost.com/v2/cname" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result":true,
"Items":[
{
"Id":"0CN000000000001",
"Created":"2017-05-17 15:00:00",
"Modified":"2017-05-17 15:00:00",
"AccountId": "001000000000001",
"Name":"go.example.com"
}
],
"Total":1
}Add CNAME Record
Add a CNAME record to the account.
POST /v2/cname
All CNAMEs must resolve to okt.to.
Parameters
Prop
Type
Example Request
curl -X POST "https://api.oktopost.com/v2/cname" \
-u ACCOUNT_ID:API_KEY \
-d cname="go.example.com"Example Response
{
"Result":true,
"Cname": {
"Id":"0CN000000000001",
"Created":"2017-05-17 15:00:00",
"Modified":"2017-05-17 15:00:00",
"AccountId": "001000000000001",
"Name":"go.example.com"
}
}Update CNAME Record
Update the domain of a CNAME record.
POST /v2/cname/:cnameId
Parameters
Prop
Type
Example Request
curl -X POST "https://api.oktopost.com/v2/cname/0CN000000000001" \
-u ACCOUNT_ID:API_KEY \
-d cname="go.example.com"Example Response
{
"Result":true,
"Cname": {
"Id":"0CN000000000001",
"Created":"2017-05-17 15:00:00",
"Modified":"2017-05-17 15:00:00",
"AccountId": "001000000000001",
"Name":"go.example.com"
}
}Delete CNAME Record
Delete a CNAME record from Oktopost.
DELETE /v2/cname/:cnameId
CNAMEs are critical for integrations. Deleting a CNAME breaks any integrations that use that domain, which can disrupt tracking and data sync.
This endpoint deletes the CNAME from Oktopost only. It doesn't delete the DNS record.
Parameters
Prop
Type
Example Request
curl -X DELETE "https://api.oktopost.com/v2/cname/0CN000000000001" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result":true
}