Concepts

Notifications

Track progress via polling, SSE streams, and webhook fan-out

Notifications are the primary way to track asynchronous progress.

Delivery channels

PiktID supports two channels:

  1. SSE stream via GET /notifications/events
  2. Webhooks (see Webhooks)

All channels use the same event shape:

{
  "id": 123,
  "name": "batch_edit",
  "data": {},
  "timestamp": 1702819200.0
}

Common event names:

  • batch_edit: a job status changed
  • image_result: an individual image finished processing
  • identity_preprocessing: an identity preprocessing update

SSE behavior

When you connect to the SSE stream, you receive any events that occurred while you were disconnected, then live events as they happen.

Notifications are temporary. Delete them after processing to avoid receiving duplicates on reconnect.

API endpoints

On this page