viakite
Dashboard

API/Organizations/Change a member's roles and groups

Change a member's roles and groups

PATCH/v1/orgs/{org}/members/{member}

A field left out is not changed. Only an owner gives or takes away the owner role.

Secret keyNeeds members.rolesapi.vk.viabio.me

Path parameters

orgstringrequired
The organization's id (org_…).
memberstringrequired
The member's id (mem_…).

Body

rolesRoleGrant[]
A role for the whole organization (no project_ids) or for chosen projects.
Show 2 fields
rolestringrequired
A built-in role key (admin) or a custom role id (rol_…).
project_idsstring[] | null
Null or empty for the whole organization.
groupsstring[]
Group ids.

Responses

The member.

idstringrequired
A prefixed ULID; the prefix names the kind (prj_… a project, org_… an organization).
account_idstringrequired
A prefixed ULID; the prefix names the kind (prj_… a project, org_… an organization).
emailstring · emailrequired
namestringrequired
avatar_urlstringrequired
rolesRoleGrant[]required
A role for the whole organization (no project_ids) or for chosen projects.
Show 2 fields
rolestringrequired
A built-in role key (admin) or a custom role id (rol_…).
project_idsstring[] | null
Null or empty for the whole organization.
groupsGroupRef[]required
A group a member is in.
Show 2 fields
idstringrequired
A prefixed ULID; the prefix names the kind (prj_… a project, org_… an organization).
namestringrequired
created_atstring · date-timerequired
A time in UTC, ISO 8601.
Example response
1{
2 "id": "mem_01JD8Q2M4W9XK3T7B5",
3 "account_id": "acc_01JD8Q2M4W9XK3T7B5",
4 "email": "ada@example.com",
5 "name": "Production",
6 "avatar_url": "string",
7 "roles": [
8 {
9 "role": "rol_01JD8Q2M4W9XK3T7B5",
10 "project_ids": [
11 "prj_01JD8Q2M4W9XK3T7B5"
12 ]
13 }
14 ],
15 "groups": [
16 {
17 "id": "id_01JD8Q2M4W9XK3T7B5",
18 "name": "Production"
19 }
20 ],
21 "created_at": "2026-11-21T09:30:00Z"
22}

Errors

Every error has the same shape: error.code, a message for people and details.

StatusCode
403owner_required
409last_owner
422validation_error