---
title: "Assign or clear an agent's policy"
method: PATCH
path: "/agents/{id}/policy"
tags: ["Agents"]
---

# Assign or clear an agent's policy

`PATCH /agents/{id}/policy`

A null or empty policyId clears the assignment.

## Path parameters

- `id` string, required

## Request body

- object
  - `policyId` union, required
    - string
    - ''
  - `expiresAt` string, date-time, nullable

## Response `200`

The agent with its updated policy assignment

- object
  - `agent` object, required
    - `id` string, required
    - `policyId` string, nullable, required
    - `status` string, required
  - `policyName` string
  - `grant` object
    - `id` string, required
    - `expiresAt` string, nullable, required

---

[API](https://skmtc.dev/catena/apis/catena-api.md) · [All operations](https://skmtc.dev/catena/apis/catena-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/catena/catena-api/revisions/4cf035dc4837/schema)
