# Veraxus for AI agents

Veraxus gives software and agents one API to the cloud systems a business signs into through a browser. Read what the signed-in user can see. Write changes back with their approval. Export what they can download.

Your customer signs in once. Veraxus keeps the session, enters the verification codes it can read itself (authenticator-app and emailed codes), and returns a named failure when the system does not answer. You never drive a browser. A password passes through you once, to `store_credentials`, and Veraxus vaults it.

This page is written for an agent to follow. Read it top to bottom before your first call.

## Connect

| | |
|---|---|
| MCP | `https://api.veraxus.ai/mcp` (HTTP transport; agents POST here) |
| REST | `https://api.veraxus.ai/v1` |
| Spec | `https://api.veraxus.ai/v1/openapi.json` (public) |

Two ways to authenticate. Both work on MCP and on REST.

**Sign-in (OAuth).** Add the MCP URL to your client. An unauthenticated call returns 401 with discovery at `https://api.veraxus.ai/.well-known/oauth-protected-resource/mcp`. Clients register themselves, use PKCE (S256), and may use the device flow when there is no browser. A person with a Veraxus console login approves the grant and picks all practices or one. Scopes: `eligibility`, `vault`, `portal_login_mutation`, `claims`. A grant carries `eligibility` and `vault`; the other two are added only when the approving person is permitted to grant them.

**Key.** `Authorization: Bearer pk_live_…`, minted in the console and shown once. A `pk_test_…` key reaches only your sandbox practice and is never billed. Build with a test key first.

A host that truncates long tool lists can send the header `x-veraxus-mcp-profile: agent`. The server then lists and accepts a compact catalog only: guides, status, checks, reads and requests. `claims_guide`, `complete_portal_mfa`, `connect_portal_login`, `pms_write`, `store_credentials` are outside it; call those without the header. The header never adds a permission.

**Getting an account.** A person creates a sandbox account at https://app.veraxus.ai/signup with a company name and an email, opens the emailed link, and accepts the agreements in the console. That account holds one sandbox practice: test keys, sample members and simulated sign-ins, never real patient data, never billed. Live access is turned on by Veraxus: the person emails hello@veraxus.ai. If the person you work for has no account, send them to the sign-up page. Do not create an account yourself: the emailed link and the agreements need a person. Without an account you can still read this guide, the spec, `https://api.veraxus.ai/v1/getting-started` and `https://api.veraxus.ai/v1/portal/guide`.

## Your first session

Call these in order. Nothing here is billed, and nothing here needs a customer's login.

| MCP tool | REST | What you learn |
|---|---|---|
| `getting_started` | `GET /v1/getting-started` | The first-day sequence and the sandbox members. Not billed. |
| `whoami` | `GET /v1/me` | Your key or grant, your tenant, its scopes and its price. |
| `list_sandbox_members` | `GET /v1/sandbox/members` | Practice members. Each one answers a fixed outcome, including every failure you must handle. |
| `check_sandbox_eligibility` | `POST /v1/eligibility` | A practice check. Same JSON as a live check, with `sandbox: true` on the answer. Not billed. On REST send `sandbox: true` unless you use a test key. |
| `list_payers` | `GET /v1/payers` | The systems your company is licensed for, and how each one signs in: `sign_in_method`, `mfa_types`, `renews_without_code`. |
| `list_organizations` | `GET /v1/organizations` | Your customers. Calls that act on one customer take its `organization_id`. |

Systems are named to you by `list_payers` and `list_pms_vendors`, not on this page. Use the ids those calls return.

## Sign a customer's system in

A person must be present the first time: they own the login, and they may have to read a code. Use these steps when the system's `sign_in_method` is `connect`. Read before you write, in this order.

| Step | MCP tool | REST | Rule |
|---|---|---|---|
| Resume first | `list_portal_mfa_challenges` | `GET /v1/portal/mfa` | A pending hold gets the code. Do not sign in again. |
| Read the status | `list_portal_logins` | `GET /v1/portal-logins` | `ready` needs nothing. Follow the status table below. |
| Save the login | `store_credentials` | `PUT /v1/credentials` | Username, password and an optional authenticator seed. Write-only: never returned. |
| Sign in once | `connect_portal_login` | `POST /v1/portal/connect` | Uses the saved login. The body never carries the password. Send an idempotency key. |
| Send the code | `complete_portal_mfa` | `POST /v1/portal/mfa` | Only when the status is `needs_code`. |

Saving a login and signing in both need an approval: an approved grant id in the `X-Veraxus-Hitl-Grant` header, or the `portal_login_mutation` scope with an attestation. Without either the call returns 403 `hitl_required`. `portal_login_guide` (`GET /v1/portal/guide`) returns the exact fields.

