Issue an API key for an application (key returned once)
Issue an API key for an application (key returned once): CustomDomain™ API reference in the applications group. Covers parameters, request body and responses.
Needs keys:manage (admin and above). A key minted with a member's key acts with that member's role. The workspace default key (is_default) cannot create keys (403): a key it minted would not carry its admin limit.
Long-lived tenant API key, cd_live_… (production) or cd_test_… (staging, development), stored hashed. Keys created before the switch to cd_ start with sk_live_… / sk_test_… and are still accepted. Scoped to the owning application's tenant.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/applications/string/keys" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "application_id": "string", "name": "string", "prefix": "string", "environment": "production", "scopes": [ "string" ], "is_default": true, "last_used_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z", "key": "string"}{ "code": "string", "title": "string", "details": "string"}{ "code": "billing_required", "title": "An active subscription is needed to connect new domains.", "details": "This workspace has not started its subscription yet. Domains that are already connected keep working. An owner or admin can set up billing at https://app.customdomain.ai/app/billing."}{ "code": "string", "title": "string", "details": "string"}{ "code": "string", "title": "string", "details": "string"}