Route Behavior
Callouts (Webhooks)
Some APIs don't just answer you — they call you back. A payment provider confirms asynchronously, a job queue posts a completion webhook, an integration pings your endpoint when something changes. A callout makes a mocked route do the same thing: respond as normal, then send a request of your own.
Requires a signed-in account — free, not Pro-gated. Since a callout is a real outbound request made in your name, it's not available to anonymous mocks.
Setting one up
In the route's Advanced section, click Add callout and give it a method, a URL, and a JSON body. Optionally set a delay in milliseconds before it fires.
When the route is called, MockBase responds to the caller immediately and sends the callout in the background — the caller never waits for it, which is what makes this behave like a real asynchronous callback rather than a chained request.
Echoing the request
Turn on dynamic templates for the route and the callout body is rendered too, with the same request context the response has:
{
"event": "order.created",
"order_id": "{{ request.body.id }}",
"received_at": "{{ now() }}"
}So the webhook your app receives can carry data from the request that triggered it, which is usually what makes the test meaningful. If the template fails to render, the callout still fires with the unrendered body rather than being dropped — a broken callout template never affects the response the caller is waiting on.
The delay is the point
A webhook that arrives instantly hides a whole class of bug. Set a delay of a few hundred milliseconds — or several seconds — and the callout lands after your client has finished processing the response, which is exactly the race real integrations have to survive. It's the difference between testing that you can receive a webhook and testing that you can receive one at an inconvenient moment.
Failures are silent by design
A callout runs after the response has already gone out, so there is nobody left to report an error to. If the target is unreachable, times out, or returns a 500, the callout is simply dropped — it never turns into a failure on the request that triggered it, and never appears as an error to the caller.
When it fires
Whenever the route matched and responded — including when chaos injection broke that response. That's deliberate: an API that calls you back after failing is a scenario worth exercising, not one to hide.
It does not fire for a request that matched no route, since there is no route to carry the configuration.
Safety
The target URL is checked before any bytes are sent: the scheme must be http or https, and the resolved address must be public. A callout can't be pointed at a loopback, private, or link-local address, so it can't be used to reach a service inside MockBase's own network. This is the same guard Record & Replay uses, for the same reason — both let a mock owner specify a URL the server will connect to.