API reference

Domains

Add, check, redirect, move and remove custom domains, and connect Cloudflare by sign-in or API token.
GET/v1/orgs/:orgId/domains

Lists custom domains, and target: the hostname to point their CNAME records at.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

curl 'https://api.cactive.ai/v1/orgs/{orgId}/domains' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  domains: {
    message?: string
    status?: "error" | "active" | "pending" | "verifying"
    createdAt?: number
    updatedAt?: number
    orgId: string
    projectId: string
    brandId?: string
    hostname: string
    tenantId?: string
    certificateArn?: string
    records?: string
    zone?: string
    dnsProvider?: string
    checkedAt?: number
    redirectTo?: string
    move?: boolean
    acmCertificateArn?: string
    statusPageId?: string
    redirectAway?: boolean
    servedBy?: string
    checkoutFor?: string
  }[]
  target: string
}
POST/v1/orgs/:orgId/domains

Adds a custom domain to a Serverless App Service (projectId) or a status page (statusPageId) and returns the DNS record to create.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • hostnamestringrequired

    Matches ^(?=.{4,253}$)([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$. Lowercased.

  • projectIdstring
  • statusPageIdstring

    Up to 60 characters.

  • moveboolean

    Default false.

Also checked: Name a Serverless App Service or a status page.

Errors

  • 400Platform hostnames can't be added as custom domains.
  • 404Status page not found
  • 404Serverless App Service not found
  • 502Couldn't set up this domain. Try again.
curl -X POST 'https://api.cactive.ai/v1/orgs/{orgId}/domains' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "hostname": "Example"
  }'
Send it from this page with your session or a key.

Response 201

{
  domain: {
    message?: string
    status?: "error" | "active" | "pending" | "verifying"
    createdAt?: number
    updatedAt?: number
    orgId: string
    projectId: string
    brandId?: string
    hostname: string
    tenantId?: string
    certificateArn?: string
    records?: string
    zone?: string
    dnsProvider?: string
    checkedAt?: number
    redirectTo?: string
    move?: boolean
    acmCertificateArn?: string
    statusPageId?: string
    redirectAway?: boolean
    servedBy?: string
    checkoutFor?: string
  }
  records: {
    type: "CNAME" | "TXT"
    name: string
    value: string
    purpose?: "validation"
  }[]
  dns?: {
    ok: boolean
    expected: string
    found: string[]
  }
}
POST/v1/orgs/:orgId/domains/:hostname/verify

Checks the domain's certificate and updates its status.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • hostname

    The custom domain.

Errors

  • 404Domain not found
  • 409This domain belongs to another app. Change or remove it there.
curl -X POST 'https://api.cactive.ai/v1/orgs/{orgId}/domains/{hostname}/verify' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  domain: {
    message?: string
    status?: "error" | "active" | "pending" | "verifying"
    createdAt?: number
    updatedAt?: number
    orgId: string
    projectId: string
    brandId?: string
    hostname: string
    tenantId?: string
    certificateArn?: string
    records?: string
    zone?: string
    dnsProvider?: string
    checkedAt?: number
    redirectTo?: string
    move?: boolean
    acmCertificateArn?: string
    statusPageId?: string
    redirectAway?: boolean
    servedBy?: string
    checkoutFor?: string
  }
}
| {
  domain: {
    message?: string
    status?: "error" | "active" | "pending" | "verifying"
    createdAt?: number
    updatedAt?: number
    orgId: string
    projectId: string
    brandId?: string
    hostname: string
    tenantId?: string
    certificateArn?: string
    records?: string
    zone?: string
    dnsProvider?: string
    checkedAt?: number
    redirectTo?: string
    move?: boolean
    acmCertificateArn?: string
    statusPageId?: string
    redirectAway?: boolean
    servedBy?: string
    checkoutFor?: string
  }
  dns?: undefined
} | {
  domain: {
    message?: string
    status?: "error" | "active" | "pending" | "verifying"
    createdAt?: number
    updatedAt?: number
    orgId: string
    projectId: string
    brandId?: string
    hostname: string
    tenantId?: string
    certificateArn?: string
    records?: string
    zone?: string
    dnsProvider?: string
    checkedAt?: number
    redirectTo?: string
    move?: boolean
    acmCertificateArn?: string
    statusPageId?: string
    redirectAway?: boolean
    servedBy?: string
    checkoutFor?: string
  }
  dns: {
    ok: boolean
    expected: string
    found: string[]
  }
}
POST/v1/orgs/:orgId/domains/:hostname/cloudflare

