Skip to main content
Call Agent Vault from any language for everything except driving the browser.

Overview

Driving the proxied browser uses the proxy’s WebSocket protocol, not this API. The Playwright SDK and the MCP server are the two supported clients for it.

Base URL

Your deployment’s API base URL, which the SDK reads from SELF_AGENT_PAY_API_URL. Copy it from the dashboard’s framework picker on Overview or API keys.

Authentication

Send an API key from the dashboard as a bearer token:
Recipe reads need no authentication. Every other endpoint does.

Errors

Every error response is JSON with a stable code and a human-readable error:
Branch on code, never on error, whose wording can change. Every authenticated response carries Cache-Control: no-store. Full list: Error codes.

GET /v1/tokens

Returns the mock token catalog this API key may use.

Query parameters

string
Narrows cards and logins to those registered for this page, and adds relatedLogins. Cards marked anySite: true are always kept, after the ones registered for the page. host is accepted as an alias. A value that does not parse matches no site: every site-scoped card and every login drops out, but every anySite card is still returned. Identity and addresses are returned unchanged.

Request

Response

200 with the catalog. Every field is described in Token catalog.
The URL filter is a convenience over data the key can already see. It is not a security boundary: the proxy’s URL locking is.

Errors

Both windows are fixed, not sliding. The account budget is shared by every key on the account, so creating more keys does not raise it. A refused request records nothing, so retrying early is simply refused again. A successful fetch also marks the key as used, which is how the dashboard shows that your agent has connected.

GET /v1/recipes

Looks up the checkout recipe registry.

Query parameters

string
Returns the recipes that apply to this page. Send only the scheme, host and path: strip the query, the fragment and any hosted-checkout token first.
string
1 returns every recipe body. Ignored when url is set.
With neither parameter, returns the index.

Request

Response

A per-URL lookup returns four slots, each a recipe or null:
The index and the full bundle return { "recipes": [...] }. Each entry has these fields: With full=1 each entry also carries the recipe body under recipe.
A per-URL lookup is unauthenticated, and its URL can reach logs before the no-store header applies. Never send a raw hosted-checkout URL: a Stripe cs_... path or a Shopify /checkouts/... path carries a session token. The SDK’s recipesForUrl() strips it for you.

Errors

None specific to this endpoint. A URL that does not parse returns four null slots.

POST /v1/recipes

Contributes a recipe. Screening runs after the request returns.

Body

The recipe JSON on its own, or wrapped:
object
required
The recipe. See Recipe format.
string
Free text for the maintainer, up to 2,000 characters. For a verification request, the out-of-band evidence. Published word for word as the recipe’s evidence if the claim is approved.
boolean
Says a real purchase completed (or, for a signup recipe, an account was created). Requires a non-empty note. The recipe goes live at the submitted status and the claim waits for a maintainer, who alone can set verified.
$-prefixed field names, such as an editor-only $schema pointer, are removed on parse.

Request

Response

Status 202. Read the outcome from GET /v1/recipes/submissions/{id}.

Errors


GET /v1/recipes/submissions/{id}

Returns the verdict for a submission made by this account.

Path parameters

string
required
The id returned by POST /v1/recipes.

Request

Response

status is pending, approved, merged, rejected or needs_human. verdict lists the screening findings in fixed text, and is empty while pending. See Submission outcomes. While status is pending, poll again. Do not resubmit.

Errors


Signup and login endpoints

