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
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | required | The 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
| Field | Type | Description |
|---|---|---|
type | string | DNS record type (TXT, MX, CNAME). |
host | string | The DNS host/name to create the record for. |
value | string | The expected DNS record value. |
priority | integer or null | MX record priority (only present for MX records). |
mandatory | boolean | Whether the record is required for the domain to be verified. |
verified | boolean | Whether the record has been detected. |
Errors
| Status | Message | Cause |
|---|---|---|
400 | Please provide a valid domain ID. | id path param is missing or not a number. |
404 | We were unable to find the domain. | Domain does not exist in the workspace. |