Create access token

POST
/api/v2/tokens

Create a new access token.

Request

This endpoint expects an object.
namestringOptional

A human-friendly name for the access token

descriptionstringOptional

A description for the access token

roleenumOptional
Allowed values: readerwriteradmin

Built-in role for the token

customRoleIdslist of stringsOptional

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

inlineRolelist of objectsOptional

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

serviceTokenbooleanOptional

Whether the token is a service token

defaultApiVersionintegerOptional

The default API version for this token

Response

Access token response

_idstring

The ID of the access token

ownerIdstring

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

memberIdstring

The ID of the member who created the access token

creationDatelong

Timestamp of when the access token was created

lastModifiedlong

Timestamp of the last modification of the access token

_memberobjectOptional

Details on the member who created the access token

namestringOptional

A human-friendly name for the access token

descriptionstringOptional

A description for the access token

customRoleIdslist of stringsOptional

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

inlineRolelist of objectsOptional

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

rolestringOptional

Built-in role for the token

tokenstringOptional

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

serviceTokenbooleanOptional

Whether this is a service token or a personal token

defaultApiVersionintegerOptional

The default API version for this token

lastUsedlongOptional

Timestamp of when the access token was last used

Errors

Built with