---
title: "Update an agent"
method: PATCH
path: "/v1/agents/{agent_id}"
tags: ["agents"]
---

# Update an agent

`PATCH /v1/agents/{agent_id}`

## Request

- Base URL: `https://api.spendnod.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.spendnod.com/v1/agents/{agent_id}`
- Auth: none declared

## Path parameters

- `agent_id` string, uuid, required

## Request body

- AgentUpdate
  - `name` string, nullable
  - `status` 'active' | 'paused' | 'revoked'

## Response `200`

Successful Response

- AgentResponse
  - `id` string, uuid, required
  - `name` string, required
  - `api_key_prefix` string, required
  - `status` 'active' | 'paused' | 'revoked', required
  - `metadata` object, required
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/spendnod/apis/spendnod-api.md) · [All operations](https://skmtc.dev/spendnod/apis/spendnod-api/llms.txt) · [OpenAPI document](https://skmtc.dev/spendnod/apis/spendnod-api/revisions/170dc867d036?raw)
