Skip to main content
POST
/
api
/
v1
/
accounts
/
{accountId}
/
roles
/
assignments
Assign a role to a user
curl --request POST \
  --url https://api.aion.xyz/api/v1/accounts/{accountId}/roles/assignments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "assigneeId": "john.doe",
  "assigneeType": "USER",
  "roleId": "project_admin",
  "projectId": "project-alpha"
}
'
{
  "assigneeId": "jane.smith",
  "assigneeType": "USER",
  "roleId": "account_admin",
  "status": "ACTIVE",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.aion.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

JWT Bearer token authentication

Path Parameters

accountId
string
required

The account identifier (external account ID)

Example:

"my-company-account"

Body

application/json
assigneeId
string
required

Assignee identifier (external user/group ID)

Example:

"john.doe"

assigneeType
enum<string>
required

The type of assignee

Available options:
USER,
IAMGROUP
roleId
string
required

Role identifier to assign

Example:

"project_admin"

projectId
string

Project identifier (required for PROJECT scoped roles, must be empty for ACCOUNT scoped roles)

Example:

"project-alpha"

Response

Role successfully assigned

assigneeId
string
required

Assignee identifier (external user/group ID)

Example:

"jane.smith"

assigneeType
enum<string>
required

The type of assignee

Available options:
USER,
IAMGROUP
roleId
string
required

Role identifier

Example:

"account_admin"

status
enum<string>
required

The status of the role assignment

Available options:
ACTIVE,
INACTIVE
createdAt
string<date-time>
required
updatedAt
string<date-time>
required