API keys
Create, list, rename and revoke API keys.
- POST /api-keys — Create an API key
- GET /api-keys — List API keys
- PATCH /api-keys/{id} — Rename an API key
- DELETE /api-keys/{id} — Revoke an API key
post/api-keys— Create an API key
20 active keys per workspace. The token is shown once.
Keys: full_access
Body
| namerequired | string | |
| permission | "full_access" | "sending_access" | "signups" | |
| domain_id | uuid | Restricts a `sending_access` key to one verified domain. |
curl -X POST https://api.smartletter.ai/api-keys \
-H "Authorization: Bearer $SMARTLETTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Website signup form","permission":"signups"}'Response 201
{
"id": "5b1f2c90-0000-4000-8000-000000000002",
"token": "sl_…"
}get/api-keys— List API keys
Keys: full_access
Query parameters
| limit | integer | 1–100, default 20. |
| after | uuid | Id of the last item of the previous page (older items). |
| before | uuid | Id of the first item of the previous page (newer items). |
curl -X GET https://api.smartletter.ai/api-keys \
-H "Authorization: Bearer $SMARTLETTER_API_KEY"Response 200
{
"object": "list",
"has_more": false,
"data": [
{
"id": "5b1f2c90-0000-4000-8000-000000000002",
"name": "Production",
"created_at": "2026-10-17T09:00:00.000Z",
"last_used_at": null
}
]
}patch/api-keys/{id}— Rename an API key
Keys: full_access
Body
| namerequired | string |
curl -X PATCH https://api.smartletter.ai/api-keys/<id> \
-H "Authorization: Bearer $SMARTLETTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Production (old)"}'Response 200
{
"object": "api_key",
"id": "5b1f2c90-0000-4000-8000-000000000002"
}delete/api-keys/{id}— Revoke an API key
Keys: full_access
curl -X DELETE https://api.smartletter.ai/api-keys/<id> \
-H "Authorization: Bearer $SMARTLETTER_API_KEY"Response 200
{
"object": "api_key",
"id": "5b1f2c90-0000-4000-8000-000000000002",
"deleted": true
}