Create service token
POST/v1/workspaces/{workspaceId}/service-tokens
Creates a new service token for the given workspace. The value field is returned exactly once in this response and is never stored — copy it immediately.
AuthorizationBearer <token>
OAuth2 authentication
In: header
Scope: workspace:admin, offline_access
workspaceId*string
Match^(wksp_)?([cC][^\s-]{8,}|[a-z0-9]+)$
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
Section titled “application/json”application/json
Section titled “application/json”application/json
Section titled “application/json”application/json
Section titled “application/json”curl -X POST "https://example.com/v1/workspaces/string/service-tokens" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'{
"data": {
"id": "string",
"type": "serviceToken",
"name": "string",
"valueHint": "string",
"createdAt": "2019-08-24T14:15:22Z",
"expiresAt": "2019-08-24T14:15:22Z",
"value": "string"
}
}