Skip to content

Change a member's role

PATCH
/v1/tenants/me/members/{userId}
curl --request PATCH \
--url https://api.emite.cr/v1/tenants/me/members/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "role": "admin" }'

The new role is a system role other than owner (admin, billing_manager, accountant, issuer, viewer) or the slug of one of the company's custom roles (400 MEMBER_ROLE_INVALID otherwise). Refuses to change the owner's role (use the ownership transfer) or the caller's own role.

userId
required
string

UUID of the user whose role is changing.

Media typeapplication/json
object
role
required

New role slug. May be a system role or a custom role slug. owner is NOT assignable — use POST /transfer-ownership instead.

string
Example
admin

The member, with the new role.

Media typeapplication/json
object
userId
required

Identifier of the member's account — the :userId of PATCH / DELETE /v1/tenants/me/members/:userId and of …/:userId/revoke-sessions.

string format: uuid
email
required

Email of the account.

string
name
required

Name of the account.

string
role
required

The member's role in this company. A system role (owner, admin, billing_manager, accountant, issuer, viewer) or the slug of one of the company's custom roles (GET /v1/tenants/me/roles).

string
joinedAt
required

When the person became a member.

string format: date-time
isOwner
required

true for the company's owner — there is exactly one. The owner's role cannot be changed, nor the owner removed: ownership moves with POST /v1/tenants/me/members/transfer-ownership/request and …/confirm.

boolean
Example
{
"email": "ana@example.com",
"name": "Ana Rojas",
"role": "issuer"
}

Missing or invalid JWT.

Insufficient scope. Team management is JWT-only — API keys cannot reach these endpoints.

Member not found (MEMBER_NOT_FOUND).

Touching the owner (OWNER_TRANSFER_REQUIRED) or self (MEMBER_CANNOT_CHANGE_OWN_ROLE).