---
title: "Update co agents"
method: PUT
path: "/api/files/sales/{saleGuid}/coAgents"
tags: ["Sale Co Agents"]
---

# Update co agents

`PUT /api/files/sales/{saleGuid}/coAgents`

## Request

- Base URL: `https://api.skyslope.com`
- URL: `https://api.skyslope.com/api/files/sales/{saleGuid}/coAgents`
- Auth: OpenID Connect (`https://example.com/.well-known/openid-configuration`)

Replaces co-agent assignments for the specified sale. coAgentGuids must not be null; use an empty array to remove all co-agents. Returns 422 if any provided agent is not part of the subscriber, if more than 5 co-agents are supplied, or if the primary agent is included in coAgentGuids.

### Validation & Requirements
#### Required Parameters
- `saleGuid` (path, string, format=guid)
- `form` (body, object)

#### Required JSON Body Fields
- None

#### Validations
- Invalid GUID values in `*Guid`/`*Guids` fields return `422 Unprocessable Entity`.
- Invalid date values in `*date*` fields return `422 Unprocessable Entity`.
- Missing required request body returns `422 Unprocessable Entity` with `Missing request body.`.
- Additional business-rule validation may return `422` with details in the `errors` array.
- CoAgentGuids cannot be null. Use an empty array to remove all co-agents.

#### Integration Requirement
- Retrieve the corresponding `...Form` endpoint immediately before write operations to get current dynamic required fields and allowed values.

## Path parameters

- `saleGuid` string, guid, required

## Request body

- UpdateSaleCoAgentsForm
  - `coAgentGuids` string[], nullable

## Response `200`

- LinkedResponseOfUpdateSaleCoAgentsResponse
  - `value` UpdateSaleCoAgentsResponse
  - `warnings` string[], nullable
  - `links` Link[], nullable
    - `href` string, nullable
    - `rel` string, nullable
    - `method` string, nullable

## Other responses

- `404`
- `422`

---

[API](https://skmtc.dev/skyslope/apis/skyslope-api.md) - [All operations](https://skmtc.dev/skyslope/apis/skyslope-api/llms.txt) - [OpenAPI document](https://skmtc.dev/skyslope/apis/skyslope-api/revisions/77341f0c0550?raw)
