Docs Sign in Get a key

Docs / API reference

Events API

Reference of the Hapti events endpoints: parameters, fields and real responses.

Every endpoint takes a key in the Authorization header: Authorization: Bearer hp_test_.... Base address: https://api.hapti.dev. The full specification is in openapi.json.

List events

HTTP
GET /v1/events

Every event of the last 30 days, the same objects webhooks send.

ParameterInDescription
typequeryAn event type, or a family like task.*
objectqueryOnly the events of this task or object id
sincequeryISO date
limitqueryUp to 100
cursorquerynext_cursor of the previous page
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "evt_c3b9a22cc8666f754e930055",
      "object": "event",
      "type": "task.succeeded",
      "api_version": "2026-11-22",
      "created_at": "2026-11-22T18:40:56.191Z",
      "mode": "test",
      "data": {
        "id": "tsk_9a96d9052acef545",
        "object": "task",
        "batch": null,
        "schedule": null,
        "mode": "test",
        "status": "succeeded",
        "paused": null,
        "level": "standard",
        "price_cents": 0,
        "starting_price_cents": 10,
        "billed": false,
        "user": "customer_42",
        "url": "https://portal.example.com/claims",
        "goal": "Declare the water damage claim and give me the claim number.",
        "input": {
          "data": {
            "contract": "AX-4471",
            "date": "2026-11-20"
          },
          "files": []
        },
        "pending": null,
        "learn": true,
        "used_recipe": null,
        "template": null,
        "created_by": {
          "type": "key",
          "id": "key_d160ed300d0cf627",
          "hint": "hp_test_7eF…ZD9D",
          "name": "default test key",
          "owner_email": null
        },
        "recipe_chosen": null,
        "recipe": null,
        "dispute": null,
        "result": {
          "answer": "The claim is declared. Claim number SIN-2026-118.",
          "data": {
            "claim_number": "SIN-2026-118"
          }
        },
        "files": [],
        "usage": {
          "steps": 14
        },
        "created_at": "2026-11-22T18:40:56.170Z",
        "finished_at": "2026-11-22T18:40:56.190Z"
      }
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total": 1
}

Get an event

HTTP
GET /v1/events/{id}
ParameterInDescription
idpathEvent id

Follow every task live

HTTP
GET /v1/stream

Server-Sent Events: a task event each time a task of the mode changes state.