---
title: "PUT /users/{id}/role"
method: PUT
path: "/users/{id}/role"
tags: ["Users"]
---

# PUT /users/{id}/role

`PUT /users/{id}/role`

## Request

- Base URL: `https://api.axiom.co/v2`
- URL: `https://api.axiom.co/v2/users/{id}/role`
- Auth: OAuth 2
  - Authorization code: `https://accounts.google.com/o/oauth2/v2/auth`
  - Token URL: `https://www.googleapis.com/oauth2/v4/token` scopes: `users|update`
- TypeScript: <https://skmtc.dev/axiom/apis/axiom-public-api/docs/users/:id/role/put.ts> (a function with typed inputs; its response is checked against the schema)

Changes the role of a member of the organization and returns the updated user. You can't change your own role. Only owners using a personal access token (PAT) can assign `owner` or change an owner's role.

## Path parameters

- `id` string, required

## Request body

- UpdateUserRoleRequest: Object representing a user's role update request
  - `role` string, required: Role identifier to assign to the user

## Response `200`

Updated user.

- User: Represents a user in the system
  - `email` string, required: User's email address
  - `id` string, required: Unique identifier for the user
  - `name` string, required: User's full name
  - `role` UserDetailsRole, required: Detailed information about a user's role
    - `id` string, required: Unique identifier for the role
    - `name` string, required: Human-readable name of the role

## Other responses

- `403`: Insufficient permissions, you tried to change your own role, or the caller isn't allowed to assign or change the `owner` role.
- `404`: User or role not found.

## Changes

- **2026-10-16** (v2) `fbc1b8430feb`: 2 info
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`

[Operation history](https://skmtc.dev/axiom/apis/axiom-public-api/changes/users/:id/role/put.md)

---

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