Skip to content

Create an API token​

POST
/tokens

Creates a new opaque API access token. The plaintext secret is returned only once.

Authorizations​

Request Body​

application/json
JSON
{
  
"environment": "string",
  
"environment_ids": [
  
  
"string"
  
],
  
"expire_at": "string",
  
"role": "string",
  
"scopes": [
  
  
"string"
  
],
  
"type": "string",
  
"workspace": "string"
}

Responses​

OK

application/json
JSON
{
  
"created_at": "string",
  
"deleted_at": "string",
  
"environment": "string",
  
"environment_ids": [
  
  
"string"
  
],
  
"expires_at": "string",
  
"id": "string",
  
"nick": "string",
  
"owner": "string",
  
"owner_id": "string",
  
"owner_name": "string",
  
"prn": "string",
  
"roles": "string",
  
"scopes": "string",
  
"secret": "string",
  
"type": "string",
  
"updated_at": "string",
  
"workspace": "string",
  
"workspace_user": "string"
}

Playground​

Body

Samples​

Powered by VitePress OpenAPI