Skip to content

Revoke Key (DELETE)

DELETE /cdp/keys — the REST-conventional alias of POST /cdp/keys/revoke. Same idempotent behaviour; the target is supplied in the query string rather than the body.

DELETE /cdp/keys?id=<key-id>
ParamTypeRequiredDescription
idstringone of id / key_prefixThe key record id to revoke.
key_prefixstringone of id / key_prefixThe key prefix to revoke.
brand_idstringstaff onlyTarget brand (staff).

A target id or key_prefix is required, or the request is rejected 400.

{
"revoked": [
{
"id": "key_abc",
"key_prefix": "vyg_AbCd",
"brand_id": "brand-uuid",
"is_staff": false,
"expires_at": null,
"revoked_at": "2026-01-15T00:00:00.000Z",
"created_at": "2026-01-10T00:00:00.000Z"
}
]
}

revoked lists the records that actually transitioned active → revoked; an already-revoked or not-found target returns { "revoked": [] }.

Terminal window
curl -s -X DELETE "https://cdp.vyg.app/cdp/keys?key_prefix=vyg_AbCd" \
-H "Authorization: Bearer <session-credential>"
StatusWhen
400Neither id nor key_prefix supplied.
401Missing or invalid credential.
403An API key was used for management; a non-staff caller targeted another brand; or no connected Shopify integration resolves a scope for the brand.
405Unsupported method.
500Brand-scope resolution failed.

See Errors for the full envelope.