Skip to content

Create a PAT — the token is shown ONCE in this response

POST
/api/v1/me/tokens
curl --request POST \
--url https://example.com/api/v1/me/tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scope": "read", "allow_run_button": true, "agent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "resource_scope": { "space_ids": [], "database_ids": [] } }'
Media typeapplication/json
object
name
required
string
>= 1 characters <= 100 characters
workspace_id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
scope
string
default: admin
Allowed values: read write admin
allow_run_button
boolean
default: true
agent_id
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
resource_scope
object
space_ids
Array<string>
default: <= 50 items
database_ids
Array<string>
default: <= 50 items