Tenancy

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

The workspace default key is an ordinary API key (full workspace access, 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 or an admin can view it more than once. 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.

post/tenants/{tenant_id}/default-key

Request

  • Base URL: https://api.customdomain.ai/v1
  • URL: https://api.customdomain.ai/v1/tenants/{tenant_id}/default-key
  • Auth: API key in header X-Provision-Secret

Path parameters

tenant_idstring required

Response

An active default key exists; no secret

key_idstring required
prefixstring required

The stored, non-secret prefix, for example cd_live_ab12cd34.

createdboolean required

true when this call minted the key; api_key is present only then.

api_keystring

The full secret, cd_live_… or cd_test_…; shown once.

Changes

No recorded changes to this operation across all 1 revision of this API.