Create an Agent API token
Create an Agent API token for remote workers.
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
organizationId
The ID of the organization that owns the deployment where you want to create the Agent API token.
deploymentId
The ID of the deployment where you want to create the Agent API token.
Request
This endpoint expects an object.
name
The name of the API token.
description
The description for the API token.
tokenExpiryPeriodInDays
The expiry period of the API token in days. If not specified, the token will never expire.
Response
OK
createdAt
The time when the API token was created in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.
description
The description of the API token.
id
The API token's ID.
kind
The kind of the API token.
name
The name of the API token.
scope
The scope of the API token.
shortToken
The short value of the API token.
startAt
The time when the API token will become valid in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.
updatedAt
The time when the API token was last updated in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.
createdBy
endAt
The time when the API token expires in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.
expiryPeriodInDays
The expiry period of the API token in days.
lastRotatedAt
The time when the API token was last rotated in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.
lastUsedAt
The time when the API token was last used in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.
roles
The roles of the API token.
token
The value of the API token.
updatedBy
Errors
400
Create Agent Token Body Bad Request Error
401
Create Agent Token Body Unauthorized Error
403
Create Agent Token Body Forbidden Error
404
Create Agent Token Body Not Found Error
500
Create Agent Token Body Internal Server Error