---
title: "Update a member"
method: PATCH
path: "/members/{memberId}"
tags: ["Members"]
---

# Update a member

`PATCH /members/{memberId}`

## Request

- Base URL: `https://api.spoke.com/public/v1`
- URL: `https://api.spoke.com/public/v1/members/{memberId}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/spoke/apis/spoke-api/docs/members/:memberId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates a member from your team.

## Path parameters

- `memberId` string, required

## Request body

- object: The request body for updating a member.
  - `name` string, nullable: The member's full name
  - `displayName` string, nullable: The name displayed for the member in the UI
  - `role` 'admin' | 'depot-manager' | 'dispatcher' | 'read-only', nullable: The operational role given to the member.
  - `depots` string[], nullable: The depot IDs associated with the member in the format `depots/<id>`, duplicates will be ignored. If set to null or not provided, the team's Main depot will be set as member depot.

## Response `200`

The updated member

- MemberSchema: A dashboard member.
  - `id` string, required
  - `name` string, nullable, required: The name of the member.
  - `email` string, nullable, required: The email of the member.
  - `phone` string, nullable, required: The phone number of the member.
  - `linkedDriverId` string, required
  - `displayName` string, nullable, required: The display name of the member.
  - `active` boolean, required: Whether the member membership is active or paused.
  - `depots` string[], required: Depots associated with the member.
  - `roles` string[], required: The role(s) given to the member.

## Other responses

- `400`: Failed to validate the request
- `401`: Unauthorized
- `404`: The provided member id does not exist
- `422`: Failed to update member.
- `500`: An internal server error occurred
- `default`: The default error model

---

[API](https://skmtc.dev/spoke/apis/spoke-api.md) - [All operations](https://skmtc.dev/spoke/apis/spoke-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spoke/apis/spoke-api/revisions/a09d9194ae1c?raw)
