Skip to main content

API Keys

List and revoke API keys across your organization. These endpoints are intended for security automation — for example, revoking keys belonging to a compromised account.

To create API keys interactively, navigate to the Developer Console at /developer on your Nomic instance.

All API key management endpoints require admin scopes — the API key owner must be an organization admin.

List API keys

GET /api-keys

Returns a paginated list of API keys in the organization.

Scope: admin:api-keys:read · Rate limit: Standard (300 req / min)

Query parameters

ParameterTypeRequiredDescription
limitstringNoMaximum number of results per page.
cursorstringNoPagination cursor from a previous response's nextCursor.
userIdstringNoFilter to keys owned by a specific user ID.
includeRevokedstringNoSet to "true" to include revoked keys. Omit or "false" to exclude them.

Response

{
"data": [
{
"id": "019abc12-3456-7890-abcd-ef1234567890",
"keyPrefix": "npk_abc12",
"name": "CI/CD Pipeline",
"scopes": ["developer:parse", "developer:files"],
"createdAt": "2026-02-01T10:00:00.000Z",
"lastUsedAt": "2026-04-04T18:30:00.000Z",
"expiresAt": null,
"revokedAt": null,
"user": {
"id": "019abc12-3456-7890-abcd-ef1234567891",
"email": "alice@example.com"
}
}
],
"nextCursor": "019abc12-3456-7890-abcd-ef1234567899",
"totalCount": 15
}
FieldTypeDescription
idstring (uuid)API key ID.
keyPrefixstringFirst characters of the key (e.g. npk_abc12). The full key is never returned.
namestringDisplay name given when the key was created.
scopesstring[]Scopes granted to this key.
createdAtstring (ISO 8601)When the key was created.
lastUsedAtstring (ISO 8601) or nullLast time the key was used.
expiresAtstring (ISO 8601) or nullExpiration date, or null if the key does not expire.
revokedAtstring (ISO 8601) or nullWhen the key was revoked, or null if active.
userobjectOwner of the key (id and email).

Example

curl "https://<your-domain>.nomic.ai/api/v0/api-keys?includeRevoked=true" \
-H "Authorization: Bearer $NOMIC_API_KEY"

Revoke an API key

POST /api-keys/{id}/revoke

Permanently revokes an API key. Revoked keys cannot be restored. The action is recorded in the audit log.

Scope: admin:api-keys:write · Rate limit: Write (60 req / min)

Path parameters

ParameterTypeDescription
idstring (uuid)API key ID.

Request body (optional)

FieldTypeDescription
reasonstringReason for revoking (recorded in audit log).

Response

{
"success": true,
"apiKey": {
"id": "019abc12-3456-7890-abcd-ef1234567890",
"keyPrefix": "npk_abc12",
"revokedAt": "2026-04-05T12:00:00.000Z"
}
}

Errors

StatusCause
401Missing or invalid API key.
403API key lacks admin:api-keys:write scope, or key owner is not an admin.
404API key not found.
409Key is already revoked.

Example

curl -X POST "https://<your-domain>.nomic.ai/api/v0/api-keys/019abc12-3456-7890-abcd-ef1234567890/revoke" \
-H "Authorization: Bearer $NOMIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reason": "Rotating credentials" }'