Kalpana Docs
Resources

List sample events

Recent events of one type, as a webhook sends them, for building an automation.

GET /api/webhooks/samples

Requires webhooks:read.

NameTypeRequiredDescription
workspacestringYesWorkspace slug or id.
typestringYesbatch.completed or job.completed.
curl "https://app.kalpana.one/api/webhooks/samples?workspace=acme&type=batch.completed" \
  --header "x-api-key: $KALPANA_API_KEY"

Response

Up to three of the workspace's most recent events of that type, newest first, in the envelope a webhook sends. An automation can then be built with real fields before anything fires.

[
  {
    "id": "sample-0192f8a4-6c1e-7c3a-9b0e-4d2f1a7e5c11",
    "type": "batch.completed",
    "api_version": "2026-10-20",
    "created_at": "2026-10-20T09:41:07.512Z",
    "workspace_id": "ws_123",
    "data": {
      "batch": { "id": "0192f8a4-6c1e-7c3a-9b0e-4d2f1a7e5c11", "name": "Diwali sale" },
      "counts": { "total": 480, "succeeded": 477, "failed": 3, "cancelled": 0 }
    }
  }
]

Each sample's id starts with sample-. A batch.completed sample is a batch whose rows have all finished. A job.completed sample is a recent creative, with the same data as the job.completed event. A workspace with none yet gets one placeholder.

Errors

StatusCause
400type is missing or not one of the values above.
403Your role or key lacks webhooks:read.
Was this page helpful?

Updated 4 Nov 2026

On this page