---
title: "Update Agent scopes and policy"
method: PATCH
path: "/api/v1/agents/{agentId}"
---

# Update Agent scopes and policy

`PATCH /api/v1/agents/{agentId}`

## Request

- Base URL: `https://workers.miniurl.com`
- URL: `https://workers.miniurl.com/api/v1/agents/{agentId}`
- Auth: HTTP bearer

## Path parameters

- `agentId` string, required

## Request body

- AgentIdentityUpdateRequest
  - `name` string
  - `description` string, nullable
  - `status` 'active' | 'revoked'
  - `scopes` string[]
  - `policy` object
    - `allowed_link_domains` string[]
    - `allowed_destination_hosts` string[]
    - `require_approval_for` string[]
    - `requests_per_minute` integer
    - `links_per_day` integer
    - `monthly_budget_cents` integer, nullable
    - `max_links_per_request` integer

## Response `200`

Agent updated

## Other responses

- `404`: Requested resource not found

---

[API](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api.md) · [All operations](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api/llms.txt) · [OpenAPI document](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api/revisions/1d12196927db?raw)
