POST
/
v3
/
workspaces
/
{workspaceId}
/
api-tokens
Create Workspace API Token
curl --request POST \
  --url http://127.0.0.1:3333/v3/workspaces/{workspaceId}/api-tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>"
}
'
{
  "apiToken": {
    "id": "<string>",
    "name": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "tokenPrefix": "<string>",
    "lastUsedAt": "2023-11-07T05:31:56Z",
    "expiresAt": "2023-11-07T05:31:56Z",
    "revokedAt": "2023-11-07T05:31:56Z",
    "createdByUserId": "<string>",
    "token": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspaceId
string
required

Body

application/json
name
string
required
Required string length: 1 - 255

Response

201 - application/json

Default Response

apiToken
object
required