Skip to content

Change a member's role or title​

PATCH
/org-admin/{slug}/members/{userId}

Moves a member to a different org role, changes their display title, or both. Send at least one of role, org_role_title_id, custom_role_title. A title is either an org_role_title_id or a custom_role_title; setting one clears the other, and null (or a blank string) for the sent field(s) clears the title. Omitting both title fields keeps the current title, including across a role change. A request that changes nothing is an idempotent no-op that still answers 200.

A title-only change follows the same hierarchy as a role change: changing your own title is always allowed; changing someone else's needs a rank above theirs, and only an owner changes an owner's.

Roles rank org_owner > org_admin > org_viewer. Rules enforced, each a 403 when broken:

  • only an org_owner may promote anyone to org_owner, or change the role of another owner;
  • nobody may change the role of a member whose role is equal to or above their own (an
    org_admin manages org_viewers, not other admins);
  • nobody may grant a role above their own.

Lowering your own role (stepping down) is always allowed. The organization's last remaining owner cannot be demoted (400) — promote another member to owner first.

A non-profit's team body. A body with title or show_on_page, or whose role is a non-profit team role (admin, fundraiser, viewer, member, or org_fundraiser, org_member), goes to the non-profit team handler instead. There role is one of those roles (org_admin and org_viewer are read as admin and viewer), title is a title from GET /org-role-titles by id or label, or free text of up to 80 characters (null or blank clears it), and show_on_page lists or hides the member on the page's team. It answers the member itself, without the data wrapper. Its refusals have the non-profit shape ({ "error": { "code", "message", "details" } }): 422 transfer_ownership for the owner role (a non-profit has one owner; use POST /org-admin/{slug}/transfer-ownership), 422 last_owner for changing the only owner's role, 422 role, title or show_on_page for a bad value, 403 above_own for a role above the caller's own, 403 forbidden for a member ranked equal to or above the caller, and 404 not_member. The older body's role: org_owner on a non-profit answers the same 422 transfer_ownership.

Requires permission: org.manage_members

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

slug*

The organization's slug (not its UUID).

Type
string
Required
Example"local-food-bank-a1b2c3"
Pattern
"^[a-z0-9][a-z0-9-]{0,254}$"
userId*

The member's profile id. A non-UUID answers 404 Member not found.

Type
string
Required
Format
"uuid"

Request Body​

application/json
JSON
{
"role": "string",
"title": "string",
"show_on_page": true,
"org_role_title_id": "board_chair",
"custom_role_title": "string"
}

Responses​

Member updated (or already as requested): { data } for the older body, the team member itself for a non-profit team body.

application/json
JSON
{
"data": {
"user_id": "string",
"role_name": "string",
"org_role_title_id": "string",
"custom_role_title": "string"
}
}

Playground​

Server
Authorization
Variables
Key
Value
Body

Samples​

Powered by VitePress OpenAPI

Built with VitePress