POST
/v1/workspaces/{workspaceId}/service-tokensCreate service tokenCreates 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.
Parameters
workspaceIdstringpathrequiredRequest body
application/json
object
namestringrequiredDisplay name for the service token.
{
"name": "string"
}Responses
object
dataobjectrequiredShow child attributes
createdAtstring · date-timerequiredexpiresAtnull | string · date-timeidstringrequirednamestringrequiredtypestringrequiredvaluestringrequiredvalueHintstringrequired{
"data": {
"createdAt": "2026-06-09T00:00:00Z",
"expiresAt": "2026-06-09T00:00:00Z",
"id": "string",
"name": "string",
"type": "serviceToken",
"value": "string",
"valueHint": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}object
errorobjectrequiredShow child attributes
codestringrequiredhintstringmessagestringrequired{
"error": {
"code": "string",
"hint": "string",
"message": "string"
}
}