SDK reference

Domains

Each route's function in the SDK, its call beside the same request in cURL.
orgDomains

GET/v1/orgs/:orgId/domains

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

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/domains' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgDomains

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.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/domains' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "hostname": "Example"
  }'
postOrgDomainsVerify

POST/v1/orgs/:orgId/domains/:hostname/verify

Checks the domain's certificate and updates its status.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/domains/{hostname}/verify' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgDomainsCloudflare

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.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/domains/{hostname}/cloudflare' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchOrgDomainsByHostname

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.

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/domains/{hostname}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "projectId": "<projectId>",
    "redirectTo": "example"
  }'
deleteOrgDomainsByHostname

DELETE/v1/orgs/:orgId/domains/:hostname

Removes a custom domain: its route and its certificate.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/domains/{hostname}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgIntegrationsCloudflare

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.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/cloudflare' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgIntegrationsCloudflareAuthorize

POST/v1/orgs/:orgId/integrations/cloudflare/authorize

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

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/cloudflare/authorize' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "returnTo": "example",
    "offline": true
  }'
postOrgIntegrationsCloudflareOauth

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.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/cloudflare/oauth' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "state": "example"
  }'
putOrgIntegrationsCloudflare

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.

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/cloudflare' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "token": "example"
  }'
deleteOrgIntegrationsCloudflare

DELETE/v1/orgs/:orgId/integrations/cloudflare

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

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/cloudflare' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
registrarQuotesCreate

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

Price a domain

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/registrar/quotes' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "domain": "example"
  }'
registrarRegistrationsCreate

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

Register a domain

Parameters and answers
curl -X POST 'https://api.cactive.com.au/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"
  }'
registrarRegistrationsList

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

List registered domains

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/registrar/registrations' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
registrarRegistrationsGet

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

Get a registered domain

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/registrar/registrations/{domain}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
registrarRegistrationsUpdate

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

Change a domain's auto-renew

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/registrar/registrations/{domain}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "autoRenew": true
  }'