---
title: "PATCH /api/v1/agent/swarms/{id}/policy"
method: PATCH
path: "/api/v1/agent/swarms/{id}/policy"
tags: ["agent"]
---

# PATCH /api/v1/agent/swarms/{id}/policy

`PATCH /api/v1/agent/swarms/{id}/policy`

## Request

- Base URL: `https://composal.com` (the document declares no server; this is the origin it was published from)
- URL: `https://composal.com/api/v1/agent/swarms/{id}/policy`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- object
  - `policy` object, required

## Response `200`

The swarm's effective policy after the edit

- AgentSwarmPolicy
  - `policy` object, required
  - `budget` object, required
  - `environment` object, required
  - `scheduler_generation` integer, required

## Other responses

- `400`: Invalid agent swarm request
- `401`: Unauthorized
- `403`: Invalid agent swarm request
- `404`: Invalid agent swarm request
- `409`: Invalid agent swarm request
- `422`: Invalid agent swarm request
- `502`: Bad gateway

---

[API](https://skmtc.dev/composal/apis/vex-api.md) - [All operations](https://skmtc.dev/composal/apis/vex-api/llms.txt) - [OpenAPI document](https://skmtc.dev/composal/apis/vex-api/revisions/74298a24e040?raw)
