---
title: "Update Website Member Role"
method: PATCH
path: "/api/v1/websites/{website_id}/members/{user_id}"
tags: ["Team Management"]
---

# Update Website Member Role

`PATCH /api/v1/websites/{website_id}/members/{user_id}`

## Request

- Base URL: `https://api.athenahq.ai`
- URL: `https://api.athenahq.ai/api/v1/websites/{website_id}/members/{user_id}`
- Auth: API key in header `x-api-key`

Updates a website member's role. Accepts a global API key, or a website-scoped key if the website is included in the key's allowlist and the key's creator is an Admin of that website. Cannot be used to modify the API key's owning user or the organization owner.

## Request body

- UpdateMemberRoleRequest: Request body for updating a member's role
  - `role` 'admin' | 'viewer', required: The new role to assign to the member

## Response `200`

Member role updated successfully

- object
  - `success` boolean, required
  - `member` WebsiteMember, required: A user's membership in a specific website
    - `user_id` string, uuid, required: Unique identifier of the user
    - `website_id` string, uuid, required: Unique identifier of the website
    - `role` 'admin' | 'viewer', required: The member's role on this website

## Other responses

- `400`: Bad request - Invalid body or path parameters
- `401`: Unauthorized - Invalid or missing API key
- `403`: Forbidden - Unauthorized website access, self-modification, or owner modification
- `404`: Not found - Website member does not exist
- `500`: Internal server error

---

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