CLI docs

Agents (VARS)Update Key

Agents (VARS)TAP specification

Update Key

Update key data. Visa CLI uses this operation to extend expirationDate.

Markdownllms.txt
PUT/vars/v1/agents/{agentId}/keys/{keyId}

Related guide: Register an agent.

Authentication: the method you chose, X-Pay-Token or two-way TLS; see X-Pay-Token / mTLS. X-Pay uses the signed apiKey query.

Parameters

agentIdpath parameterrequired

string
The agent's ID, returned as id.

keyIdpath parameterrequired

string
The key's ID, returned as id.

Request body

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

expirationDatestring · date-time

The field Visa CLI updates today; use an explicit UTC instant.

keyNamestring

The key's name. Visa CLI doesn't send it, so confirm it against the authorized schema.

algorithmstring

The key's algorithm. The current allowed values aren't public.

publicKeystring

The public key, as base64 SPKI PEM if your authorized schema accepts it.

Responses

HTTPMeaningSchema
200Key updated.KeyResponse
403Agent / key deactivated.ErrorResponse
404Agent / key not found.ErrorResponse
409Duplicate keyName.ErrorResponse

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.

X-Pay-Token request template
base='https://sandbox.api.visa.com/vars/v1'
curl --request PUT \
  "$base/agents/YOUR_AGENT_ID/keys/YOUR_KEY_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-key-update.json
agent-key-update.json — illustrative payload
{
  "expirationDate": "2027-11-05T00:00:00Z"
}

Updated 9 Nov 2026