# Update a role

Update a curated set of role fields. Scope: roles:write.

Updates a curated subset of a role's fields. **Scope:** `roles:write`. Requires employer-write authority in the role's organization (admins bypass). Pipeline structure, fit criteria, confidentiality, and assignment fields are intentionally excluded — those stay on the internal product. Send only the fields you want to change.

## Path parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `id` | string | The role id. |

## Request body

| Field | Type | Description |
| --- | --- | --- |
| `name` | string | Role title. |
| `status` | string | Role status. |
| `priority` | string \| null | Priority. |
| `department` | string \| null | Department. |
| `location` | string \| null | Location. |
| `workType` | string \| null | remote / hybrid / onsite. |
| `salaryMin` / `salaryMax` | integer \| null | Salary band. |
| `salaryCurrency` / `salaryPeriod` | string \| null | Salary currency / period. |
| `targetHireCount` | integer \| null | Target hires. |
| `roleLevel` | string \| null | Seniority. |
| `isPublic` | boolean | Whether the role is public. |

## Example request

```bash
curl -X PATCH https://app.talent-ray.com/api/v1/roles/role_eng_be \
  -H "Authorization: Bearer tr_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "status": "open", "priority": "high", "salaryMax": 130000 }'
```

## Response

`200 OK` — the updated role (same shape as [Get a role](/docs/api/pipeline/roles-get/)).

## Status codes

| Status | Meaning |
| --- | --- |
| `200` | Updated. |
| `400` | `bad_request` — invalid or empty body. |
| `401` | No valid API key. |
| `403` | `insufficient_scope` (missing `roles:write`) or `forbidden` (no write authority in the role's org). |
| `404` | Not found, or not visible to the key. |
| `429` | Rate limit exceeded. |