These four endpoints let an agent open and maintain site logins for the account holder. The three POST endpoints need an API key the owner has granted the signup permission, which is off by default. See Agent signup. Shared by all four: The three POST endpoints (/v1/logins/requests, /v1/logins/username and /v1/logins/password) also share these rules: The account’s budget of agent credential changes, 25 by default in a 24-hour window, is not shared the same way. The window starts at the first counted change and resets 24 hours after it, not at midnight. POST /v1/logins/username and POST /v1/logins/password charge it when they write, and answer daily_limit when it is spent. POST /v1/logins/requests does not charge it when it files an ordinary pending request. The account holder’s approval charges it later, and if the budget is spent at that moment, the request stays pending: your poll never shows daily_limit. A pre-approved signup that completes at once does not charge it either. It draws on the pre-approved allowance instead, described under POST /v1/logins/requests below. GET /v1/logins/requests/{id} only reads. It takes no body and is not counted against the per-minute limit or the 24-hour budget. It answers only the key that filed the request. Password rule fields, accepted by the request and password endpoints. Every field is optional. A value of the wrong type is ignored, so the vault’s stronger defaults apply. The generated password is 12 to 64 characters, 24 by default, and always holds a lowercase letter, an uppercase letter and a digit, plus a symbol unless noSymbols is set.
number
Shortest password the site accepts. A whole number, at most 64. A higher value is refused with invalid_policy, because the vault never generates a password longer than 64. Such a login has to be added by the account holder.
number
Longest password the site accepts. A whole number. Below 12 is refused with password_too_short.
boolean
The site rejects punctuation. Set it only from a stated rule.
string
The exact punctuation the site accepts. It can only narrow the vault’s safe set, !@#$*+-_=.?. A value with none of those characters is refused with invalid_policy.
boolean
The site rejects three identical characters in a row.

POST /v1/logins/requests

Files a signup request. Usually the account holder has to approve it, and nothing is created until they do. If they have put this site and this exact email on their Pre-approved signups list, the login is created right away instead.
string
required
The site’s domain, for example shop.example.com.
string
required
The mailbox to sign up with.
string
A handle, only if the site has already accepted it. At least 4 characters.
Responds 202 with { "requestId": "...", "status": "pending", "expiresAt": 1789000000000 }. A pending request expires 24 hours after it is filed. When the site and email are on the pre-approved list, the same 202 carries "status": "approved". The login already exists, so poll the requestId right away: the first answer carries the tokens. A pre-approved signup that cannot complete falls back to pending and waits for the account holder. Handle both statuses. Pre-approval completes at once only within two ceilings:
  • 2 signups per listed site. The count resets only when the account holder removes the site and adds it again, or saves it with a different email.
  • 60 signups per account in a 24-hour window, by default. The window starts with the first pre-approved signup and resets to zero 24 hours later.
Past either one, the request comes back pending instead of approved. The other checks an approval runs, such as the key’s allowed-logins list or a free label for the site’s name, also send it to pending. See Limits. The 500-login ceiling works differently. If the account already holds 500 logins when you file the request, the call is refused at once with 403 and login_limit, whether or not the site is pre-approved. No request is created and the account holder is not asked. The ceiling is checked again at approval, so a request filed below it can still stay pending if the account reaches 500 while it waits.

GET /v1/logins/requests/{id}

Polls one signup request.
The poll never returns a password. login is exactly what GET /v1/tokens will show for it. passwordPolicy describes the password the vault generated at approval. passwordOwnerManaged is true when the account holder has replaced that password from their dashboard before you polled. Then:
  • passwordPolicy describes a password that no longer exists.
  • The login’s password token resolves to the account holder’s password, so fill it as normal.
  • POST /v1/logins/password refuses this login with not_rotatable, for good. If the site rejects the password, tell the account holder instead.
false, or absent on an older deployment, means the generated password is still in place and the policy describes it. An approved login the account holder has since removed from this key’s scope answers scope_denied instead of approved.

POST /v1/logins/username

Records the handle on a login that was opened with only an email.
string
required
The login’s label, for example shop.
string
required
The handle. At least 4 characters, with no control characters.
Responds 200 with the login’s updated catalog entry under login:
A handle is recorded once. Sending the exact same handle again succeeds with the same envelope. A different handle is refused with username_already_set. Only the API key that created the login can set its username, and only within seven days of the login being created. Seven days is the default; a deployment can set a different window. Any other key, or a later request, gets 404 not_found, the same answer as an unknown label. Re-sending the handle already stored still succeeds after the seven days.

