# contractorOps.roles.save

Create a job role, or update one with id and expectedRevision: title, level, department, employmentType (contractor, employee or either), summary, responsibilities, requirements, an optional pay band (payCurrency, payMinMinor, payMaxMinor, payUnit) and an optional levelOrder (its place on the job's ladder). Title and level together are unique.

`POST /api/v1/accounting/contractorOps.roles.save`

Permissions: `accounting:read`, `accounting:write` · Roles: admin, finance · Idempotency key required · Send `expectedRevision`

MCP tool: `accounting_contractor_ops_roles_save`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `id` | string (ID) |  | The record's ID. |
| `expectedRevision` | integer |  | The record's current revision, from the last time you read it. If someone changed the record since, the request is refused with a conflict so you can reload and check before trying again. at most 9007199254740991; greater than 0. |
| `role` | object | Yes | A person's access level in the company. No other fields. |
| `role.title` | string | Yes | A short title. 1–200 characters. |
| `role.level` | string |  | at most 80 characters. Default `""`. |
| `role.department` | string |  | at most 120 characters. Default `""`. |
| `role.employmentType` | enum |  | One of: `contractor`, `employee`, `either`. Default `"contractor"`. |
| `role.summary` | string |  | at most 2000 characters. Default `""`. |
| `role.responsibilities` | string |  | at most 20000 characters. Default `""`. |
| `role.requirements` | string |  | at most 20000 characters. Default `""`. |
| `role.payCurrency` | string or null |  | Default `null`. |
| `role.payMinMinor` | string or null |  | An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50. Default `null`. |
| `role.payMaxMinor` | string or null |  | An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50. Default `null`. |
| `role.payUnit` | enum or null |  | One of: `hour`, `day`, `week`, `month`, `year`. Default `null`. |
| `role.levelOrder` | integer or null |  |  |
| `idempotencyKey` | string | Yes | Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match. 8–200 characters. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/contractorOps.roles.save \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "role": {
    "title": "Synthetic services agreement"
  }
}'
```

Reference page: https://app.getoatmilk.com/docs/api/contractorOps.roles.save
