Skip to main content
POST
Create a scoped workspace API key

Authorizations

social_session
string
cookie
required

Path Parameters

workspaceId
string<uuid>
required

Opaque workspace identifier

Body

application/json
name
string
required
Required string length: 1 - 160
scopes
enum<string>[]
required
Required array length: 1 - 5 elements
Available options:
references:read,
references:write,
ingestions:read,
ingestions:write,
media:read
expiresAt
string | null
Pattern: ^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$

Response

API key created with one-time secret

id
string
required
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
name
string
required
Required string length: 1 - 160
prefix
string
required
Required string length: 6 - 24
scopes
enum<string>[]
required
Required array length: 1 - 5 elements
Available options:
references:read,
references:write,
ingestions:read,
ingestions:write,
media:read
createdAt
string
required
Pattern: ^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$
expiresAt
string | null
required
Pattern: ^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$
revokedAt
string | null
required
Pattern: ^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$
lastUsedAt
string | null
required
Pattern: ^\d{4}-(0[1-9]|1[0-2])-([0-2]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$
secret
string
required
Required string length: 32 - 256