v5

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-02-283466592.5 MB
Access tokens

Create access token

Create a new access token.

post/api/v2/tokens

Request body

namestring

A human-friendly name for the access token

descriptionstring

A description for the access token

role'reader' | 'writer' | 'admin'

Base role for the token

customRoleIdsstring[]

A list of custom role IDs to use as access limits for the access token

serviceTokenboolean

Whether the token is a service token

defaultApiVersioninteger

The default API version for this token

Example request

{
  "inlineRole": [
    {
      "resources": [
        "proj/*:env/*:flag/*;testing-tag"
      ],
      "actions": [
        "*"
      ],
      "effect": "allow"
    }
  ]
}

Response

Access token response

_idstring required
ownerIdstring required
memberIdstring required
namestring

A human-friendly name for the access token

descriptionstring

A description for the access token

creationDateinteger required
lastModifiedinteger required
customRoleIdsObjectId[]

A list of custom role IDs to use as access limits for the access token

rolestring

Base role for the token

tokenstring

The token value. When creating or resetting, contains the entire token value. Otherwise, contains the last four characters.

serviceTokenboolean

Whether this is a service token or a personal token

_linksobject required

The location and content type of related resources

defaultApiVersioninteger

The default API version for this token

lastUsedinteger

Example response

{
  "_member": {
    "_links": {
      "self": {
        "href": "/api/v2/members/569f183514f4432160000007",
        "type": "application/json"
      }
    },
    "_id": "569f183514f4432160000007",
    "firstName": "Ariel",
    "lastName": "Flores",
    "role": "admin",
    "email": "ariel@acme.com"
  },
  "name": "Example reader token",
  "description": "A reader token used in testing and examples",
  "customRoleIds": [],
  "inlineRole": [],
  "role": "reader",
  "token": "1234",
  "_links": {
    "parent": {
      "href": "/api/v2/tokens",
      "type": "application/json"
    },
    "self": {
      "href": "/api/v2/tokens/61095542756dba551110ae21",
      "type": "application/json"
    }
  },
  "defaultApiVersion": 20240415
}