API referenceAPI keys
Rotate an API key
EMPTY BODY, no query parameters. Requires explicit human approval. Existing replacement/inactive key conflicts; never rotate automatically on an ambiguous response.
POST
EMPTY BODY, no query parameters. Requires explicit human approval. Existing replacement/inactive key conflicts; never rotate automatically on an ambiguous response.
projectAPIKeyheader
AuthorizationBearer <ch_dev_ or ch_live_ project API key>Read CASCADEHOOK_API_KEY from the local environment. Never print keys or headers. Scope is the project selected when the key was created.
api_key_id*stringFormat
uuidOne-time replacement key; previous key remains usable for five minutes.
application/json- response
key*previous_key_id*stringFormat
uuidprevious_key_revokes_at*stringFormat
date-timeapi_key*stringOne-time replacement credential. Never print or log it.
Match
^ch_(dev|live)_[0-9a-f]{64}$curl -X POST 'https://api.cascadehook.com/v1/api-keys/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate'Example Response
{ "key": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9", "name": "string", "prefix": "string", "environment": "dev", "status": "active", "created_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "revoked_at": "2019-08-24T14:15:22Z", "revokes_at": "2019-08-24T14:15:22Z", "rotated_to_id": "d8c8cef8-46b3-4daa-a787-79dc60305000", "created_by_api_key_id": "16a8c1ea-aaaf-49f0-9266-c657c48ceff3", "revoked_by_api_key_id": "3555c307-5cc9-4766-a644-97d41de57b76", "created_by_user_id": "209f54c4-4c33-43bc-9c6a-ef4c65ad7473", "revoked_by_user_id": "476f4cfa-afa8-454d-aad0-b6469f18e9fa" }, "previous_key_id": "aa030fec-c1d9-4437-b53a-c0391ab80485", "previous_key_revokes_at": "2019-08-24T14:15:22Z", "api_key": "string"}