Skip to content
cascadehook.docs
API referenceAPI keys

Create a project API key

Requires explicit human approval. Query parameters are rejected. dev/live labels grant the same project scope; neither is a sandbox or a restricted agent credential. Human setup should use the dashboard to obtain the initial key.

POST
/v1/api-keys

Requires explicit human approval. Query parameters are rejected. dev/live labels grant the same project scope; neither is a sandbox or a restricted agent credential. Human setup should use the dashboard to obtain the initial key.

Authorization

projectAPIKey
headerAuthorizationBearer <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.

Request Body

application/json
  1. body
name*string

Trimmed; control characters are rejected.

Length1 <= length <= 100
environment*string
Value in"dev""live"
expires_at?|

Optional future expiry; null or omitted means no expiry.

Formatdate-time

Response Body

One-time credential. Capture directly to an authorized environment; never print the response.

application/json
  1. response
key*
api_key*string

One-time credential. Never print or log it.

Match^ch_(dev|live)_[0-9a-f]{64}$
Example Request
curl -X POST 'https://api.cascadehook.com/v1/api-keys' \  -H 'Content-Type: application/json' \  -d '{  "name": "Application integration",  "environment": "dev",  "expires_at": null}'
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"  },  "api_key": "string"}