---
title: "Update Agent"
description: "Update agent metadata. Visa CLI sends only contactEmail, and confirms the change with a follow-up GET."
url: https://app.visacli.sh/docs/reference/vars/update-agent
updated: 2026-11-18
---

# Update Agent

> Update agent metadata. Visa CLI sends only contactEmail, and confirms the change with a follow-up GET.

Canonical: https://app.visacli.sh/docs/reference/vars/update-agent. Updated: 2026-11-18. Full index: /llms.txt.

```text
PUT /vars/v1/agents/{agentId}
```

Related guide: [Register an agent](/docs/register-an-agent.md).

**Authentication:** the method you chose, X-Pay-Token or two-way TLS; see [X-Pay-Token / mTLS](/docs/reference/authentication.md). X-Pay uses the signed apiKey query.

## Parameters

| Parameter | Location | Required | Type / meaning |
| --- | --- | --- | --- |
| `agentId` | path | Yes | `string`<br>The agent's ID, returned as id. |

## Request body

Required JSON body. Every field is optional, so send only what changes.

| Field | Type | Presence | Description / constraints |
| --- | --- | --- | --- |
| `name` | `string` | Optional | The agent's name. Visa CLI doesn't send it. |
| `description` | `string` | Optional | The agent's description. Visa CLI doesn't send it. |
| `contactEmail` | `string · email` | Optional | Updated verified contact. Visa CLI does GET → PUT → GET to confirm the result. |
| `domain` | `string` | Optional | Listed as changeable; Visa CLI doesn't send it. Confirm against the current authorized schema before using. |

```json title="agent-update.json — illustrative payload"
{
  "contactEmail": "agent-team+tap-updated@example.com"
}
```

## Responses

| HTTP | Meaning | Schema |
| --- | --- | --- |
| `200` | Agent updated. | [`AgentResponse`](/docs/reference/schemas.md#vars-schema-AgentResponse) |
| `403` | Agent is deactivated. | [`ErrorResponse`](/docs/reference/schemas.md#vars-schema-ErrorResponse) |
| `404` | Agent not found. | [`ErrorResponse`](/docs/reference/schemas.md#vars-schema-ErrorResponse) |
| `409` | A conflict, such as a duplicate `domain`, or a `contactEmail` already used on your TRID. A plus-address counts as a different email. | [`ErrorResponse`](/docs/reference/schemas.md#vars-schema-ErrorResponse) |
| `422` | Unsupported / invalid fields. | [`ValidationError`](/docs/reference/schemas.md#vars-schema-ValidationError) |

> [!NOTE] Integration detail
> tokenRequestorId, keys and agentMetadata are not update fields. The contract lists domain, but Visa CLI doesn't send it on PUT.

```bash title="X-Pay-Token request template"
base='https://sandbox.api.visa.com/vars/v1'
curl --request PUT \
  "$base/agents/YOUR_AGENT_ID?apiKey=YOUR_API_KEY" \
  --header 'Accept: application/json' \
  --header 'x-pay-token: TOKEN_FOR_THIS_EXACT_REQUEST' \
  --header 'Content-Type: application/json' \
  --data-binary @agent-update.json
```

The token covers this URL's exact query and the exact request body, so each request needs a new one. Replace the `YOUR_` values with your own.

Sources: [Current TAP API reference / endpoint catalog](https://developer.visa.com/api-reference/trusted-agent-protocol).