## Verification codes

Most systems worth connecting ask for a second factor. Each system row tells you what to expect: `mfa_types` lists `email_otp`, `sms_otp`, `totp`, `push`, and `renews_without_code` says whether Veraxus renews an ended session without a new code.

A code reaches the system in one of three ways.

1. **Authenticator app.** When the system uses an authenticator app, save the app's seed as `totp_seed` with the login so Veraxus can compute the code. The seed is write-only, like the password.
2. **Emailed code.** An enrolled organization has a `code_email_address`. Once `code_email_receiving` is true, your customer sets that address on their account in the system. Veraxus then receives the emailed codes and enters them on a login set to sign in automatically. Do not have them set the address before it is receiving.
3. **A person.** The status turns `needs_code`. The person reads the code and you send it with `complete_portal_mfa`. Texted codes need a person to read them. A push approval is answered by the person on their own device.

After sign-in the session is held between your calls. Reads reuse it and never post the password. When the system ends the session, Veraxus reports `expired`, or `reconnecting` while it signs back in by itself on a login your customer allowed to sign in automatically.

Four rules keep a login healthy.

- Ask for a code only when the status is `needs_code`. Never ask in advance.
- Send a code once. On `confirmation_pending`, observe; do not resend.
- Never store, log or repeat a code, a password or a seed. Pass each one to the call that needs it and nowhere else.
- Never sign in to find out whether a login works. Read the status.

## Login status

Read `list_portal_logins` and switch on `status`.

| Status | What you do |
|---|---|
| `not_connected` | Nothing is signed in. Save the login, then sign in once. |
| `needs_code` | A code is owed. Get it from the person and send it. Do not sign in again. |
| `confirmation_pending` | The code was accepted, or an approval is waiting on the person's device. Observe; do not send a code. |
| `ready` | Signed in. Calls reuse the saved session. Do not sign in again. |
| `reconnecting` | Veraxus is signing back in by itself. Poll; do not sign in. |
| `expired` | The system ended the session. With a person present, sign in once. |
| `credentials_invalid` | The system refused the saved login. Ask the person for the new one, save it, then sign in. |
| `locked` | The account is locked on the system. Wait. Do not sign in until the person has fixed the account. |
| `portal_outage` | The login is saved. The system is not answering. Retry later. Do not ask for the password. |
| `quarantined` | The login is saved. The last sign-in was blocked. Retry later. Do not ask for the password. |
| `vault_error` | Veraxus could not read the vault. Retry later. Do not ask for the password. |
| `status_unknown` | Not verified yet. Do not report it as signed in. Read the status again. |

## Do the work

| Task | MCP tools | REST | Note |
|---|---|---|---|
| Verify coverage | `preview_verification`, `check_eligibility`, `check_eligibility_batch`, `get_eligibility` | `POST /v1/eligibility/preview`, `POST /v1/eligibility`, `POST /v1/eligibility/batches` | Preview is free. Live checks are billed. |
| Read and write a connected system | `list_pms_vendors`, `list_pms_connections`, `list_pms_operations`, `pms_read`, `pms_write` | `GET /v1/pms/vendors`, `GET /v1/pms/connections` | Each system publishes its operations, marked read or write. |
| Look up payments | `lookup_remittances` | `POST /v1/remittances/lookup` | Payment rows from a finished live check. Run the check first. |
| File a claim | `claims_guide` | `GET /v1/claims/guide` | Read the guide first. Every send needs a person's approval. |
| Ask for a new connection | `submit_request`, `get_request`, `list_request_updates` | `POST /v1/requests` | A system you need that is not listed, or a fault. Save the id and poll it. |

A write is sent once, after an approval tied to that exact change. If the outcome is unclear the call says `unknown_outcome`: check with a read before you act again.

## Failures

Every non-2xx answer has one shape. Branch on `error.code`. Show `error.message` to the person. Retry only when `error.retryable` is true, after `error.retry_after` seconds. A system that is down says so by name; Veraxus does not guess an answer.

## Billing

Guides, previews and sandbox calls are free. A live check is billed, including one that finds no member. A call that fails because the system was down, or because Veraxus failed, is not billed. Read the price in `whoami` before a large batch, and tell the person what it will cost.

## Reference

- Agent index: https://veraxus.ai/llms.txt
- Developer docs: https://veraxus.ai/docs
- API reference: https://api.veraxus.ai/v1/reference
- OpenAPI spec: https://api.veraxus.ai/v1/openapi.json
- Access and support: hello@veraxus.ai
