---
search:
  tags:
    - Roles & access
    - PUT
seo:
  description: >-
    Sets or replaces the user's primary institution-level role (no course
    scope). Reference for the PUT /users/{id}/primary-role endpoint in the Fuxam
    API v4.
sidebar:
  label: Set primary organisation role
  badge: PUT
title: Set primary organisation role
type: openapi-operation
---
Sets or replaces the user's primary institution-level role (no course scope).

`PUT /users/{id}/primary-role`

**Request body** (`application/json`, required)

- `roleId` (string, required)

Request body example:

```json
{
  "roleId": "string"
}
```

**Responses**

- `200` — Primary role set
- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `429` — Too Many Requests — 1000 requests per minute per institution. Includes \`X-RateLimit-Limit\`, \`X-RateLimit-Remaining\`, \`X-RateLimit-Reset\` (ISO-8601), and \`Retry-After\` (seconds).
- `500` — Internal Server Error

Response example, 200:

```json
{
  "data": {
    "assignmentId": "string",
    "userId": "string",
    "roleId": "string",
    "institutionId": "string"
  },
  "meta": {
    "requestId": "req_1234567890_abc",
    "timestamp": "2026-06-02T07:00:00.000Z",
    "version": "v4",
    "watermark": "2019-08-24T14:15:22Z"
  }
}
```
