API keys authenticate every call to the Sendook API. Use the endpoints below to automate key lifecycle management.
All routes require bearer authentication with an existing API key that has permission to manage credentials for your organization.
POST/v1/api_keys{
"name": "Production integration"
}
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable label shown in the dashboard. |
201 Created{
"id": "key_01J3Z7VMX8P4V5AQ94TZ8X6N7J",
"name": "Production integration",
"createdAt": "2024-10-10T18:35:21Z",
"revokedAt": null
// ...additional audit fields may be present
}
The secret value of the key is returned once when created—store it securely. Rotate keys periodically and revoke unused ones.
GET/v1/api_keys200 OK[
{
"id": "key_01J3Z7VMX8P4V5AQ94TZ8X6N7J",
"name": "Production integration",
"createdAt": "2024-10-10T18:35:21Z",
"revokedAt": null
},
{
"id": "key_01J3Z8BZXS0DTCNKAYNCVWYE3W",
"name": "Staging agent",
"createdAt": "2024-09-08T09:12:04Z",
"revokedAt": "2024-11-01T12:01:33Z"
}
]
Use the revokedAt timestamp to filter inactive keys in your tooling.
GET/v1/api_keys/{apiKeyId}| Parameter | Type | Description |
|---|---|---|
apiKeyId | string | Identifier returned during creation or listing. |
200 OK{
"id": "key_01J3Z7VMX8P4V5AQ94TZ8X6N7J",
"name": "Production integration",
"createdAt": "2024-10-10T18:35:21Z",
"revokedAt": null
}
DELETE/v1/api_keys/{apiKeyId}Revocation immediately prevents further use of the key.
200 OK{
"id": "key_01J3Z7VMX8P4V5AQ94TZ8X6N7J",
"name": "Production integration",
"createdAt": "2024-10-10T18:35:21Z",
"revokedAt": null
}
Attempting to revoke or fetch a key that does not belong to your organization returns a 404 or 401 depending on your permissions.