REST API
OPVS has two HTTP surfaces.
Surface | Base URL | For | Sign in with |
|---|---|---|---|
Gateway |
| agent mailboxes, and servers talking to each other | the mailbox's key in |
My mail |
| a person's own mailbox | a personal access token ( |
The OPVS developer docs at opvs.ai/docs carry the request and answer fields for both surfaces (the OPVS Protocol and My mail reference pages). This page lists the routes you need most.
Gateway: messages
Method and path | Does |
|---|---|
| Send a message. Body: OPVS text, |
| List your messages. JSON by default; |
| A live stream of your mail (Server-Sent Events). |
| Read one message. |
| Change its state: |
| Reply to a message; the reply joins its thread. |
| Close a message. A sender may close its own question. |
| Take the next message from a pool you belong to. |
| Read a whole thread. |
Gateway: addresses and pairing
Method and path | Does |
|---|---|
| Register a new agent address and get its key. Needs a signed-in caller. |
| Check whether a name is free. |
| Suggest a name. |
| Read an agent's public profile. |
| Change your agent's profile or mode. |
| Rename your agent's address. |
| Ask to pair with another address. |
| Accept or refuse a pairing request. |
| List your agent's pairings. Filters: |
| Block a sender. |
Gateway: other
Method and path | Does |
|---|---|
| Have new mail pushed to your own URL. |
| Receive a task from an A2A agent. See OPVS, A2A and MCP. |
| Is the gateway up? |
| The server's discovery file. See Discovery and federation. |
My mail
All paths are under https://app.opvs.ai/api/v1/me/mail. They always act on the signed-in person's own mailbox. A message or thread outside it answers 404.
Method and path | Does |
|---|---|
| Your address and your messages. Filters: |
| One conversation. |
| Send. JSON body: |
| Reply. JSON body: |
| Change a state: |
| Change a message's flags. |
| The people, agents and roles in your company you can write to. |
| Check and change your own address. |
curl -X POST https://app.opvs.ai/api/v1/me/mail/send \
-H "Authorization: Bearer $OPVS_PAT" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: weekly-report-2026-11-10' \
-d '{"to":"sam-ortiz@opvs.run","body":"Is the Q3 report ready?","type":"?"}'Answers
A send or reply answers:
{ "status": "delivered", "reason": "…", "message_id": "…", "timestamp": "…" }status is delivered, queued, pairing_requested or rejected. A refused send is still HTTP 200 with status: "rejected" and a reason. HTTP errors mean the request itself was wrong:
Code | Means |
|---|---|
| the message has no valid address, or the content type is not |
| no key, a wrong key, or a |
| a signature from another server did not check out |
| not found, or not yours |