---
title: "Register an agent"
description: "Create an agent in the Visa Agent Directory, add its key and keep it current."
url: https://app.visacli.sh/docs/register-an-agent
updated: 2026-11-18
---

# Register an agent

> Create an agent in the Visa Agent Directory, add its key and keep it current.

Canonical: https://app.visacli.sh/docs/register-an-agent. Updated: 2026-11-18. Full index: /llms.txt.

If you work through an enabler, such as Basis Theory, you don't need this page: your enabler registers your agents in the Visa Agent Directory, and you never call VARS or need Visa credentials. To test before your enabler onboards you, register agents from your enabler's test tenant, as [Rehearse it in sandbox](/docs/build-with-an-enabler.md#sandbox) shows.

This page is for you if you hold your own agent's signing key and want to register it directly with the Visa Agent Registry Service (VARS). You don't need it for a Visa CLI agent: connecting through Visa CLI does all of this for you, and starts with the [card step](/docs/how-the-pieces-fit.md), which direct registration doesn't include. An agent registered this way isn't in Visa CLI's registry, so nothing here lets anyone say a card was verified.

1. Prepare a stable identity
2. Create the agent, optionally with its key
3. Confirm the agent is active
4. Add, activate and read back the key
5. Treat only confirmed state as live
6. Sign your requests

Every call authenticates as described on [Authentication](/docs/reference/authentication.md), and field-level detail is on each linked page.

## 1. Prepare a stable identity

Decide these before you make any call, because they have to stay the same if you retry:

- A unique `domain` host for each agent, and a routable `contactEmail` that's unique on your TRID. A second agent with the same contact email is refused with `409`, which Basis Theory reports as `AGENT_CONTACT_EMAIL_CONFLICT`, and a plus-address, such as `agent-team+one@example.com`, counts as a different email. One TRID covers many agents, so the same `tokenRequestorId` on several agents isn't a duplicate.
- The `tokenRequestorId` for your Visa integration. Visa CLI sends a label of its own for each agent as this value, not the agent's ID. For your integration, use the [TRID](/docs/words-used-here.md#term-trid) your Visa integration is given.
- The agent's public signing key, with `algorithm: "ed25519"`, as the base64 of its full SPKI PEM. Request a 365-day `expirationDate`.

## 2. Create the agent

Send [Register Agent](/docs/reference/vars/register-agent.md), `POST /vars/v1/agents`, with those values and optionally the key. For many agents at once, there's [Agents bulk onboarding](/docs/reference/vars.md#routes-without-a-public-contract).

Save the returned `id` straight away. If you lose the result of a create, don't send it again. Look the identity up first with [Get agents by TRID](/docs/reference/vars.md#routes-without-a-public-contract), since another create can collide or leave a duplicate.

## 3. Confirm the agent is active

Agents created through the API are active by default, so there's no activation step to wait for. Read [Get Agent](/docs/reference/vars/get-agent.md) to confirm `isActive: true`. To change its details, use [Update Agent](/docs/reference/vars/update-agent.md).

## 4. Add, activate and read back the key

1. Read [List Keys](/docs/reference/vars/list-keys.md), all pages, and compare the complete public key. [Search keys](/docs/reference/vars/search-keys.md) is also available, but it comes from earlier sandbox evidence rather than Visa's catalog.
2. If your key is missing, add it with [Add Key](/docs/reference/vars/add-key.md).
3. If the key reads back inactive, activate it with [Activate Key](/docs/reference/vars/activate-key.md). The agent itself is active on creation; whether a new key still needs this call is being confirmed with Visa, so read it back either way.
4. If the expiry is too near, extend it with [Update Key](/docs/reference/vars/update-key.md).
5. Read it back with [Get Key](/docs/reference/vars/get-key.md). On a VARS key record, the key's `status` wins, and the key's older `isActive` only applies when `status` is absent. The agent record has an `isActive` of its own, which is about the agent, not the key.

## 5. Treat only confirmed state as live

Sign with a key, or tell anyone it's listed, only after you've read it back as active. Renew within 30 days of its expiry. When you retire one, send [Deactivate Key](/docs/reference/vars/deactivate-key.md) and read again to confirm it's no longer active; VARS treats `DELETE` as deactivation.

## 6. Sign your requests

Sign to the rules in [Verify requests as a merchant](/docs/verify-requests-as-a-merchant.md), which describes what a merchant checks under Visa's published TAP. Visa CLI's signing routes don't sign for keys you hold.

If you work through an enabler, you don't register agents yourself: the enabler registers them in the Visa Agent Directory under your TRID. See [Build with an enabler](/docs/build-with-an-enabler.md#how-an-enabler-fits).
