API reference

Download spec
patch

Update a team member role

Changes a member's role or internal notes. Identify the member by user account UUID in the path (not the team membership record ID).

Required API key scope
members:update
/api/v1/team/members/{userId}

Code samples

curl --request PATCH \
  --url https://api.emailguard.co/api/v1/team/members/YOUR_ID \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{}'

Parameters

Path parameters

NameTypeDescription
userIdrequiredstring

User account UUID of the member to update

Request body

New role and/or notes for the member

notesstring

Internal notes about the member. Omit to leave unchanged.

rolestring

New team role (for example Owner, Admin, Member). Omit to leave unchanged. See Team roles and permissions.

Responses

200
OK
OK
codestringrequired

Machine-readable status code (for example SUCCESS or INVALID_BODY).

messagestring

Human-readable detail when the code is not SUCCESS.

400
Bad Request
Bad Request
codestringrequired

Machine-readable status code (for example SUCCESS or INVALID_BODY).

messagestring

Human-readable detail when the code is not SUCCESS.

401
Unauthorized
Unauthorized
codestringrequired

Machine-readable status code (for example SUCCESS or INVALID_BODY).

messagestring

Human-readable detail when the code is not SUCCESS.

403
Forbidden
Forbidden
codestringrequired

Machine-readable status code (for example SUCCESS or INVALID_BODY).

messagestring

Human-readable detail when the code is not SUCCESS.

404
Not Found
Not Found
codestringrequired

Machine-readable status code (for example SUCCESS or INVALID_BODY).

messagestring

Human-readable detail when the code is not SUCCESS.