PedibeeHelp
Events

Record several events

Up to 100 events in one request, each one handled on its own.

POST/api/v1/events/batch
Scopeevents:write

Sends up to 100 events at once, handy for a queue in your app. Each event is exactly like Record an event and succeeds or fails on its own. The answer is 207 with one result per event, in order.

Body

Prop

Type

Example request

curl -X POST "https://api.pedibee.com/api/v1/events/batch" \
  -H "Authorization: Bearer $PEDIBEE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "events": [
    { "name": "invoice.payment_failed", "id": "evt_1", "contact": { "externalId": "u_42" }, "properties": { "invoice_id": "in_9", "amount": 49 } },
    { "name": "user_signed_up", "id": "evt_2", "contact": { "email": "sam@acme.com" } }
  ] }'

Response

207 Multi-Status
{
  "accepted": 2,
  "rejected": 0,
  "results": [
    { "status": 202, "id": "6703f1c2a9e4b0a1b2c3d4e5", "name": "invoice.payment_failed", "outcome": "NO_CONTACT", "runsStarted": 0 },
    { "status": 202, "id": "6703f1c2a9e4b0a1b2c3d4e6", "name": "user_signed_up", "duplicate": false, "runsStarted": 1 }
  ]
}

Retry only the events that failed. Events with an id are safe to resend either way.

On this page