API Docs
v1.0
Domains API
Add and manage custom domains for your short links.
Note: Custom domains require a Teams or Enterprise plan.
GET
/api/v1/domainsList all custom domains.
Scope:
domains:readRequest
curl https://trimlink.co/api/v1/domains \
-H "Authorization: Bearer tk_live_your_api_key"Response
200Response
{
"success": true,
"data": [
{
"id": "dom_abc123",
"domain": "go.example.com",
"verified": true,
"lastStatus": "fully_configured",
"createdAt": "2026-01-15T10:00:00Z"
}
]
}POST
/api/v1/domainsAdd a custom domain for verification.
Scope:
domains:writeRequest
curl -X POST https://trimlink.co/api/v1/domains \
-H "Authorization: Bearer tk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{"domain": "go.example.com"}'Response
201Response
{
"success": true,
"data": {
"id": "dom_xyz789",
"domain": "go.example.com",
"verified": false,
"verificationToken": "a3f5d9c7e8b2...",
"txtRecordHost": "_trimlink-verification.go.example.com",
"txtRecordValue": "trimlink-verify=a3f5d9c7e8b2...",
"cnameRecordHost": "go.example.com",
"cnameRecordValue": "cname.trimlink.co"
}
}DNS Setup Required
After adding a domain, configure these DNS records:
- TXT Record - Add the verification token
- CNAME Record - Point to cname.trimlink.co
GET
/api/v1/domains/:idGet domain details.
Scope:
domains:readRequest
curl https://trimlink.co/api/v1/domains/dom_xyz789 \
-H "Authorization: Bearer tk_live_your_api_key"Response
200Response
{
"success": true,
"data": {
"id": "dom_xyz789",
"domain": "go.example.com",
"verified": false,
"lastStatus": "txt_missing",
"lastCheckedAt": "2026-01-31T12:00:00Z",
"createdAt": "2026-01-31T10:00:00Z"
}
}POST
/api/v1/domains/:id/verifyTrigger domain verification check.
Scope:
domains:writeRequest
curl -X POST https://trimlink.co/api/v1/domains/dom_xyz789/verify \
-H "Authorization: Bearer tk_live_your_api_key"Response
200Response
{
"success": true,
"data": {
"id": "dom_xyz789",
"domain": "go.example.com",
"verified": true,
"lastStatus": "fully_configured"
}
}GET
/api/v1/domains/:id/statusCheck domain DNS configuration status.
Scope:
domains:readRequest
curl https://trimlink.co/api/v1/domains/dom_xyz789/status \
-H "Authorization: Bearer tk_live_your_api_key"Response
200Response
{
"success": true,
"data": {
"txtConfigured": true,
"cnameConfigured": true,
"status": "fully_configured"
}
}DELETE
/api/v1/domains/:idDelete a custom domain.
Scope:
domains:writeRequest
curl -X DELETE https://trimlink.co/api/v1/domains/dom_xyz789 \
-H "Authorization: Bearer tk_live_your_api_key"Response
204 No Content
Domain Status Values
| Status | Description |
|---|---|
pending | Awaiting DNS configuration |
txt_missing | TXT record not found |
cname_missing | CNAME record not found |
fully_configured | Domain is ready to use |