POST /v1/logins/password

Mints a replacement password for a login an agent created. The mock tokens do not change, so a token already in use resolves to the new password.
string
required
The login’s label.
Plus any of the password rule fields above. Responds 200 with the login’s catalog entry under login, the rules the new password was generated under in passwordPolicy, and rotated: true:
This example followed "noSymbols": true, so passwordPolicy has no symbolAlphabet. The tokens are the same as before the rotation. Only the API key that created the login can rotate it, only within seven days of the login being created, and only while the account holder has not replaced its password. Seven days is the default; a deployment can set a different window. Every other case, including an unknown label, gets 409 not_rotatable.

Errors

Some checks run only when the account holder approves a signup, such as the key’s allowed-logins list being full or the site’s name having no free label. A failed check is shown to the account holder and never returned to you: the poll keeps answering pending. If the account holder says they approved and the poll still answers pending, the approval was blocked: they have to fix the cause and approve again. Do not open a second request. See Signup and login writes.

POST /v1/logins (retired)

Answers 410 Gone with signup_requires_approval. Use POST /v1/logins/requests instead.

Quick checkout orders

Quick checkout is a preview and is not yet generally available. A product search or details call, a quote and a new order answer only for accounts Agent Vault has turned it on for; for any other account they return 503 with quick_checkout_unavailable. Reading an order (GET /v1/orders/{id}), cancelling it, and replaying the POST /v1/orders that made it always answer for the API key that made it, even after Quick checkout is turned off, so an order in flight can always be followed. GET /v1/capabilities (and capabilities in the token catalog) says which: quickCheckout is true for an account that may quote and order, and quickCheckoutOrders is true for one that has orders. Unlike GET /v1/tokens, GET /v1/capabilities marks nothing as connected and charges no rate limit. Do not build a production flow on them yet.
Quick checkout places an order for the account holder on a site the vault’s browser cannot use, or that Agent Vault orders on without it. Today that is Amazon (amazon.com), Walmart (walmart.com), Best Buy (bestbuy.com), Target (target.com), Home Depot (homedepot.com) and Lowe’s (lowes.com). Agent Vault places the order and bills the account holder’s card, so their statement shows Agent Vault, not the retailer. Every other site keeps the normal browser checkout: a product URL on any other host is refused with not_quick_checkout_host. Every order runs the same controls as a card fill on the retailer’s site, with the order’s full card hold as the amount: the account pause, agent card pauses, merchant rules, authorized destinations, spending limits and the plan’s payment quota. The account holder approves every order, the first one included. The first order on a card also asks them to confirm that card once. Amounts are in cents.

POST /v1/products/search

Find a product to order without a browser. It answers the first page of the retailer’s search results, at most 10, each with the productUrl to quote and order. It searches Amazon unless retailer names another store. Each search is billed to Agent Vault and counts against the key’s product lookup limit, so search with one specific query and rephrase it rather than repeat it. Do not retry a 503.
string
required
1 to 200 characters of search words, for example AAA batteries.
string
default:"Amazon"
The store to search, by its display name: Amazon, Walmart, Best Buy, Target, Home Depot or Lowe's. Set it when the user names a store; the results and their productUrls are from that store only. A store that is not on for the deployment, or cannot be searched, is refused with invalid_retailer rather than searched elsewhere.
priceCents is the listed price. The quote gives the price the order is placed at. hasVariants is present only for retailers that report it, and Amazon results leave it out. When the title doesn’t settle the size, colour or pack count, read the product with POST /v1/products/details and pick a variant’s productUrl before quoting. An empty results means nothing matched. imageUrl is the product’s image, for display. It is passed through only from the retailers’ own image hosts (media-amazon.com, walmartimages.com) and the catalog search’s thumbnail host (th.bing.com), always over https; any other image is left out. It is present only when there is one, so a client must not depend on it. Agent Vault does not fetch or proxy it: your client loads it from that host. Best Buy, Target, Home Depot and Lowe’s are searched through the ordering partner’s cross-retailer catalog search. A result there carries only productUrl, title, imageUrl, priceCents, stars and numReviews, and "priceSource": "listed": the price is the one search listed, not confirmed by the store, and it can lag the store’s page. There is no brand, stock or variant data. productUrl is the store’s own page URL without its query string or fragment; quote and order that URL as given. Agent Vault keeps each result’s listed price for 30 minutes, for the quote.

