Team
Change a role
Sets the member’s role to admin or agent. The owner’s role cannot be changed, and only owners can promote to admin or change an admin’s role.
- Console only: owner or admin
- Workspace:
X-Tenant-ID
Path parameters
iduuidrequiredMembership id (
idfrom the members list, notuser_id).
Headers
CookiestringrequiredThe
whatsappx_sessioncookie the app sets when you sign in. Browsers send it automatically; API keys are not accepted on this endpoint.X-Tenant-IDuuidrequiredWorkspace id. Required for session requests. You can pass
?tenant=<id>instead.
Body
application/jsonroleenumrequiredadminoragent.
Response
200 OKapplication/json
iduuidMembership id. Use it in
/api/v1/members/{id}.user_iduuidUser id. Use this one as
assignee_idwhen assigning conversations.emailstringEmail address.
namestringDisplay name.
roleenumowner,adminoragent.
Status codes
- 200OK. The updated member.
- 400Bad request.
role must be admin or agent,invalid member idorinvalid request. - 401Unauthorized. No signed-in session (
unauthorized). - 403Forbidden. API keys and non-admins are rejected (see Console only). Role rules:
only owners can promote admins,only owners can change admin roles,the workspace owner role cannot be changed. - 404Not found. No member with this id in the workspace.