---
title: "Save one field role's settings and replace its people"
---

> Documentation Index
> Fetch the complete documentation index at: https://developer.channelautomations.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Channel Automation API › Field Sales

`PUT /api/field-sales/field-roles/{key}`

## Path parameters

- `key` (`put/api/field-sales/field-roles/key.path.key`; string, required)
  - one of `"marketing"`, `"sales"`, `"installation"`

## Request body

- `checkin_radius_m` (`put/api/field-sales/field-roles/key.checkin_radius_m`; integer, optional)
  - min 25; max 2000
- `alert_on_site_minutes` (`put/api/field-sales/field-roles/key.alert_on_site_minutes`; integer, optional, nullable)
  - min 15; max 1440
- `member_user_ids` (`put/api/field-sales/field-roles/key.member_user_ids`; array<string>, optional)
  - format `uuid`
- `expected_member_user_ids` (`put/api/field-sales/field-roles/key.expected_member_user_ids`; array<string>, optional) — Members the editor loaded; a changed roster returns 409 roster_changed
  - format `uuid`

## Example request

```json
{
  "checkin_radius_m": 25,
  "alert_on_site_minutes": 15,
  "member_user_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "expected_member_user_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url https://api.channelautomation.com/api/field-sales/field-roles/marketing \
  --header 'Content-Type: application/json' \
  --data '
{
  "checkin_radius_m": 25,
  "alert_on_site_minutes": 15,
  "member_user_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ],
  "expected_member_user_ids": [
    "497f6eca-6276-4993-bfeb-53cbbbba6f08"
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/field-sales/field-roles/marketing';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    checkin_radius_m: 25,
    alert_on_site_minutes: 15,
    member_user_ids: ['497f6eca-6276-4993-bfeb-53cbbbba6f08'],
    expected_member_user_ids: ['497f6eca-6276-4993-bfeb-53cbbbba6f08']
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/field-sales/field-roles/marketing"

payload = {
    "checkin_radius_m": 25,
    "alert_on_site_minutes": 15,
    "member_user_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"],
    "expected_member_user_ids": ["497f6eca-6276-4993-bfeb-53cbbbba6f08"]
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Saved

### 400

Invalid input

### 403

Owners and admins only

### 409

Someone in the list is not a client team member of this workspace


Source: https://developer.channelautomations.com/api/put-api-field-sales-field-roles-key/index.md
