Make an account token for the command line or an agent
post/account/tokens
Make an account token for the command line or an agent. The secret is shown once. Needs a signed-in person; a token cannot make a token.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
workspace:write- Sdk
workspace.accountToken.create- Cli
workspace account token create
Request bodyapplication/json, required
- namestringrequiredAt most 80 characters.
- scopeslist of string
- expiresInDaysintegerAt least 1. At most 365.
- organizationIdstring (uuid)
Responses
- 201application/jsonSuccess
object - 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring