Grant an API token one organisation

Needs permission api-token:write.

Idempotent, and safe to use concurrently: two administrators adding two different organisations both succeed, where two declarative replaces would have one overwrite the other. The body is optional: roleId gives the token that role there; leave it out to keep its role, or to give your account's default role on an organisation it did not reach. Giving a token a role needs a caller who manages API tokens where it applies (403 access_management_denied otherwise; a person or an API token alike), and the role's permissions must be ones you hold (403 role_assignment_denied). A role for people only answers 400 role_not_assignable, and while only Administrator can be given out any other role answers 400 role_not_yet_available. A role you leave out on access it did not have is your account's default role (GET /customer/access-settings), and administrator while only Administrator can be given out; when that default role is for people only, the token is refused with 400 role_not_assignable and you name its role. Every response lists the token's role at each place in roles.

404 when the organisation is not yours, so a credential cannot be widened to something you cannot see. Everything else the token reaches is left alone.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
string
required
Body Params

The role to give with one grant. The whole body is optional.

string | null

Leave it out to keep the role they already hold there, or, when they had no access there before, to give your
account's default role (GET /customer/access-settings; administrator while your account cannot give
roles yet).

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json