POST /v1/products/details

Read one product: its title, listed price, up to five feature bullets and its variants, each with its own productUrl. Validated like a quote, and counted against the same product lookup limit.
string
required
The product page, for example https://www.amazon.com/dp/B07JGBW826 or https://www.walmart.com/ip/16663049.
A variant has no label when the store names no values for it: Walmart lists each variant by its product page only. imageUrl is the product page’s main image, from the same allowed hosts as search, and is left out when there is none. On Target, Home Depot and Lowe’s, which have no product data, and on Best Buy while its product data is unavailable, the answer comes from the listed price search kept: title, imageUrl and priceCents from the search result, "priceSource": "listed", no feature bullets and no variants. Target, Home Depot and Lowe’s make no call to the ordering partner for it. With no listed price kept (the URL was not a recent search result), all four answer with no price and a note to ask the user for the most they will pay. Best Buy answers 503 with quick_checkout_unavailable only when its product read fails for a reason a retry may clear, such as a timeout.

POST /v1/orders/quote

Price one product before ordering it. Each call is billed to Agent Vault and counts against the key’s product lookup limit, shared with product search and details.
string
required
The product page, for example https://www.amazon.com/dp/B07JGBW826.
integer
default:"1"
1 to 100.
suggestedMaxPriceCents is the price times the quantity, plus shipping, plus 12% for tax. When the store lists no shipping price or free shipping, it also adds a $9.99 shipping allowance: free shipping often needs a membership or an order minimum the order does not meet, and maxPriceCents caps the total with shipping. Pass it as maxPriceCents. maxHoldCents is the most the card is held for at that maxPriceCents: the price ceiling plus the ordering fee and a card fee estimate. The account holder approves that figure. chargeNote says the same in words, as the account holder’s approval does: tell the user what their card can be charged, not only the item price. A listed quote carries it too; a quote with no price (priceCents: null) has no hold, so no chargeNote. Where the order ships. Every quote (priced, listed and ceiling) says where the order would ship, so the agent can tell the user before it places it. An order cannot be cancelled once the retailer has placed it.
  • shipToLabels lists the account’s US address labels, as the token catalog lists them, sorted.
  • shipTo is the label POST /v1/orders ships to when it is sent no shipTo: the address labelled ship, or the only one saved. It is null when that address is not one of shipToLabels, for example a UK ship address.
  • suggestedShipTo is set when the account has exactly one US address and the order would not ship there by default: confirm it with the user, then send it as shipTo. Without it, POST /v1/orders would be refused.
  • addressNote says the same in words for the agent. With one label that is shipTo, it says to tell the user where the order ships. With one label that is not, it says the order must ship to that label and to confirm it with the user. With more than one label, it says to ask the user which address (unless they already said) and to pass that label as shipTo. It is absent when shipToLabels is empty.
A response from an older server has none of the three fields. A Best Buy quote carries the product’s imageUrl from the product page it reads. An Amazon or Walmart quote has none: it reads only the sellers’ offers, so take the image from the search or details answer. A listed quote. On Target, Home Depot and Lowe’s, and on Best Buy while its product data is unavailable, the quote is built on the listed price a search kept for the product’s page URL in the last 30 minutes. It makes no call to the ordering partner on Target, Home Depot and Lowe’s.
suggestedMaxPriceCents is the listed price times the quantity, plus 20% for tax and the lag of a listed price, plus a $9.99 shipping allowance unless the search result had free shipping. shippingCents is null: the allowance is not a shipping quote. If the store’s total, shipping included, is above maxPriceCents, the order fails and nothing is charged. imageUrl is the image the search result had, when it had one. With no listed price kept, for example a URL the user pasted, the quote has no price: priceCents is null and note says to ask the user for the most they will pay, and pass that as maxPriceCents.

