Skip to content
datasquares.aiSign inStart free

REST API

API: API Keys

Programmatic access credentials. All endpoints require authentication unless noted. 6 endpoints.

List your API keys

Responses: 200 · 400 · 401

Generate a new API key

Request body (JSON)

Field Type Required Description
name string yes
scopes string no Comma-separated scopes: read (view and read-only queries), write (create, change, delete), admin (both), or named scopes such as source:read, dashboard:write, query:execute. AI features (the chat, Explain with AI, Analyze with a narrative, Summarize and the other AI actions) are available in the DataSquares app only: no scope lets a key use them, and an AI scope such as ai_chat:view is refused. A key never exceeds its owner’s role. Send the key in the X-API-Key header.
expiresInDays integer no Key lifetime in days (default 90; keys always expire)

Responses: 201 · 400 · 401 · 409

Delete an API key

Path parameters

Name Type Required Description
id string yes

Responses: 204 — No content · 401 · 404

Deactivate an API key

Path parameters

Name Type Required Description
id string yes

Responses: 204 — No content · 401 · 404

Reactivate an API key

Path parameters

Name Type Required Description
id string yes

Responses: 204 — No content · 401 · 404

Delete multiple API keys in bulk

Request body (JSON)

Field Type Required Description
ids array of string yes

Responses: 200 · 400 · 401 · 404