Creates the domain's records with the org's connected Cloudflare token, then checks right away. Create-only: a record already pointing elsewhere is replaced only for an owner or admin (a move's second click, say); for anyone else nothing is written and the answer names it (409), so the connection never repoints a live record for someone who may only add one.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • hostname

    The custom domain.

Errors

  • 400This domain's zone couldn't be found in DNS.
  • 400Connect Cloudflare first.
  • 404Domain not found
  • 409This domain belongs to another app. Change or remove it there.
  • 409… An owner or admin can replace … here, or change … in Cloudflare.
curl -X POST 'https://api.cactive.ai/v1/orgs/{orgId}/domains/{hostname}/cloudflare' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  domain: {
    message?: string
    status?: "error" | "active" | "pending" | "verifying"
    createdAt?: number
    updatedAt?: number
    orgId: string
    projectId: string
    brandId?: string
    hostname: string
    tenantId?: string
    certificateArn?: string
    records?: string
    zone?: string
    dnsProvider?: string
    checkedAt?: number
    redirectTo?: string
    move?: boolean
    acmCertificateArn?: string
    statusPageId?: string
    redirectAway?: boolean
    servedBy?: string
    checkoutFor?: string
  }
  dns?: undefined
} | {
  domain: {
    message?: string
    status?: "error" | "active" | "pending" | "verifying"
    createdAt?: number
    updatedAt?: number
    orgId: string
    projectId: string
    brandId?: string
    hostname: string
    tenantId?: string
    certificateArn?: string
    records?: string
    zone?: string
    dnsProvider?: string
    checkedAt?: number
    redirectTo?: string
    move?: boolean
    acmCertificateArn?: string
    statusPageId?: string
    redirectAway?: boolean
    servedBy?: string
    checkoutFor?: string
  }
  dns: {
    ok: boolean
    expected: string
    found: string[]
  }
}
PATCH/v1/orgs/:orgId/domains/:hostname

Moves a domain to another Serverless App Service of the org, or makes it redirect to another domain of its Serverless App Service (redirectTo: null serves the Serverless App Service again). The edge route changes right away.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • hostname

    The custom domain.

Request body

  • projectIdstring

    At least 1 character.

  • redirectTostringor null

    Matches ^(?=.{4,253}$)([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$. Lowercased.

Errors

  • 400This domain serves a status page. Remove it, then add it to the Serverless App Service.
  • 400A domain can't redirect to itself.
  • 400Redirect to another domain of the same status page.
  • 400… redirects too. Choose a domain that serves the status page.
  • 400Redirect to another domain of the same Serverless App Service.
  • 400… redirects too. Choose a domain that serves the Serverless App Service.
  • 404Domain not found
  • 404Serverless App Service not found
  • 409This domain belongs to another app. Change or remove it there.
  • 409… redirects to this domain. Change that first.
curl -X PATCH 'https://api.cactive.ai/v1/orgs/{orgId}/domains/{hostname}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "projectId": "<projectId>",
    "redirectTo": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  domain: {
    message?: string
    status?: "error" | "active" | "pending" | "verifying"
    createdAt?: number
    updatedAt?: number
    orgId: string
    projectId: string
    brandId?: string
    hostname: string
    tenantId?: string
    certificateArn?: string
    records?: string
    zone?: string
    dnsProvider?: string
    checkedAt?: number
    redirectTo?: string
    move?: boolean
    acmCertificateArn?: string
    statusPageId?: string
    redirectAway?: boolean
    servedBy?: string
    checkoutFor?: string
  }
}
DELETE/v1/orgs/:orgId/domains/:hostname

Removes a custom domain: its route and its certificate.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • hostname

    The custom domain.

Errors

  • 404Domain not found
  • 409This domain belongs to another app. Change or remove it there.
  • 409… redirects to this domain. Change that first.
curl -X DELETE 'https://api.cactive.ai/v1/orgs/{orgId}/domains/{hostname}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

GET/v1/orgs/:orgId/integrations/cloudflare

Whether Cloudflare is connected (by sign-in or API token), the zones it can see, whether a sign-in grant expired, and whether sign-in is available. Credentials are never returned.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

curl 'https://api.cactive.ai/v1/orgs/{orgId}/integrations/cloudflare' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200

{
  connected: boolean
  kind: null | "token" | "oauth"
  zones: string[]
  connectedAt?: number
  expired: boolean
  oauth: boolean
}
POST/v1/orgs/:orgId/integrations/cloudflare/authorize

Starts the OAuth flow: stores a one-time state and returns Cloudflare's authorize URL.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • returnTostring

    Up to 500 characters.

  • offlineboolean

    Default true.

Errors

  • 403Connecting Cloudflare needs a signed-in user.
  • 501Cloudflare sign-in isn't available. Use an API token instead.
curl -X POST 'https://api.cactive.ai/v1/orgs/{orgId}/integrations/cloudflare/authorize' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "returnTo": "example",
    "offline": true
  }'
Send it from this page with your session or a key.

Response 200

{
  url: string
}
POST/v1/orgs/:orgId/integrations/cloudflare/oauth

Completes the OAuth flow. The state is consumed first (one use), then checked against this user and org. With error instead of code (the user declined), it only consumes the state and returns where to go back to; retry says to start again without offline access.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • statestringrequired

    10–300 characters.

  • codestring

    1–2,000 characters.

  • errorstring

    Up to 200 characters.

Errors

  • 422Cloudflare didn't share any zones. Choose the zones you'll use when you allow access.
  • 501Cloudflare sign-in isn't available.
