---
title: "Assign or unassign a Sales Coach visit"
---

> 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 › Conversations

`PUT /api/field-sales/appointments/{id}/assignment`

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Path parameters

- `id` (`put/api/field-sales/appointments/id/assignment.path.id`; string, required)
  - format `uuid`

## Request body

_Required._

- `user_id` (`put/api/field-sales/appointments/id/assignment.user_id`; string, optional, nullable)
  - format `uuid`

## Example request

```json
{
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.channelautomation.com/api/field-sales/appointments/<id>/assignment' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/field-sales/appointments/<id>/assignment';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({user_id: 'a169451c-8525-4352-b8ca-070dd449a1a5'})
};

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/appointments/<id>/assignment"

payload = { "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5" }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Updated visit assignment

### 403

Workspace admin access required

### 409

Rep cannot view the contact


Source: https://developer.channelautomations.com/api/put-api-field-sales-appointments-id-assignment/index.md
