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
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.
HTTP Request
POST /api/v1/account_memberships
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.
HTTP Request
POST /api/v1/account_roles/:account_role_id/assign_all
URL Parameters
| Parameter | Description |
|---|---|
| account_role_id | ID of the role to which all users will be assigned |