API keys and workspaces
Create and revoke API keys, choose between the production and development workspace, set key expiry, and read the audit trail.
Every request to the Seqlense Monitoring API carries an API key in the
Authorization header. The key decides which organization you act for and
which workspace (production or development) you read and write.
curl -H "Authorization: Bearer sq_p_..." \
"https://monitoring.seqlense.com/api/v1/hello"{ "message": "Hello, member of acme!" }Production and development workspaces
Each organization has two fully isolated workspaces:
| Workspace | Key scope | Key prefix | Data |
|---|---|---|---|
| Production | prod | sq_p_ | Your real data. Everything created before workspaces existed lives here. |
| Development | dev | sq_d_ | A separate copy of the platform for testing. It starts empty: no identities, wallets, rules, channels, sources or history. |
The scope is fixed on the key, so a dev key can never read or change
production data, and the reverse. Nothing you send in the request can switch
workspace.
The development workspace is stored under the company identifier
<company>__dev. You will see it in a few places, for example GET /v1/hello
answers Hello, member of acme__dev! with a dev key.
Official Seqlense sources are shared: they are visible from both workspaces. Your custom sources, and the entries stored for any source, stay in the workspace they were created in.
Create a key
POST /v1/settings/api-keys with a name and a scope. The full key is in the
response only once: store it in your secret manager right away. Seqlense only
keeps a hash and the first 12 characters (ak_prefix).
curl -X POST "https://monitoring.seqlense.com/api/v1/settings/api-keys" \
-H "Authorization: Bearer YOUR_PROD_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Staging backend", "scope": "dev", "expires_in_days": 90 }'{ "status": "ok", "key": "sq_d_Xk3v9Qa7Lm2Pz8Rt4Wy6Bn1Cd5Fg0Hj3Kl9Mn7Q" }| Field | Rules |
|---|---|
name | Required. 3 to 100 characters: letters, digits, spaces and < > / : . , _ -. |
scope | Required. prod or dev. |
expires_in_days | Optional positive integer. Omit it (or send 0) for a key that never expires. |
An organization can have at most 10 active keys per workspace. Expired keys still count until you revoke them.
Create and manage keys with a production key (or from the dashboard). Keys
are stored in the workspace they are created from: a key created with a dev
key belongs to the development workspace whatever its scope, and a dev key
does not see the keys created from production.
List keys
GET /v1/settings/api-keys returns the active keys, newest first. Dates are
YYYY-MM-DD HH:MM:SS in UTC; ak_last_used_at and ak_expires_at are empty
strings when not set.
{
"keys": [
{
"ak_id": 42,
"ak_name": "Staging backend",
"ak_prefix": "sq_d_Xk3v9Qa",
"ak_scope": "dev",
"ak_created_by": 17,
"ak_created_by_name": "Alice Martin",
"ak_created_at": "2026-09-01 09:12:44",
"ak_last_used_at": "2026-09-25 07:58:10",
"ak_expires_at": "2026-12-01 09:12:44",
"ak_is_active": true
}
]
}Expiry
A key with an expiry date stops working at that date: requests made with it get
401 {"error":"Unauthorized"}. Expired keys are not removed from the list,
so compare ak_expires_at with the current time to spot them, then create a
replacement and revoke the old one.
Revoke a key
DELETE /v1/settings/api-keys?ak_id=42 deactivates the key and removes it from
the list.
curl -X DELETE -H "Authorization: Bearer YOUR_PROD_API_KEY" \
"https://monitoring.seqlense.com/api/v1/settings/api-keys?ak_id=42"{ "status": "ok" }Authentication is cached for up to 5 minutes, so a revoked key can keep
working for that long. If a key has leaked, revoke it and rotate any secret it
could reach. The call also answers ok for an ak_id that does not exist, so
check the list afterwards.
Audit logs
GET /v1/settings/audit-logs returns the audit trail of the key's workspace,
newest first: who created, updated or deleted identities, wallets, sources,
alerts, channels, API keys and more. Actions done with an API key show
"actor": "api_key" and "actor_name": "API Key #<ak_id>".
| Parameter | Description |
|---|---|
entity_type | Exact match, for example IDENTITY, WALLET, SOURCE, API_KEY. |
action | Exact match, for example CREATE, UPDATE, DELETE. |
severity | Exact match, for example INFO, WARN. |
q | Case-insensitive search in title, detail, action and actor name. |
page | 1-based, default 1. |
limit | Default 50, clamped to 1 to 200. |
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://monitoring.seqlense.com/api/v1/settings/audit-logs?entity_type=API_KEY&limit=20"{
"events": [
{
"uuid": "5d1f7a2e-3b4c-4d5e-8f60-7a8b9c0d1e2f",
"entity_type": "API_KEY",
"entity_uuid": "",
"entity_title": "Staging backend",
"action": "CREATE",
"detail": "Created dev API key 'Staging backend'",
"severity": "INFO",
"actor": "17",
"actor_name": "Alice Martin",
"created_at": "2026-09-01T09:12:44+00:00"
}
],
"total": 1,
"page": 1,
"limit": 20
}total only counts the entity_type and q filters. When you also filter on
action or severity, keep paging until a page returns fewer than limit
events.
Next steps
See the API Reference for the full
API Keys and Audit endpoints.