POST /v1/orders

Place an order. The answer is 202: the order exists and usually waits for the account holder.
object[]
required
1 to 10 entries of { "url": string, "quantity"?: integer }, all on the same site.
integer
required
The most the retailer may charge for the whole order, tax and shipping included. The order fails rather than go over it.
string
required
A card number token from the token catalog, such as av_card_1_number_u7x2k.
string
The label of a saved address. Defaults to the address labelled ship, or the only saved address. US addresses only for now.
string
required
1 to 64 characters you choose. Sending the same key again with the same body returns the same order and never places a second one. The same key with a different body is refused with idempotency_conflict.
Each product carries the retailer’s title once it is known, usually from the first answer, and its imageUrl from the same read, on the same allowed hosts as search. Both are for display only and can be missing; the url is what names the product. GET /v1/orders/{id} and the cancel route answer the same products.

GET /v1/orders/{id}

Read an order this key placed. Add ?wait=<seconds> (at most 45) to hold the request until the order’s state changes or the wait ends. Once placed, the order carries the retailer’s merchantOrderIds and, as parcels ship, tracking. totalCents is the amount charged to the card, order and card processing fees included, and appears once the charge is final; until then the hold of up to maxHoldCents stands. orderTotalCents is the retailer’s total (items, tax and shipping), once the order is placed: the difference is the fees. waitingOnOwner is true in the three awaiting_ states: tell the account holder, then wait.

POST /v1/orders/{id}/cancel

Cancel an order before it is placed. It answers the order, now cancelled. While the order is submitting or submit_uncertain, or once the retailer has started on it, the answer is 409 with order_not_cancellable.

Errors

address_required, address_not_found and unsupported_country carry shipToLabels: the labels of the account’s saved US addresses, as the token catalog lists them, sorted and at most 10. Ask the user which to ship to, even when there is only one, and pass it as shipTo. The message names them too, in the same words as the quote’s addressNote: it says what the order needs, then which labels to confirm or choose from. The list is empty when the account has no US address, and always empty on /v1/products/search, /v1/products/details and /v1/orders/quote, where no address was chosen yet.
A control that refuses an order does not fail the request: the order comes back in blocked with the card fill code as its reason (account_paused, card_paused, merchant_blocked, limit_reached, plan_quota_reached, destination_unauthorized). See Error codes.

Wallet payments

POST /v1/wallet/pay

Pay a Buy route from the account’s agent wallet and get the route’s answer. This endpoint is on the proxy, not the API base URL: the SDK sends it to the HTTP origin of SELF_AGENT_PAY_PROXY_URL (for wss://proxy.agentvault.io/v1, https://proxy.agentvault.io). Authenticate with the API key as a bearer token. Server to server only: it sends no CORS headers. The whole request is at most 64 KB. The answer is JSON with ok, then outcome (paid, pending or unpaid) or code and message, plus idempotencyKey, sent, httpStatus, txHash, amount, token, network and the route’s body (text, at most 256 KB; bodyOmitted says why when there is none). A pending answer is 202 with approvalId and approvalExpiresAt. The call answers within 20 seconds. Codes: Wallet payments. The dashboard’s approval, security code, challenge and signup prompts are backed by single-use links sent to the account holder. Each link’s token is the only credential, it expires on its own, and the agent never sees it. They are not an integration surface for agents. Deleting an account removes every pending prompt, and a link for a deleted account reads as not found. Two further paths serve Agent Vault’s own infrastructure and billing. Neither accepts an API key.

Worked example

Read the catalog, check the registry and contribute, with no SDK:
This fingerprint strips the query and fragment. It does not remove a session token embedded in the path, such as a Stripe cs_... checkout or a Shopify /checkouts/... path. For those hosts, send only the scheme and host.