Skip to main content

Get Domain

Retrieve a single domain by ID, including its required DNS records and verification status for each.


Endpoint

GET https://api.campaignlark.com/v1/domains/:id

Path Parameters

ParameterTypeRequiredDescription
idintegerrequiredThe domain ID.

Sample Request

GET https://api.campaignlark.com/v1/domains/1

Response

Success — 200 OK

{
"error": null,
"data": {
"id": 1,
"domain_code": "abc123",
"domain_name": "example.com",
"verified": true,
"dns_records": [
{
"type": "TXT",
"host": "example.com",
"value": "v=spf1 include=spf.campaignlark.com ~all",
"mandatory": true,
"verified": true
},
{
"type": "TXT",
"host": "cl._domainkey.example.com",
"value": "v=DKIM1; k=rsa; p=MIGf...",
"mandatory": true,
"verified": true
},
{
"type": "MX",
"host": "example.com",
"value": "mx.campaignlark.com",
"priority": 10,
"mandatory": false,
"verified": false
},
{
"type": "TXT",
"host": "_dmarc.example.com",
"value": "v=DMARC1; p=reject;",
"mandatory": false,
"verified": false
},
{
"type": "CNAME",
"host": "track.example.com",
"value": "track.campaignlark.com",
"mandatory": false,
"verified": false
}
]
}
}

DNS Record Object

FieldTypeDescription
typestringDNS record type (TXT, MX, CNAME).
hoststringThe DNS host/name to create the record for.
valuestringThe expected DNS record value.
priorityinteger or nullMX record priority (only present for MX records).
mandatorybooleanWhether the record is required for the domain to be verified.
verifiedbooleanWhether the record has been detected.

Errors

StatusMessageCause
400Please provide a valid domain ID.id path param is missing or not a number.
404We were unable to find the domain.Domain does not exist in the workspace.