Delete a publishable key
Code Mode: praxis.customer.publishableKeys.delete
HTTP: DELETE /customer/v1/publishable_keys/{key_id}
Delete a publishable key, closing that anonymous admittance for good. A page that still carries the plaintext key can no longer exchange it; any anonymous sign-ins it already made keep working until their own sign-in expires, so end users already admitted are not signed out by this call. Get the key id from the publishable key list, not from the plaintext value (only its hash is stored). An unknown or foreign id answers 404 CUSTOMER_NOT_FOUND.
Signature
praxis.customer.publishableKeys.delete(args:{path:{key_id:string}}):Promise<{/** Object type, always customer_publishable_key_deleted. */ type?:"customer_publishable_key_deleted";/** The key id that was deleted. */ id?:string;/** Always true; the call would have failed otherwise. */ deleted?:boolean}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| key_id | path | string | yes | Publishable key id (pk_…) from publishable_keys.list, not the plaintext key value. |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | The key is gone; the response repeats its id with deleted true. |
| 400 | application/json | INVALID_PARAMS: the request is not shaped the way this face accepts — an unknown or misspelled field, a repeated query parameter, a resource scope not in the form <type>:<id>:<action>, an expand value that is not products, sign_ins or usage, or a confirm that does not repeat the path customer id. The error names the field at fault and what it accepts; correct that field and send the request again. |
| 401 | application/json | The credential is missing, malformed or expired. Merchant routes answer UNAUTHENTICATED when the API key or session names no organization; the pre-auth doors answer GRANT_CODE_INVALID when a grant code is unknown, already used, expired or foreign, and ACCESS_TOKEN_EXPIRED when the end-user token cannot be verified (a sign-in that is over answers SIGN_IN_EXPIRED or SIGN_IN_REVOKED). Send a valid API key, request a fresh grant code, or sign the end user in again. |
| 404 | application/json | CUSTOMER_NOT_FOUND: no end user of this organization has that id, or the id belongs to another organization; a deleted key answers the same way. Read the current id from customers.list (or publishable_keys.list for a key) and retry with that; never construct an id. |
| 502 | application/json | UPSTREAM_UNAVAILABLE: the token issuer or another dependency refused the call, so nothing was issued or changed. Retry later, and if it persists report the time and the request path. |
| 503 | application/json | UPSTREAM_UNAVAILABLE: this face is not usable in this environment — the CUSTOMER service binding is unwired, or the anonymous rate limiter is unavailable or misconfigured so the door fails closed. Use an environment where the face is wired, or retry when the dependency is back. |