---
title: "Update Agent"
method: PATCH
path: "/v2/agents/{agent_id}"
tags: ["v2 - Agents"]
---

# Update Agent

`PATCH /v2/agents/{agent_id}`

## Request

- Base URL: `https://api.jubjubapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jubjubapp.com/v2/agents/{agent_id}`
- Auth: HTTP bearer

Update an agent's scopes, name, or status.

Only the owner can update their agents, signed in as themselves: an agent
key is refused, and asking to turn the splits permission on says why.

## Path parameters

- `agent_id` string, required

## Headers

- `Authorization` string
- `X-JubJub-Service-Key` string
- `X-JubJub-Agent-Key` string
- `X-JubJub-Platform-Key` string
- `Origin` string
- `Referer` string
- `X-JubJub-Trial-Token` string

## Request body

- UpdateAgentRequest
  - `name` string, nullable
  - `scopes` object, nullable
  - `is_trusted_publish` boolean, nullable: Allow this agent to use publish:execute and publish:schedule scopes.
  - `status` string, nullable: Set to 'revoked' to revoke
  - `limits_override` object, nullable

## Response `200`

Successful Response

- AgentResponse
  - `agent_id` string, required
  - `name` string, required
  - `owner_profile_id` string, required
  - `status` string, required
  - `scopes` object, required
  - `is_trusted_publish` boolean, required
  - `limits_override` object, nullable
  - `created_at` string, required
  - `revoked_at` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jubjubapp/apis/jubjub-api.md) - [All operations](https://skmtc.dev/jubjubapp/apis/jubjub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jubjubapp/apis/jubjub-api/revisions/353157b296f2?raw)
