Skip to main content
An inbox is a unique capture endpoint that records every HTTP request sent to it — method, headers, body, query string, and all. Use the Inboxes API to create inboxes programmatically so your CI pipeline or test setup can spin up a fresh capture target for each run without any manual steps in the dashboard.

Create an inbox

Creates a new inbox and returns its unique ID and ingest URL. No authentication is required to create an anonymous inbox.

Request

No request body is required.
curl -X POST https://api.webhooktrap.dev/api/v1/inboxes

Response

{
  "data": {
    "inbox": {
      "id": "xK9m2pQ7nR4a",
      "ingestUrl": "/i/xK9m2pQ7nR4a"
    }
  }
}
id
string
required
The unique identifier for the inbox. Use this value as the :inboxId path parameter when listing events or constructing the full ingest URL.
ingestUrl
string
required
The relative path of the ingest endpoint for this inbox. Prepend https://webhooktrap.dev to get the full URL — for example, https://webhooktrap.dev/i/xK9m2pQ7nR4a. Point your webhook source at this address.

Send events to an inbox

The ingest endpoint is hosted at a separate origin from the REST API. To capture a webhook, direct your provider or test script to send an HTTP request to:
https://webhooktrap.dev/i/:inboxId
The ingest endpoint accepts any HTTP method — POST, GET, PUT, PATCH, or DELETE — and always returns 200 OK. Webhooktrap records the full request exactly as received, including all headers and the raw body, without modifying anything.
# Example: simulate a Stripe webhook being delivered to your inbox
curl -X POST https://webhooktrap.dev/i/xK9m2pQ7nR4a \
  -H "Content-Type: application/json" \
  -H "Stripe-Signature: t=1705312200,v1=abc123" \
  -d '{"type":"checkout.session.completed","id":"cs_test_..."}'
After the request lands, you can retrieve it through the Events API or replay it to a local server using the Replay API.
Anonymous inboxes expire automatically after 48 hours. If you need an inbox that persists beyond that window, sign in to your account and create an authenticated inbox — authenticated inboxes remain active until you delete them.