Skip to main content

API Keys API

Create, list, and revoke API keys for your organization.

List API keys

GET /api/v1/organizations/:id/api-keys
curl https://app.hooklistener.com/api/v1/organizations/org_abc123/api-keys \
-H "Authorization: Bearer hklst_your_api_key"

Response:

{
"data": [
{
"id": "key_abc123",
"name": "CI/CD Pipeline",
"created_at": "2025-01-15T10:00:00Z",
"last_used_at": "2025-01-15T11:30:00Z",
"revoked_at": null
}
]
}

The API key value is never returned after creation.

Create an API key

POST /api/v1/organizations/:id/api-keys
curl -X POST https://app.hooklistener.com/api/v1/organizations/org_abc123/api-keys \
-H "Authorization: Bearer hklst_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "CI/CD Pipeline"}'

Request body:

FieldTypeRequiredDescription
namestringYesDisplay name for the key

Response: 201 Created

{
"id": "key_abc123",
"name": "CI/CD Pipeline",
"key": "hklst_a1b2c3d4e5f6g7h8i9j0...",
"created_at": "2025-01-15T10:00:00Z",
"last_used_at": null,
"revoked_at": null
}
warning

The key field is only returned on creation. Copy it immediately — it cannot be retrieved later.

Revoke an API key

DELETE /api/v1/organizations/:id/api-keys/:key_id
curl -X DELETE https://app.hooklistener.com/api/v1/organizations/org_abc123/api-keys/key_abc123 \
-H "Authorization: Bearer hklst_your_api_key"

Response: 204 No Content

Revoked keys immediately stop working for authentication.