Skip to main content

Documentation index for AI agents: llms.txt. Every page here is also served as markdown: add .md to its address, or request it with Accept: text/markdown.

API Keys API

API key management. This page lists all 3 endpoints in the API Keys area of the Visual Sentinel REST API.

Base URL: https://visualsentinel.com. Unless an endpoint says otherwise it accepts an API key or a session cookie, see Authentication. Most error responses use the ErrorResponse shape, see Errors and Rate limits.

Endpoints

List API keys

GET /api/api-keys

Get all API keys for the organization.

Responses

  • 200: List of API keys. Body: array of ApiKey.

Create API key

POST /api/api-keys

Generate a new API key for programmatic access. Requires a paid plan: API access comes with every paid plan (Solo, Starter, Business, Agency and custom Enterprise plans).

Authentication: session cookie only. API keys are refused.

Request body (required): object.

FieldTypeRequiredDescription
namestringYesMin length 1, max length 100.
scopesarray of stringYesRequired. At least one scope, e.g. monitors:read, servers:write, * etc. Min items 1.
expiresAtstring (date-time)NoISO 8601 expiry timestamp (preferred). Takes precedence over expiresIn.
expiresInintegerNoLegacy alternative to expiresAt: number of days until the key expires. Used only when expiresAt is omitted. Minimum 1.

Responses

  • 201: API key created (key shown only once) Body: ApiKey and object.
FieldTypeRequiredDescription
keystringNoThe actual API key value (shown only once)

Delete API key

DELETE /api/api-keys

Revoke an API key.

Authentication: session cookie only. API keys are refused.

Responses

  • 200: API key deleted.

Data models

Request and response shapes these endpoints use: ApiKey.

Generated from the OpenAPI 3.1 specification at https://docs.visualsentinel.com/openapi.json, the same file the interactive reference reads.