Developer documentation

First delivery in minutes.

Create a destination, issue a scoped key, send an event, and inspect every attempt from one workflow.

Quick start

From workspace to first delivery.

  1. 01

    Create an endpoint and destination URL

  2. 02

    Create an API key with ingest:write

  3. 03

    Send an event and inspect its attempts

Send an event

Replace the example endpoint slug and key with values from your workspace.

cURL
curl -X POST "$TRUEHOOK_API/v1/ingest/billing-events" \
  -H "x-api-key: th_live_..." \
  -H "content-type: application/json" \
  -H "idempotency-key: invoice-1042" \
  -d '{"type":"invoice.paid","data":{"invoiceId":"inv_1042"}}'
Node.js
await fetch(`${process.env.TRUEHOOK_API}/v1/ingest/billing-events`, {
  method: "POST",
  headers: {
    "content-type": "application/json",
    "x-api-key": process.env.TRUEHOOK_API_KEY,
    "idempotency-key": "invoice-1042"
  },
  body: JSON.stringify({ type: "invoice.paid", data: { invoiceId: "inv_1042" } })
});
Python
requests.post(
    f"{os.environ['TRUEHOOK_API']}/v1/ingest/billing-events",
    headers={
        "x-api-key": os.environ["TRUEHOOK_API_KEY"],
        "idempotency-key": "invoice-1042",
    },
    json={"type": "invoice.paid", "data": {"invoiceId": "inv_1042"}},
)

Delivery contract

  • Use a stable idempotency key for every logical event.
  • Verify the Truehook signature before processing a request.
  • Return a 2xx response only after the event is safely accepted.
  • Review retries and dead letters from the dashboard.