Skip to main content
POST
TypeScript SDK

Authorizations

Authorization
string
header
required

Enter ApiKey <your-api-key> in Authorization, including the ApiKey prefix. In cURL and Python samples, <api-key> means this full value. The TypeScript SDK adds the prefix for you.

Path Parameters

projectId
string
required

Project ID with prefix pp..

Pattern: ^pp\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Body

application/json
preset
enum<string>
required

A named permission set: read (Read everything), write (Read and write, no spending), deploy (Read, write and launch runs that spend money), labeling-read (Data labeling: read), labeling-write (Data labeling: read and write, no spending), labeling-deploy (Data labeling: read, write and launch pipelines).

Available options:
read,
write,
deploy,
labeling-read,
labeling-write,
labeling-deploy
expiresInSeconds
integer

Token lifetime in seconds, from 60 to 21600; defaults to 21600.

Required range: 60 <= x <= 21600
projectIds
string[]

Further projects the token may act in; the project in the path is always included. All projects must belong to the same team.

Maximum array length: 20

Project ID with prefix pp..

Pattern: ^pp\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Response

Token issued

expiresAt
string<date-time>
required

When the token stops working.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
id
string
required

Public handle of the token; use it to revoke without holding the secret.

Pattern: ^pst\.[0-9a-f]{8}-[0-9a-f]{4}-[7][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
token
string
required

The access token. Returned only when created; save it before closing the response.