Help centerAPI referenceDomains
Domains
Your customers' domains: setup, DNS, status and settings.
List domains
/domainsdomains:readParameters
projectIdquery · stringOnly this project's domains.
limitquery · integerItems per page (default 50).
cursorquery · stringnextCursor from the previous page.
Request
curl "https://api.tenanci.com/v2/domains" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 200
{
"items": [
{
"id": "dom_4h7n1q",
"projectId": "prj_8f3k2m",
"name": "Barbearia do Zé",
"hostname": "barbeariadoze.com.br",
"isApex": true,
"status": "pending_dns",
"statusReason": null,
"enabled": true,
"overrides": [],
"waf": {
"mode": "block",
"failMode": "open"
},
"analytics": {
"beacon": true,
"sampleRate": 1
},
"assets": {
"directFromOrigin": true,
"htmlCacheSeconds": 0
},
"blockedPaths": [],
"tenant": {
"id": "barbearia-123",
"data": {
"name": "Barbearia do Zé",
"plan": "pro"
},
"expose": false
},
"dns": {
"type": "A",
"name": "barbeariadoze.com.br",
"values": [
"109.224.228.49"
]
},
"dnsCheckedAt": null,
"legacyId": null,
"createdAt": "2026-10-14T12:00:00.000Z",
"updatedAt": "2026-10-14T12:00:00.000Z"
}
],
"nextCursor": null
}Add a domain
/domainsdomains:writeRegisters a customer's domain. The response's dns field holds the record the customer must create. Over the plan's included domains? With an API key, an extra-domain pack is bought automatically if the organization allows it; otherwise 409 domain_limit_reached.
Parameters
Idempotency-Keyheader · stringRetrying with the same key returns the same response (no duplicates).
Body
projectIdstringrequiredhostnamestringrequiredmax 253Domain (e.g. joesbarbershop.com or app.joesbarbershop.com).
namestringmax 120A name you'll recognize (e.g. the customer's name).
faviconUrlstring | nulloverrides"routes" | "headers" | "injections"[]Sections where the domain uses its own rules instead of the project's.
acceptExtraChargebooleanAccept the extra-domain charge when over the plan.
tenantobjectEnd customer of the domain (shortcut for PUT /domains/:id/tenant).
idstringrequiredmax 100dataRecord<string, string | number | boolean | null>exposeboolean
Request
curl -X POST "https://api.tenanci.com/v2/domains" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"projectId":"prj_8f3k2m","hostname":"barbeariadoze.com.br","name":"Barbearia do Zé","tenant":{"id":"barbearia-123","data":{"name":"Barbearia do Zé","plan":"pro"}}}'Response 201
{
"id": "dom_4h7n1q",
"projectId": "prj_8f3k2m",
"name": "Barbearia do Zé",
"hostname": "barbeariadoze.com.br",
"isApex": true,
"status": "pending_dns",
"statusReason": null,
"enabled": true,
"overrides": [],
"waf": {
"mode": "block",
"failMode": "open"
},
"analytics": {
"beacon": true,
"sampleRate": 1
},
"assets": {
"directFromOrigin": true,
"htmlCacheSeconds": 0
},
"blockedPaths": [],
"tenant": {
"id": "barbearia-123",
"data": {
"name": "Barbearia do Zé",
"plan": "pro"
},
"expose": false
},
"dns": {
"type": "A",
"name": "barbeariadoze.com.br",
"values": [
"109.224.228.49"
]
},
"dnsCheckedAt": null,
"legacyId": null,
"createdAt": "2026-10-14T12:00:00.000Z",
"updatedAt": "2026-10-14T12:00:00.000Z"
}Check a domain before adding it
/domains-checkdomains:readValidates the format, tells whether it's an apex, which DNS record will be needed and whether it's available.
Parameters
hostnamequery · stringrequiredDomain to check.
Request
curl "https://api.tenanci.com/v2/domains-check" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 200
{
"valid": true,
"hostname": "barbeariadoze.com.br",
"isApex": true,
"dns": {
"type": "A",
"name": "barbeariadoze.com.br",
"values": [
"109.224.228.49"
]
},
"availability": "available"
}Get a domain
/domains/{id}domains:readParameters
idpath · stringrequiredResource id (prj_…, dom_…)
Request
curl "https://api.tenanci.com/v2/domains/dom_4h7n1q" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 200
{
"id": "dom_4h7n1q",
"projectId": "prj_8f3k2m",
"name": "Barbearia do Zé",
"hostname": "barbeariadoze.com.br",
"isApex": true,
"status": "pending_dns",
"statusReason": null,
"enabled": true,
"overrides": [],
"waf": {
"mode": "block",
"failMode": "open"
},
"analytics": {
"beacon": true,
"sampleRate": 1
},
"assets": {
"directFromOrigin": true,
"htmlCacheSeconds": 0
},
"blockedPaths": [],
"tenant": {
"id": "barbearia-123",
"data": {
"name": "Barbearia do Zé",
"plan": "pro"
},
"expose": false
},
"dns": {
"type": "A",
"name": "barbeariadoze.com.br",
"values": [
"109.224.228.49"
]
},
"dnsCheckedAt": null,
"legacyId": null,
"createdAt": "2026-10-14T12:00:00.000Z",
"updatedAt": "2026-10-14T12:00:00.000Z",
"faviconUrl": null
}Update a domain
/domains/{id}domains:writeParameters
idpath · stringrequiredResource id (prj_…, dom_…)
Body
namestringmax 120overrides"routes" | "headers" | "injections"[]wafMode"off" | "monitor" | "block"TenantGuard: off, monitor only or block.
wafFailMode"open" | "closed"If TenantGuard is unavailable: let through (open) or block (closed).
analyticsBeaconbooleanBrowser analytics script (Web Vitals, events).
analyticsSampleRatenumber≥ 0, ≤ 1Fraction of visits recorded (1 = all).
assetsDirectbooleanStatic files straight from the origin (less traffic through the domain).
blockedPathsstring[]≤ 100 itenshtmlCacheSeconds0 | 60 | 300 | 3600Short HTML cache in seconds (0 = off).
faviconUrlstring | nullenabledbooleanfalse takes the domain offline without deleting it.
Request
curl -X PATCH "https://api.tenanci.com/v2/domains/dom_4h7n1q" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"htmlCacheSeconds":60,"wafMode":"block"}'Response 200
{
"id": "dom_4h7n1q",
"projectId": "prj_8f3k2m",
"name": "Barbearia do Zé",
"hostname": "barbeariadoze.com.br",
"isApex": true,
"status": "pending_dns",
"statusReason": null,
"enabled": true,
"overrides": [],
"waf": {
"mode": "block",
"failMode": "open"
},
"analytics": {
"beacon": true,
"sampleRate": 1
},
"assets": {
"directFromOrigin": true,
"htmlCacheSeconds": 0
},
"blockedPaths": [],
"tenant": {
"id": "barbearia-123",
"data": {
"name": "Barbearia do Zé",
"plan": "pro"
},
"expose": false
},
"dns": {
"type": "A",
"name": "barbeariadoze.com.br",
"values": [
"109.224.228.49"
]
},
"dnsCheckedAt": null,
"legacyId": null,
"createdAt": "2026-10-14T12:00:00.000Z",
"updatedAt": "2026-10-14T12:00:00.000Z"
}Remove a domain
/domains/{id}domains:writeParameters
idpath · stringrequiredResource id (prj_…, dom_…)
Request
curl -X DELETE "https://api.tenanci.com/v2/domains/dom_4h7n1q" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 204
Success
Re-check DNS now
/domains/{id}/recheckdomains:writeTenanci checks on its own; use it when the customer just created the record.
Parameters
idpath · stringrequiredResource id (prj_…, dom_…)
Request
curl -X POST "https://api.tenanci.com/v2/domains/dom_4h7n1q/recheck" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 200
{
"id": "dom_4h7n1q",
"projectId": "prj_8f3k2m",
"name": "Barbearia do Zé",
"hostname": "barbeariadoze.com.br",
"isApex": true,
"status": "issuing_cert",
"statusReason": null,
"enabled": true,
"overrides": [],
"waf": {
"mode": "block",
"failMode": "open"
},
"analytics": {
"beacon": true,
"sampleRate": 1
},
"assets": {
"directFromOrigin": true,
"htmlCacheSeconds": 0
},
"blockedPaths": [],
"tenant": {
"id": "barbearia-123",
"data": {
"name": "Barbearia do Zé",
"plan": "pro"
},
"expose": false
},
"dns": {
"type": "A",
"name": "barbeariadoze.com.br",
"values": [
"109.224.228.49"
]
},
"dnsCheckedAt": null,
"legacyId": null,
"createdAt": "2026-10-14T12:00:00.000Z",
"updatedAt": "2026-10-14T12:00:00.000Z"
}Domain timeline
/domains/{id}/eventsdomains:readParameters
idpath · stringrequiredResource id (prj_…, dom_…)
Request
curl "https://api.tenanci.com/v2/domains/dom_4h7n1q/events" \
-H "Authorization: Bearer tnc_live_xxxxxxxx_xxxxxxxxxxxx"Response 200
{
"items": [
{
"id": 81,
"domainId": "dom_4h7n1q",
"fromStatus": "pending_dns",
"toStatus": "verifying",
"reason": "dns_ok",
"at": "2026-10-14T12:10:00.000Z"
}
]
}
