Skip to main content
POST
Create access token

Authorizations

Authorization
string
header
required

Body

application/json
name
string

A human-friendly name for the access token

description
string

A description for the access token

role
enum<string>

Base role for the token

Available options:
reader,
writer,
admin
customRoleIds
string[]

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

inlineRole
object[]

A JSON array of statements represented as JSON objects with three attributes: effect, resources, actions. May be used in place of a role.

serviceToken
boolean

Whether the token is a service token

defaultApiVersion
integer

The default API version for this token

Response

Access token response

_id
string
required

The ID of the access token

Example:

"61095542756dba551110ae21"

ownerId
string
required

The ID of the owner of the account for the access token

Example:

"569f514156e003339cfd3917"

memberId
string
required

The ID of the member who created the access token

Example:

"569f514183f2164430000002"

creationDate
integer<int64>
required

Timestamp of when the access token was created

Example:

"1628001602644"

lastModified
integer<int64>
required

Timestamp of the last modification of the access token

Example:

"1628001602644"

The location and content type of related resources

Example:
_member
object

Details on the member who created the access token

name
string

A human-friendly name for the access token

Example:

"Example reader token"

description
string

A description for the access token

Example:

"A reader token used in testing and examples"

customRoleIds
string[]

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

Example:
inlineRole
object[]

An array of policy statements, with three attributes: effect, resources, actions. May be used in place of a role.

Example:
role
string

Base role for the token

Example:

"reader"

token
string

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

Example:

"1234"

serviceToken
boolean

Whether this is a service token or a personal token

Example:

false

defaultApiVersion
integer

The default API version for this token

Example:

20240415

lastUsed
integer<int64>

Timestamp of when the access token was last used

Example:

"0"

expiry
integer<int64>

Timestamp of when the access token expires. Omitted when the token has no expiry.

Example:

"1735689600000"