Record an audit event for a change made in the console
Record an audit event for a change made in the console: CustomDomain™ API reference in the enterprise group. Covers parameters, request body and responses.
Ingest for the few mutations that happen in the customer console's own database, so the control plane never sees them. Everything the control plane changes itself is recorded by its own handler and is not accepted here. The organization, actor, address and time are derived on the server; the body names only the action, an optional target and a small before and after summary. Requires an API key whose role may manage identity settings (admin or owner); a widget JWT is refused with 403, and a 503 means the audit log is not configured on the deployment.
The console's server also records here what an operator did through its owner routes. It presents the provisioning secret in X-Provision-Secret, names the workspace in tenant_id, and may use only the user.* and workspace.* verbs listed, which a tenant key may not. The actor is recorded as operator, the reason in after.reason is required for user.disabled, user.enabled, user.sessions_revoked, user.password_reset_link_issued, workspace.features_set and user.erased and recorded when given for the others, and the answer is a 500 when the log did not take the event.
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
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
application/json
application/json
curl -X POST "https://example.com/audit" \ -H "Content-Type: application/json" \ -d '{ "action": "whitelabel.configured" }'{ "recorded": true, "action": "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" }}{ "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" }}