---
title: "Update a team member's role."
method: PUT
path: "/api/v1/teams/members/{userId}"
tags: ["Team Members"]
---

# Update a team member's role.

`PUT /api/v1/teams/members/{userId}`

## Request

- Base URL: `https://app.customgpt.ai`
- URL: `https://app.customgpt.ai/api/v1/teams/members/{userId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/poll-the-people/apis/customgpt-ai/docs/api/v1/teams/members/:userId/put.ts> (a function with typed inputs; its response is checked against the schema)

Changes the role assigned to a team member. Only the team owner or a member with the appropriate permission can perform this action.

## Path parameters

- `userId` integer, required

## Request body

- object
  - `role_id` integer: Role ID to assign to the member

## Response `200`

Team member retrieved successfully

- object
  - `status` 'error' | 'success': The status of the response
  - `data` TeamMember
    - `user_id` integer: User ID
    - `name` string: Member name
    - `email` string, email: Member email address
    - `role_id` integer: The Spatie role assigned to this member within the team
    - `created_at` string, date-time: When did this member join the team?

## Other responses

- `400`: Bad Argument
- `401`: API Token is either missing or invalid
- `500`: Internal Server Error

## Changes

- **2026-11-03** `77aab4354382`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/poll-the-people/apis/customgpt-ai/changes/api/v1/teams/members/:userId/put.md)

---

[API](https://skmtc.dev/poll-the-people/apis/customgpt-ai.md) - [All operations](https://skmtc.dev/poll-the-people/apis/customgpt-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/poll-the-people/apis/customgpt-ai/revisions/77aab4354382?raw)