curl -X POST 'https://api.cactive.ai/v1/orgs/{orgId}/integrations/cloudflare/oauth' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "state": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  connected: false
  returnTo: string
  retry: boolean
}
| {
  connected: true
  zones: string[]
  returnTo: string
  refresh: boolean
}
PUT/v1/orgs/:orgId/integrations/cloudflare

Connects a Cloudflare API token (Zone → DNS → Edit) for adding domain records. The token is checked against Cloudflare, encrypted and stored; it must see at least one zone.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • tokenstringrequired

    20–200 characters. Trimmed.

Errors

  • 400The token can't see any zones. Give it Zone → DNS → Edit on the zones you'll use.
curl -X PUT 'https://api.cactive.ai/v1/orgs/{orgId}/integrations/cloudflare' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "token": "example"
  }'
Send it from this page with your session or a key.

Response 200

{
  connected: true
  kind: string
  zones: string[]
}
DELETE/v1/orgs/:orgId/integrations/cloudflare

Disconnects Cloudflare: revokes a sign-in grant at Cloudflare (best effort) and deletes the stored credentials.

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

curl -X DELETE 'https://api.cactive.ai/v1/orgs/{orgId}/integrations/cloudflare' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 204 with no body

POST/v1/orgs/:orgId/registrar/quotes

Price a domain

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • domainstringrequired

    3–253 characters.

  • yearsinteger

    Default 1. 1–10.

Errors

  • 400Invalid input (invalid_input)
  • 401Not signed in (unauthenticated)
  • 403Not allowed
  • 404Not found, or not yours to see
  • 428A reason is required (purpose_required); state it in the purpose header
  • 429Too many requests (rate_limited); see Retry-After
  • 500Something went wrong (internal)
  • 503Try again shortly
curl -X POST 'https://api.cactive.ai/v1/orgs/{orgId}/registrar/quotes' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "domain": "example"
  }'
Send it from this page with your session or a key.

Response 200 with no body

POST/v1/orgs/:orgId/registrar/registrations

Register a domain

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Request body

  • quoteIdstringrequired

    10–80 characters.

  • domainstringrequired

    3–253 characters.

  • totalintegerrequired

    ≥ 0.

  • currencystringrequired

    3 characters.

  • phonestringrequired

    6–30 characters.

  • autoRenewboolean

    Default false.

  • acceptTermsboolean

    Default false.

Errors

  • 400Invalid input (invalid_input)
  • 401Not signed in (unauthenticated)
  • 403Not allowed
  • 404Not found, or not yours to see
  • 428A reason is required (purpose_required); state it in the purpose header
  • 429Too many requests (rate_limited); see Retry-After
  • 500Something went wrong (internal)
  • 503Try again shortly
curl -X POST 'https://api.cactive.ai/v1/orgs/{orgId}/registrar/registrations' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "quoteId": "<quoteId>",
    "domain": "example",
    "total": 1,
    "currency": "example",
    "phone": "example"
  }'
Send it from this page with your session or a key.

Response 200 with no body

GET/v1/orgs/:orgId/registrar/registrations

List registered domains

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

Errors

  • 400Invalid input (invalid_input)
  • 401Not signed in (unauthenticated)
  • 403Not allowed
  • 404Not found, or not yours to see
  • 428A reason is required (purpose_required); state it in the purpose header
  • 429Too many requests (rate_limited); see Retry-After
  • 500Something went wrong (internal)
  • 503Try again shortly
curl 'https://api.cactive.ai/v1/orgs/{orgId}/registrar/registrations' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200 with no body

GET/v1/orgs/:orgId/registrar/registrations/:domain

Get a registered domain

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • domain

    The mail domain, e.g. example.com.

Errors

  • 400Invalid input (invalid_input)
  • 401Not signed in (unauthenticated)
  • 403Not allowed
  • 404Not found, or not yours to see
  • 428A reason is required (purpose_required); state it in the purpose header
  • 429Too many requests (rate_limited); see Retry-After
  • 500Something went wrong (internal)
  • 503Try again shortly
curl 'https://api.cactive.ai/v1/orgs/{orgId}/registrar/registrations/{domain}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
Send it from this page with your session or a key.

Response 200 with no body

PATCH/v1/orgs/:orgId/registrar/registrations/:domain

Change a domain's auto-renew

Auth
A person's token or an API key, as Authorization: Bearer.
Get an API key

Path parameters

  • orgId

    Organization id (org_…).

  • domain

    The mail domain, e.g. example.com.

Request body

  • autoRenewbooleanrequired

Errors

  • 400Invalid input (invalid_input)
  • 401Not signed in (unauthenticated)
  • 403Not allowed
  • 404Not found, or not yours to see
  • 428A reason is required (purpose_required); state it in the purpose header
  • 429Too many requests (rate_limited); see Retry-After
  • 500Something went wrong (internal)
  • 503Try again shortly
curl -X PATCH 'https://api.cactive.ai/v1/orgs/{orgId}/registrar/registrations/{domain}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "autoRenew": true
  }'
Send it from this page with your session or a key.

Response 200 with no body