API Keys Resource

Description

Securely generate and manage API keys used by organizations to authenticate webhook requests and access platform resources programmatically

API Key Document Format

{
  "keyHash": string,
  "name": string,
  "createdAt": number,
  "expiresAt"?: number,
  "revoked": boolean,
  "lastUsedAt"?: number
}

Create API Key - (Org Admin)

POST /organizations/:orgId/api-keys

Example Request:

{
  "name": "Webhook Key",
  "expiresAt": 1753200000000
}

Example Response (201 Created):


Get All API Keys (Metadata Only)

GET /organizations/:orgId/api-keys

Example Response (200 OK):


Get API Key by ID (Metadata Only)

GET /organizations/:orgId/api-keys/:keyId

Example Response (200 OK):


Revoke API Key

PATCH /organizations/:orgId/api-keys/:keyId

Example Request:

Example Response (200 OK):


Delete API Key

DELETE /organizations/:orgId/api-keys/:keyId

Example Response (200 OK):

Last updated