> ## Documentation Index
> Fetch the complete documentation index at: https://wordsmithai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Team Member

> Change a team member's role in the team.

> [!NOTE]
>
> **Preview.** This endpoint is available to organisations in the Wordsmith MCP pilot. Other organisations receive `403 mcp_not_enabled`. See the [preview overview](/preview).

Changes a direct member's role in a [team](/proposed/objects#organisation) to `admin` or `member`. This is the team role only. To change someone's organisation roles, use [Update Member](/api-reference/organisation/update-member).

This works on teams synced from a Slack channel too. The channel decides who is in the team, not who administers it. One exception: the person who created a synced team stays its admin, so the team always has one.

## Authentication

Requires an API key, or an OAuth token with `directory:admin`. The caller must also be an organisation admin, or hold a role with the matching permission. `directory:admin` is never granted by default. It only narrows what the person who approved it can already do, so a team admin's token can edit their own teams and nothing else. Admin changes are not available through the MCP server.

An admin of the team can also change roles in it.

## Path parameters

**team\_id** `string` *required*

The team id.

**user\_id** `string` *required*

The team member's user id.

## Body parameters

**role** `enum` *required*

`member` or `admin`.

## Response

Returns `200` with the person's team membership.

```bash cURL theme={null}
curl -X PATCH "https://api.wordsmith.ai/api/v1/teams/26fb01d1-34cc-4ec6-9823-53fdeb24c86e/members/d850a4e0-5c88-4a9c-80da-640eefde1bcd" \
  -H "Authorization: Bearer sk-ws-api1-your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{ "role": "admin" }'
```

```json Response theme={null}
{
  "user_id": "d850a4e0-5c88-4a9c-80da-640eefde1bcd",
  "role": "admin"
}
```

## Errors

| Status | `error_code` | When |
| - | - | - |
| 400 | `invalid_request_body` | `role` is missing, or is not `member` or `admin`. |
| 403 | `insufficient_scope` | The OAuth token does not hold `directory:admin`. |
| 403 | `forbidden` | The caller can see the team but cannot manage it. |
| 404 | `resource_not_found` | No team in your organisation has this id or the caller cannot see it, or `user_id` is not on the team. |
| 400 | `invalid_request_body` | The person is on the team only through a sub-team. Change their role in that sub-team, or add them here directly. |
| 400 | `team_creator_admin_is_protected` | `role` is `member` and the person created this Slack-synced team. They stay its admin. |
| 404 | `resource_not_found` | Teams are not enabled for your organisation. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.