API and developer docs
Search packages, create an order and read the eSIM with a JSON API or MCP. No sign-up, no API keys, no accounts.
- Base URL
https://agent-sim-omega.vercel.app/api/v1- Auth
- None to search; one-time keys per order
- MCP
https://agent-sim-omega.vercel.app/api/mcp- Spec
- openapi.json
- Format
- JSON, any origin (CORS)
- Orders
- 10 a minute per buyer key
- Payments here
- Test checkout, no real money
Quickstart
- List packages. Packages for one destination, cheapest first. Each has slug, title, dataMb, validityDays, priceCents and currency. Use country=JP instead to include regional packages; add minDays or minGb to filter.
curl "https://agent-sim-omega.vercel.app/api/v1/packages?destination=japan" - Create an order. Send a slug from step 1. The 201 response has checkoutUrl, checkoutExpiresAt, nextStep and order (id, status, url, apiUrl), plus orderSecret (osk_...) and, on your first order, buyerKey (agsk_...). Both are shown once. Open checkoutUrl in a browser to pay.
curl -X POST "https://agent-sim-omega.vercel.app/api/v1/orders" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{"packageSlug":"japan-1gb-7-days","email":"traveler@example.com"}' - Get the order. Poll every 3 seconds until status is fulfilled. Without a key the response has access statusOnly; with the orderSecret it has access full and adds esim (install link, LPA, QR), travelerMessage, usage and receipt.
curl "https://agent-sim-omega.vercel.app/api/v1/orders/ord_..." \ -H "Authorization: Bearer osk_..."
Authentication without sign-up
- There is no sign-up and there are no API keys or accounts. Searching destinations, packages and recommendations needs no credentials.
- Order secret key (osk_...): returned once as orderSecret by createOrder (POST /api/v1/orders). Send Authorization: Bearer osk_... to read the full order, its usage and its top-ups. We store only a hash and can't recover it.
- Buyer key (agsk_..., optional): returned once as buyerKey by your first createOrder without one. Send it as Authorization: Bearer agsk_... on later orders to group them, to list them with GET /api/v1/orders (listOrders), to manage the webhook, and in place of osk_... for any order it bought.
- MCP has no headers: pass orderSecret, buyerKey and idempotencyKey as tool arguments instead.
- A key we don't recognize is refused with 401 (invalid_order_secret or invalid_buyer_key), never downgraded to status only. Never put either key in the traveler message.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /api/v1/destinations?query&type | List destinations. |
| GET | /api/v1/packages?destination&country&minDays&minGb | List packages. |
| GET | /api/v1/packages/{packageSlug} | Get a package. |
| GET | /api/v1/recommendations?countries&days&usage&gb | Recommend packages for a trip. |
| POST | /api/v1/orders | Create an order. Body { packageSlug, email?, agentHint? }. Auth: Optional: Bearer buyerKey. |
| GET | /api/v1/orders | List the buyer's orders. Auth: Bearer buyerKey. |
| GET | /api/v1/orders/{orderId} | Get an order. Auth: Optional: Bearer orderSecret or buyerKey. |
| GET | /api/v1/orders/{orderId}/topup-packages | List top-up packages for an eSIM. Auth: Bearer orderSecret or buyerKey. |
| POST | /api/v1/orders/{orderId}/topups | Create a top-up order. Body { topupPackageId, agentHint? }. Auth: Bearer orderSecret or buyerKey. |
| GET | /api/v1/orders/{orderId}/usage | Get data usage for an eSIM. Auth: Bearer orderSecret or buyerKey. |
| GET | /api/v1/webhook | Get the buyer's callback. Auth: Bearer buyerKey. |
| PUT | /api/v1/webhook | Register a callback for low-data events. Body { url }. Auth: Bearer buyerKey. |
| DELETE | /api/v1/webhook | Remove the buyer's callback. Auth: Bearer buyerKey. |
MCP server
Streamable HTTP at https://agent-sim-omega.vercel.app/api/mcp, no auth. Client config:
{
"mcpServers": {
"agentsim": {
"url": "https://agent-sim-omega.vercel.app/api/mcp"
}
}
}| Tool | Purpose |
|---|---|
searchDestinations | Search eSIM destinations. Arguments: query, type?. |
listPackages | List eSIM packages. Arguments: destination?, country?, minDays?, minGb?. |
getPackage | Get an eSIM package. Arguments: packageSlug. |
listRecommendations | Recommend eSIM packages for a trip. Arguments: countries?, days?, usage?, gb?, itinerary?. |
createOrder | Create an eSIM order. Arguments: packageSlug, email?, agentHint?, buyerKey?, idempotencyKey?. |
getOrder | Get an eSIM order. Arguments: orderId, orderSecret?, buyerKey?. |
listOrders | List a buyer's orders. Arguments: buyerKey. |
getUsage | Get eSIM data usage. Arguments: orderId, orderSecret?, buyerKey?. |
listTopupPackages | List top-ups for an eSIM. Arguments: orderId, orderSecret?, buyerKey?. |
createTopup | Create a top-up order. Arguments: topupPackageId, agentHint?, orderId, orderSecret?, buyerKey?. |
Errors
Every error has the same shape, with a message written for the calling agent:
{"error":{"code":"not_found","message":"No package \"x\" is for sale. List packages first (listPackages) and pass a slug it returns."}}| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request is malformed or fails validation. The message names the field and how to fix it. |
| 401 | buyer_key_required | Send the buyer key as Authorization: Bearer agsk_... It is returned once as buyerKey by createOrder. |
| 401 | invalid_buyer_key | The buyer key is unknown. Omit Authorization on createOrder to get a new one; never retry with a new buyer. |
| 401 | order_secret_required | Send the order's secret key (osk_...) or the buyer key that bought it as Authorization: Bearer. |
| 401 | invalid_order_secret | This key does not open this order. Send its orderSecret or the buyer key that bought it. |
| 404 | not_found | No such resource. The message says which call returns valid values. |
| 404 | esim_not_found | The eSIM provider does not recognize this eSIM. Contact support with the order ID. |
| 409 | unavailable | The package cannot be sold right now. Pick another package for the same destination. |
| 409 | idempotency_conflict | The Idempotency-Key was already used for a different request, or for a checkout that is no longer open. |
| 409 | topups_unavailable | The eSIM cannot take top-ups (not issued yet, or not offered by the network). |
| 409 | topup_limit_reached | The eSIM has reached its top-up limit. Buy a new eSIM for more data. |
| 409 | usage_unavailable | No usage is reported for this eSIM (not issued yet, or not reported by the network). |
| 410 | esim_recycled | The eSIM was recycled after it expired or went unused. Buy a new eSIM. |
| 429 | rate_limited | Too many requests for this buyer key, or too many failed attempts on this order. Wait for Retry-After seconds. |
| 500 | internal_error | Something went wrong on our side. Try again in a few seconds. |
| 503 | provider_unavailable | The eSIM provider is busy or did not answer. Retry after Retry-After seconds. |
Rate limits and Idempotency-Key
- createOrder and createTopup (REST and MCP) with a buyer key: 10 a minute per buyer key, wherever the requests come from. Those responses carry RateLimit-Policy: 10;w=60 and RateLimit: limit=10, remaining=9, reset=60.
- Without a buyer key, order creation is not rate limited by us and responses carry no RateLimit headers. Platforms that send many buyers' traffic from shared addresses are never throttled together.
- Wrong keys for one order (orderSecret or buyerKey): 10 a minute per order, from any address; after that, keys for that order are refused until the window passes. Polling your own order with the right key never counts.
- Over the limit: 429 rate_limited with a Retry-After header in seconds. 503 provider_unavailable also sends Retry-After.
- Idempotency-Key on POST /api/v1/orders (1 to 200 printable ASCII characters, e.g. a UUID; idempotencyKey in MCP): the same key from the same caller returns the same open checkout with 200 and Idempotent-Replayed: true instead of creating a second order. A different package, or a checkout that is no longer open, gives 409 idempotency_conflict.
- Every API response allows any origin (Access-Control-Allow-Origin: *) and answers OPTIONS preflights.
Webhooks for low data
- Register one HTTPS callback per buyer key: PUT /api/v1/webhook with {"url":"https://agent.example.com/esim-events"} and Authorization: Bearer agsk_... GET shows it; DELETE removes it.
- Events: esim.low_data, sent when an eSIM has used 75% or 90% of its data or expires in 3 days or 1 day. Body: type, orderId, iccid, remainingPercent, level, topupPackagesUrl. Never a key.
- The PUT response returns a signing secret once; registering again rotates it. Verify AgentSIM-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, t + "." + raw body)> and reject t older than 5 minutes.
- Answer 2xx within 5 seconds. We try 3 times and never follow redirects. The URL must be public HTTPS on port 443.
Test checkout and sandbox
This site runs the test checkout: no real payment is taken.
- Test checkout (deployments with PAYMENT_MODE=mock): checkoutUrl opens https://agent-sim-omega.vercel.app/dev/checkout/<ord_id> instead of Stripe. Press "Pay (test)" and the order is fulfilled as usual with a test eSIM. No card and no money.
- Stripe test mode (PAYMENT_MODE=stripe with an sk_test_ key): checkoutUrl is Stripe Checkout. Pay with card 4242 4242 4242 4242, any future expiry and any CVC.
- How to tell: a checkoutUrl under /dev/checkout/ is the test checkout; checkout.stripe.com is Stripe and labels test mode on the page.
Machine-readable files
- OpenAPI 3.1 spec: every endpoint, field and error
- MCP server card: server URL and tools
- API catalog: RFC 9727 linkset
- llms.txt: site map for LLMs
Browsing recipe: AI agent information | This page as markdown | Support https://agent-sim-omega.vercel.app/contact