Account Memberships
List of valid attributes:
| Attribute | Description | Specifics |
|---|---|---|
| user_id | ID of the user for which to change account roles | Must be provided |
| role_ids | List of roles the user should have on account | Parameter must be provided, Can be empty |
Create
Section titled “Create”Example request:
{ "data": { "type": "account_membership", "attributes": { "user_id": "a484f7c0-09b9-46e6-9434-b050e5598174", "role_ids": [] } }}Example response:
{ "data": [ { "id": "a484f7c0-09b9-46e6-9434-b050e5598174", "type": "user", "attributes": { ... } } ]}This endpoint adds or removes account-roles to a user.
A successful request creates one account_audit_log per role added
(resource_type: account_membership, action_type: created) and one per role
removed (action_type: deleted). Roles that stay unchanged are not logged. The
acting user is stored as actor_id. Each entry records role_id, role_name,
user_id, user_name and user_email. Failed requests do not create audit
entries.
HTTP Request
Section titled “HTTP Request”POST /api/v1/account_memberships
Create account memberships for all users
Section titled “Create account memberships for all users”Example response:
{ "data": { "id": "1e9f83a6-51a7-445a-bd6e-5e0350f24c93", "type": "role", "attributes": { ... } }}This endpoint creates account memberships for a given role for all users. The request body has to be empty.
A successful request creates one account_audit_log per user newly assigned to
the role (resource_type: account_membership, action_type: created),
including restored memberships. Users who already have the role are not logged.
The snapshot and actor are the same as Create.
HTTP Request
Section titled “HTTP Request”POST /api/v1/account_roles/:account_role_id/assign_all
URL Parameters
Section titled “URL Parameters”| Parameter | Description |
|---|---|
| account_role_id | ID of the role to which all users will be assigned |