TenanciTenanci

Help centerAPI referenceDomains

Domains

Your customers' domains: setup, DNS, status and settings.

List domains

GET/domainsdomains:read

Parameters

  • projectIdquery · string

    Only this project's domains.

  • limitquery · integer

    Items per page (default 50).

  • cursorquery · string

    nextCursor from the previous page.

Request

cURL
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

POST/domainsdomains:write

Registers 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 · string

    Retrying with the same key returns the same response (no duplicates).

Body

  • projectIdstringrequired
  • hostnamestringrequiredmax 253

    Domain (e.g. joesbarbershop.com or app.joesbarbershop.com).

  • namestringmax 120

    A name you'll recognize (e.g. the customer's name).

  • faviconUrlstring | null
  • overrides"routes" | "headers" | "injections"[]

    Sections where the domain uses its own rules instead of the project's.

  • acceptExtraChargeboolean

    Accept the extra-domain charge when over the plan.

  • tenantobject

    End customer of the domain (shortcut for PUT /domains/:id/tenant).

    • idstringrequiredmax 100
    • dataRecord<string, string | number | boolean | null>
    • exposeboolean

Request

cURL
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

GET/domains-checkdomains:read

Validates the format, tells whether it's an apex, which DNS record will be needed and whether it's available.

Parameters

  • hostnamequery · stringrequired

    Domain to check.

Request

cURL
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

GET/domains/{id}domains:read

Parameters

  • idpath · stringrequired

    Resource id (prj_…, dom_…)

Request

cURL
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

PATCH/domains/{id}domains:write

Parameters

  • idpath · stringrequired

    Resource id (prj_…, dom_…)

Body

  • namestringmax 120
  • overrides"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).

  • analyticsBeaconboolean

    Browser analytics script (Web Vitals, events).

  • analyticsSampleRatenumber≥ 0, ≤ 1

    Fraction of visits recorded (1 = all).

  • assetsDirectboolean

    Static files straight from the origin (less traffic through the domain).

  • blockedPathsstring[]≤ 100 itens
  • htmlCacheSeconds0 | 60 | 300 | 3600

    Short HTML cache in seconds (0 = off).

  • faviconUrlstring | null
  • enabledboolean

    false takes the domain offline without deleting it.

Request

cURL
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

DELETE/domains/{id}domains:write

Parameters

  • idpath · stringrequired

    Resource id (prj_…, dom_…)

Request

cURL
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

POST/domains/{id}/recheckdomains:write

Tenanci checks on its own; use it when the customer just created the record.

Parameters

  • idpath · stringrequired

    Resource id (prj_…, dom_…)

Request

cURL
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

GET/domains/{id}/eventsdomains:read

Parameters

  • idpath · stringrequired

    Resource id (prj_…, dom_…)

Request

cURL
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"
    }
  ]
}