CustomDomain Docs
API referenceAPI referenceTenancy

Ensure the workspace default key exists (secret returned only when created)

ensure default api key: reference page for this CustomDomain™ API operation in the tenancy group. Covers parameters, request body, responses and error codes.

POST
/tenants/{tenant_id}/default-key

The workspace default key is an ordinary API key (cd_live_… in production) flagged is_default, at most one active per workspace, whose secret the customer console keeps sealed so the workspace's owner can view it more than once. It acts with admin authority, never owner: it cannot make, unmake or remove an owner, delete the workspace, or create API keys (403). Server to server, guarded by the provision secret like tenants:provision; a missing and a wrong secret get the same 401. With no active default key this creates one and answers 201 with the full secret ONCE in api_key. With one, it answers 200 with its id and prefix and no secret (a caller that lost its copy rotates instead). Not subject to the billing activation gate: the key adds no capability the workspace's console key does not already hold.

Authorization

provisionSecret
X-Provision-Secret<token>

Narrow secret held by the customer console's server, for signup provisioning and its other server to server calls (also accepted as a Bearer token, except on POST /audit, where a Bearer is always a tenant credential).

In: header

Path Parameters

tenant_id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/tenants/string/default-key"
{  "key_id": "string",  "prefix": "string",  "created": true,  "api_key": "string"}
{  "key_id": "string",  "prefix": "string",  "created": true,  "api_key": "string"}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}
{  "code": "account_not_verifiable",  "title": "string",  "details": "string",  "challenge": {    "value": "string",    "bits": 1,    "expires_at": "2019-08-24T14:15:22Z"  }}