API Keys
Programmatically manage MisarMail API keys.
Create, list, and revoke API keys programmatically.
List API Keys
/api/v1/keysList your API keys. Required scope: keys:manage.
Full key values are never returned after creation — only the prefix is shown for identification.
Response fields
successbooleantrue when the request succeeded.
dataArray<object>Your API keys. Each entry includes id, name, prefix, scopes, last_used_at, and created_at.
{
"success": true,
"data": [
{
"id": "uuid",
"name": "Production Integration",
"prefix": "msk_...",
"scopes": ["send", "contacts:read"],
"last_used_at": "2026-04-13T08:42:00Z",
"created_at": "2026-01-01T00:00:00Z"
}
]
}Create an API Key
/api/v1/keysCreate a new API key. Required scope: keys:manage.
The full key is only returned once at creation. Store it securely — it cannot be retrieved again.
Request body
namestringbodyrequiredHuman-readable label for the key.
scopesstring[]bodyrequiredArray of permission scopes.
Response fields
successbooleantrue when the key was created.
dataobjectThe created key, including id, name, key (shown once), scopes, and created_at.
{
"name": "Shopify Integration",
"scopes": ["send", "contacts:write"]
}{
"success": true,
"data": {
"id": "uuid",
"name": "Shopify Integration",
"key": "msk_SHOWN_ONCE_STORE_IMMEDIATELY",
"scopes": ["send", "contacts:write"],
"created_at": "2026-04-14T10:00:00Z"
}
}Available Scopes
| Scope | Description |
|---|---|
send | Send emails and messages |
contacts:read | Read contacts and lists |
contacts:write | Create, update, delete contacts |
campaigns:read | Read campaigns |
campaigns:write | Create, update, send campaigns |
templates:read | Read templates |
templates:write | Create, update templates |
analytics:read | Read analytics |
keys:manage | Create and revoke API keys |
Revoke an API Key
/api/v1/keys/:idImmediately invalidates the key. Required scope: keys:manage. Any integrations using it will start receiving 401 errors.
Path parameters
idUUIDpathrequiredID of the key to revoke.
Response fields
successbooleantrue when the key was revoked.
{ "success": true }Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid scopes or missing name |
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 403 | FORBIDDEN | Key lacks keys:manage scope |
| 404 | NOT_FOUND | Key not found |