Skip to content

Events API

Ingest events and replay past events.

See the Events concept for background.

POST /v1/events

Submit an event. Harbor accepts it, matches subscriptions, and schedules deliveries.

NameTypeRequiredDescription
typestringyesThe event type, e.g., ‘order.created’.
bodyobjectyesArbitrary JSON up to 256 KB.
idempotency_keystringno24-hour deduplication window. Recommended for all producers.
occurred_atstringnoISO-8601 timestamp. Defaults to now.

The event object with its event_id and a list of scheduled deliveries.

Terminal window
curl -X POST https://api.harbor.example/v1/events \
-H "Authorization: Bearer hk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"type": "order.created",
"body": {
"order_id": "ord_123",
"amount_cents": 4500
},
"idempotency_key": "ord_123_created"
}'
  • invalid_event_type
  • body_too_large
  • idempotency_key_conflict

POST /v1/events/{id}/replay

Re-deliver an existing event to all matching subscriptions (or a subset).

NameTypeRequiredDescription
destination_idsarraynoReplay only to these destinations. Omit to replay to all matching subscriptions.

A list of new deliveries that were scheduled.

Terminal window
curl -X POST https://api.harbor.example/v1/events/dest_01HXYZ/replay \
-H "Authorization: Bearer hk_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"destination_ids": [
"dest_01HXYZ"
]
}'
  • event_not_found
  • event_too_old
  • destination_not_subscribed