---
title: "Deactivate Key"
description: "Deactivate a signing key. Visa's reference describes a soft deletion that keeps the record."
url: https://app.visacli.sh/docs/reference/vars/deactivate-key
updated: 2026-11-09
---

# Deactivate Key

> Deactivate a signing key. Visa's reference describes a soft deletion that keeps the record.

Canonical: https://app.visacli.sh/docs/reference/vars/deactivate-key. Updated: 2026-11-09. Full index: /llms.txt.

```text
DELETE /vars/v1/agents/{agentId}/keys/{keyId}
```

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. |
| `keyId` | path | Yes | `string`<br>The key's ID, returned as id. |

**Request body:** none.

## Responses

| HTTP | Meaning | Schema |
| --- | --- | --- |
| `200` | Key deactivated. | [`MessageResponse`](/docs/reference/schemas.md#vars-schema-MessageResponse) |
| `404` | Key not found. | [`ErrorResponse`](/docs/reference/schemas.md#vars-schema-ErrorResponse) |

```json title="Illustrative response — not a live capture"
{
  "message": "Key deactivated successfully"
}
```

> [!NOTE] Integration detail
> This is VARS deactivation. Read the key back afterwards: an accepted DELETE isn't enough if the key still reads active. Reactivation uses POST …/activate. VMRS DELETE has a different published meaning.

```bash title="X-Pay-Token request template"
base='https://sandbox.api.visa.com/vars/v1'
curl --request DELETE \
  "$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'
```

The token covers this URL's exact query, 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).
