API Keys
beginnerCreate, list, update, and revoke API keys. Shortcut endpoints resolve organization from JWT.
List API keys
/v1/api-keysList API keys for the organization resolved from JWT.
[
{
"id": "key-uuid",
"name": "Production Backend",
"key_prefix": "ek_live_a1b2",
"environment": "live",
"scopes": [
"memory:read",
"memory:write"
],
"last_used_at": "2026-01-20T14:30:00Z",
"expires_at": null,
"created_at": "2026-01-15T10:00:00Z"
}
]curl https://api.engramma-memory.com/v1/api-keys \
-H "Authorization: Bearer $JWT_TOKEN"Create API key
/v1/api-keysCreate an API key for the organization resolved from JWT.
namestringrequiredDescriptive name for the key (1–100 characters).
environmentstringDefault: liveKey environment: live or test.
scopesarray[string] | nullPermission scopes. Null for full access.
expires_atstring | nullOptional expiration date (ISO 8601).
{
"id": "key-uuid",
"name": "Staging Environment",
"key": "ek_live_a1b2c3d4e5f6...",
"key_prefix": "ek_live_a1b2",
"environment": "live",
"scopes": [
"memory:read",
"memory:write"
],
"created_at": "2026-01-20T10:00:00Z",
"message": "Store this key securely. It will not be shown again."
}The full API key value is only shown once in this response. Store it securely immediately.
Update API key
/v1/api-keys/{key_id}Update an API key's name, scopes, or expiration.
key_idstringrequiredAPI key ID (path parameter, UUID format).
namestring | nullNew name (1–100 characters).
scopesarray[string] | nullNew scopes.
expires_atstring | nullNew expiration date.
{
"id": "key-uuid",
"name": "Staging Environment (Updated)",
"key_prefix": "ek_live_a1b2",
"environment": "live",
"scopes": [
"memory:read"
],
"last_used_at": "2026-01-20T14:30:00Z",
"expires_at": "2026-06-01T00:00:00Z",
"created_at": "2026-01-15T10:00:00Z"
}Revoke API key
/v1/api-keys/{key_id}Immediately revoke an API key.
key_idstringrequiredAPI key ID (path parameter, UUID format).
{
"message": "API key revoked"
}Revoking is immediate. All requests using this key will receive 401 errors.
Organization-scoped endpoints
These endpoints perform the same operations but require an explicit org_id path parameter instead of resolving the organization from JWT:
| Method | Path | Description |
|---|---|---|
| GET | /v1/organizations/{org_id}/api-keys | List org API keys |
| POST | /v1/organizations/{org_id}/api-keys | Create org API key |
| PATCH | /v1/organizations/{org_id}/api-keys/{key_id} | Update org API key |
| DELETE | /v1/organizations/{org_id}/api-keys/{key_id} | Revoke org API key |
See Organizations for details.
Next steps
- Authentication — Login and token management
- Organizations — Full org API key management
- Security — Audit log and sessions