Skip to main content
POST
/
v1
/
projects
/
{projectId}
/
tokens
cURL
curl --request POST \
  --url https://{deployment}.convex.site/v1/projects/{projectId}/tokens \
  --header 'Content-Type: application/json' \
  --data '
{
  "label": "CI Pipeline",
  "permissions": "read"
}
'
{
  "tokenId": "tok_abc",
  "label": "CI Pipeline",
  "permissions": "read",
  "lastUsedAt": 1739712000000,
  "createdAt": 1739712000000,
  "token": "ll_xxxxxxxx"
}

Path Parameters

projectId
string
required
Minimum string length: 1
Example:

"proj_abc123"

Body

application/json
label
string
required
Minimum string length: 1
Example:

"CI Pipeline"

permissions
enum<string>
required
Available options:
read,
read_write

Response

201 - application/json

Token created successfully. The token value is shown only once.

tokenId
string
required
Example:

"tok_abc"

label
string
required
Example:

"CI Pipeline"

permissions
enum<string>
required
Available options:
read,
read_write
lastUsedAt
number | null
required
Example:

1739712000000

createdAt
number
required
Example:

1739712000000

token
string
required
Example:

"ll_xxxxxxxx"