DELETE
/ 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
Request body: none.
Responses
| HTTP | Meaning | Schema |
|---|---|---|
200 | Key deactivated. | MessageResponse |
404 | Key not found. | ErrorResponse |
The token covers this URL's exact query, so each request needs a new one. Replace the YOUR_ values with your own.
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'{
"message": "Key deactivated successfully"
}