API Library
The API Library is a catalogue of ready-made virtual services that behave like popular vendor APIs. Each pack replicates one vendor’s API: its routes, its response shapes, and (for the main resources) real behavior. Create a customer, then list, fetch, update or delete it, the way the real API works. Install a pack and you get an ordinary virtual service of your own, on a datacenter you choose, that your tests can call instead of the vendor.
Use it when the vendor’s sandbox is slow, rate-limited, shared, or costs money, or when you need failures and edge cases the real API won’t produce on demand.
Install a pack
Section titled “Install a pack”-
Open the library. In Virtual services, choose the API Library tab. Filter by category or search by name.
-
Open a pack. The pack page lists what it covers: the stateful resources, every operation, the webhook events it can send, the limits, and the license.
-
Install. Choose Install, name your service and pick the datacenter it runs on (a shared MaxoPerf site, or a self-hosted private datacenter). Optionally set a webhook receiver now. The new service opens as a draft; Start it when you are ready.
You can also install without the console:
- API.
POST /v1/virtual-services/library/{packId}/installwith aworkspaceId, anameand aplacement. List packs withGET /v1/virtual-services/libraryand read one withGET /v1/virtual-services/library/{packId}. See the API reference. - MCP / Loadrigo. The
list_vs_library_packs,get_vs_library_packandinstall_vs_library_packtools do the same from an agent. See MCP tools.
Installing needs editor access in the workspace. Viewers can browse the library but not install.
Call it like the real API
Section titled “Call it like the real API”Send requests to your service’s endpoint exactly as you would to the vendor, with the same paths, methods and bodies, including form-encoded bodies where the vendor uses them.
Authentication. Each pack page shows its auth scheme with an example (for instance authorization: Bearer sk_test_…). The mock accepts any credential of that shape, so your code does not need to change except for the base URL.
Seeded data. Many packs start with a few records so a fresh service answers list calls usefully. Create calls add to them.
State: what the mock remembers
Section titled “State: what the mock remembers”Stateful resources (customers, charges, issues and so on) are remembered in MaxoPerf’s durable database, so they survive restarts and idle shutdown. Callers are told apart by their credential, so two test users do not see each other’s data.
- Limits. Each collection holds up to the size shown under Limits on the pack page (1 MiB per collection per caller for most packs). A write that would exceed the limit is refused with a state-limit error instead of silently dropping data. Plan test data volumes accordingly.
- Clear state. To start over, open the service’s State tab and clear it. Seeded records come back.
Webhooks
Section titled “Webhooks”Some packs send webhooks the way the vendor does: after a call such as “create customer”, the mock sends a customer.created event to your receiver.
Set the receiver. Use the Webhook target setting on the service’s Deployment tab (or fill it in when you install). It takes a URL and, optionally, a signing secret: pick a workspace secret; the console only ever stores its name and never shows its value.
Target setting versus vendor registration. Real vendors let you register webhook endpoints through their API (Stripe’s webhook_endpoints, GitHub’s hooks). Where the pack replicates that API, an endpoint you register through the mock receives the events it subscribed to. Otherwise events go to the service’s webhook target.
Signatures. Deliveries are signed the way the vendor signs them, so your signature check runs unchanged against the mock. Use the secret you selected as the signing secret.
| Scheme | Header(s) | What is signed |
|---|---|---|
| Stripe / WorkOS / Paddle style | Stripe-Signature, WorkOS-Signature, Paddle-Signature | timestamp plus raw body, HMAC-SHA256 |
| HMAC over the body | vendor header (GitHub, Meta, Intercom, Xero) | raw body, SHA-256 or SHA-1 |
| Standard Webhooks / Svix | svix-* or webhook-* | id, timestamp and body, HMAC-SHA256 |
| Slack | X-Slack-Signature, X-Slack-Request-Timestamp | v0: + timestamp + body |
| Twilio | X-Twilio-Signature | URL plus sorted form parameters, HMAC-SHA1 |
| Square, Box, HubSpot | vendor header | URL or method/URI, body and timestamp, SHA-256 |
| Timestamp template | vendor headers (Revolut, Webflow, Zendesk and others) | the vendor’s own string of timestamp, raw body and/or URL, HMAC-SHA-256 or SHA-1; packs whose vendor hex-decodes the key (Close) need a hex signing secret — otherwise the delivery fails with “signing failed” |
A pack whose vendor scheme cannot be reproduced sends unsigned deliveries and says why on its pack page.
Delivery behavior. Events are sent after the response has been returned, with up to four attempts and a ten-second timeout each. Events are queued in memory on the mock; if the queue is full an event is dropped, and anything still pending when the service stops is reported as failed.
Webhook deliveries panel. The Deployment tab lists recent deliveries, failures first: the event, the target (query string and credentials are stripped), the HTTP status, the attempts and the error. Filter by outcome:
| Outcome | Meaning |
|---|---|
| Delivered | Your receiver answered with a success status. |
| Failed | Every attempt failed or timed out. |
| Blocked | The target is a private or internal address. |
| Dropped | The mock’s queue was full, so the event was not sent. |
The panel keeps the newest failures and the newest successes separately, so a burst of successful deliveries during a load test never pushes failures out of view.
Verification badges
Section titled “Verification badges”Each pack carries a badge that says how it was checked:
- Spec-verified. Every operation answers with a body that validates against the vendor’s published schema, and the stateful resources pass behavior tests (create, read, list, update, delete, pagination, errors, isolation between callers, webhooks and signatures).
- Sandbox-verified. As above, and responses were also compared with the vendor’s own sandbox.
A badge does not claim the mock matches production in every corner: operations whose vendor description declares no response schema cannot be checked, and the pack page lists them.
Updates: a new copy, not an in-place upgrade
Section titled “Updates: a new copy, not an in-place upgrade”Installing copies the pack into your workspace. Your service is yours to edit and is never changed by a later pack version. When a newer version exists, the service shows Update available. Choosing it installs a new copy (named <your name> (v<version>)) beside the old one; delete the old one when you no longer need it.
Install groups (the groups of transactions a pack creates) stay out of the Transaction groups list until you turn on Show API Library groups, and they are removed together with their service.
If you see “This mock runs an older runtime”
Section titled “If you see “This mock runs an older runtime””Services started before the library runtime shipped cannot serve form bodies or send webhooks. The service shows a warning with Redeploy now. Redeploying restarts the mock briefly, so traffic is dropped while it restarts, and brings up the current runtime.