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"}}'Reference
Developer documentation
Create a destination, issue a scoped key, send an event, and inspect every attempt from one workflow.
Quick start
Create an endpoint and destination URL
Create an API key with ingest:write
Send an event and inspect its attempts
Replace the example endpoint slug and key with values from your workspace.
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"}}'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" } })
});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"}},
)