Skip to content
UpVoiced Docs

API reference

API keys

API key management. Dashboard session only: an API key cannot create or revoke keys.

Set up the SDK client used in the examples

Dashboard session only (API keys get 403 session_required):

import { UpVoiced } from '@upvoiced/sdk';

// Dashboard-session operations: the Clerk session token of a signed-in operator.
const upvoiced = new UpVoiced({
  headers: { authorization: `Bearer ${sessionToken}` },
  workspace: workspaceId,
});

curl examples read $UPVOICED_API_KEY and $UPVOICED_WORKSPACE_IDfrom your shell. MCP examples are the tools/call request an MCP client sends to the MCP server with the same API key.

GET/v1/api-keys

List the workspace's API keys (prefix, scopes, last used; never the key)

Authentication
Dashboard session only (API keys get 403 session_required)
Operation id
listApiKeys
Headers
NameTypeRequired
x-workspacestring (uuid)Yes
Response 200: 15 fields
Response 200 (application/json)
NameTypeRequired
itemsarray of objectYes
items[].idstring (uuid)Yes
items[].namestringYes
items[].prefixstringpattern ^uv_(live|test)_[0-9a-f]{12}$Yes
items[].environment"live" | "test"Yes
items[].scopesarray of "read" | "write" | "admin"items 1–3Yes
items[].access"workspace" | "all"Yes
items[].created_byobjectYes
items[].created_by.idstring (uuid)Yes
items[].created_by.namestringYes
items[].created_atstring (date-time)Yes
items[].expires_atstring (date-time) | nullYes
items[].last_used_atstring (date-time) | nullYes
items[].revoked_atstring (date-time) | nullYes
next_cursornullYes

Errors: 400, 401, 403, 404, 409, 413, 422, 429, 500, 503, all in the standard error shape.

curl
curl 'https://api.upvoiced.com/v1/api-keys' \
  -H "Authorization: Bearer $UPVOICED_SESSION_TOKEN" \
  -H "X-Workspace: $UPVOICED_WORKSPACE_ID"
TypeScript SDK
const data = await upvoiced.get('/v1/api-keys');
MCP

No MCP tool for this operation. The MCP server covers the everyday reads and writes.

POST/v1/api-keys

Create an API key; the key is in this response only

Authentication
Dashboard session only (API keys get 403 session_required)
Operation id
createApiKey
Idempotency
Send an Idempotency-Key to make retries safe.
Headers
NameTypeRequired
x-workspacestring (uuid)Yes
idempotency-keystringpattern ^[A-Za-z0-9_.:-]{8,128}$No
Request body (JSON)
NameTypeRequired
namestringlength 1–100Yes
scope"read" | "write" | "admin"Yes
access"workspace" | "all"default "workspace"No
expires_atstring (date-time) | nulldefault nullNo
Response 201: 14 fields
Response 201 (application/json)
NameTypeRequired
idstring (uuid)Yes
namestringYes
prefixstringpattern ^uv_(live|test)_[0-9a-f]{12}$Yes
environment"live" | "test"Yes
scopesarray of "read" | "write" | "admin"items 1–3Yes
access"workspace" | "all"Yes
created_byobjectYes
created_by.idstring (uuid)Yes
created_by.namestringYes
created_atstring (date-time)Yes
expires_atstring (date-time) | nullYes
last_used_atstring (date-time) | nullYes
revoked_atstring (date-time) | nullYes
secretstring | nullpattern ^uv_(live|test)_([0-9a-f]{12})_([0-9A-Za-z]{43})$Yes

Errors: 400, 401, 403, 404, 409, 413, 422, 429, 500, 503, all in the standard error shape.

curl
curl -X POST 'https://api.upvoiced.com/v1/api-keys' \
  -H "Authorization: Bearer $UPVOICED_SESSION_TOKEN" \
  -H "X-Workspace: $UPVOICED_WORKSPACE_ID" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Example",
  "scope": "read"
}'
TypeScript SDK
const data = await upvoiced.post('/v1/api-keys', { body: { name: 'Example', scope: 'read' } });
MCP

No MCP tool for this operation. The MCP server covers the everyday reads and writes.

DELETE/v1/api-keys/{id}

Revoke an API key (effective on the next request; idempotent)

Authentication
Dashboard session only (API keys get 403 session_required)
Operation id
revokeApiKey
Path parameters
NameTypeRequired
idstring (uuid)Yes
Headers
NameTypeRequired
x-workspacestring (uuid)Yes
Response 200: 13 fields
Response 200 (application/json)
NameTypeRequired
idstring (uuid)Yes
namestringYes
prefixstringpattern ^uv_(live|test)_[0-9a-f]{12}$Yes
environment"live" | "test"Yes
scopesarray of "read" | "write" | "admin"items 1–3Yes
access"workspace" | "all"Yes
created_byobjectYes
created_by.idstring (uuid)Yes
created_by.namestringYes
created_atstring (date-time)Yes
expires_atstring (date-time) | nullYes
last_used_atstring (date-time) | nullYes
revoked_atstring (date-time) | nullYes

Errors: 400, 401, 403, 404, 409, 413, 422, 429, 500, 503, all in the standard error shape.

curl
curl -X DELETE 'https://api.upvoiced.com/v1/api-keys/0190f5e2-4c1d-7a3b-8c2d-5e6f7a8b9c0d' \
  -H "Authorization: Bearer $UPVOICED_SESSION_TOKEN" \
  -H "X-Workspace: $UPVOICED_WORKSPACE_ID"
TypeScript SDK
const data = await upvoiced.delete('/v1/api-keys/{id}', { path: { id: '0190f5e2-4c1d-7a3b-8c2d-5e6f7a8b9c0d' } });
MCP

No MCP tool for this operation. The MCP server covers the everyday reads and writes.