Menu
Create Token
Create a new token for the project
POST
/projects/{projectId}/tokensUse it in a workflow
- Add a step and choose the Sanity connector.
- Pick the Create Token action (under Projects).
- Fill in the fields below, then reference the result from later steps as
{{createToken.response.data}}.
Request
Path parameters
Query parameters
Request body
Enter the body as JSON in the step's Body field.
{
"label": "string",
"roleName": "string",
"roleNames": [
"string"
]
}
Response
Returns 201 with an object. Read it in later steps with {{createToken.response.data.<field>}}.
{
"id": "string",
"label": "string",
"key": "string",
"projectUserId": "string",
"roles": [
{
"name": "string",
"title": "string"
}
]
}
Need more? See the Sanity guide for connection setup and behaviour shared by every action.
Was this page helpful?