Skip to main content
pk_live_ keys are public identifiers in HTML — they’re not credentials, domain allowlists keep them safe. Wrapped by the Python SDK and Node SDK.

Endpoints at a glance

Reference

GET /api/v1/widget-keys

List widget keys Returns metadata for every pk_live_ widget key in this account. The plaintext key value is never returned by this endpoint — only the last 8 characters and the row id. To recover a lost key, create a new one. Responses Example

POST /api/v1/widget-keys

Create a widget key (returns plaintext pk_live_ ONCE) Mints a new pk_live_ public identifier scoped to the caller’s account. The plaintext value is returned in the response body and never again — paste it into the customer’s HTML <script data-client-key="..."> attribute. Request body (application/json) Schema: handlers.CreateWidgetKeyRequest. Server-set fields (id, created_at, updated_at, …) are ignored if supplied; only the user-settable fields are shown below. Responses Example

PATCH /api/v1/widget-keys/{id}

Update or revoke a widget key Renames the key, replaces the domain allowlist, repins the agent, or revokes (disabled=true sets disabled_at=now() — idempotent). Parameters Request body (application/json) Schema: handlers.UpdateWidgetKeyRequest. Server-set fields (id, created_at, updated_at, …) are ignored if supplied; only the user-settable fields are shown below. Responses Example

DELETE /api/v1/widget-keys/{id}

Delete or soft-disable a widget key Hard-deletes the row if the key was never used; otherwise sets disabled_at=now() to preserve the audit trail. Parameters Responses Example