Skip to main content
The Event Service provides endpoints to publish events to the central ledger and query the append-only history. Base URL: https://api.thygon.com

Publish events

Publish a new event

POST /events Append a new, immutable event record to the organizational ledger. All workflows matching this event type will be triggered asynchronously. Request body:
{
  "type": "support.ticket.created",
  "actor": {
    "type": "user",
    "id": "usr_human_4455",
    "name": "Jane Doe"
  },
  "payload": {
    "ticketId": "TCK-101",
    "title": "Unable to modify team role settings",
    "priority": "high"
  },
  "orgId": "org_acme_123"
}
Response (201 Created):
{
  "success": true,
  "data": {
    "id": "evt_9b1a8c7e6f",
    "type": "support.ticket.created",
    "actor": {
      "type": "user",
      "id": "usr_human_4455",
      "name": "Jane Doe"
    },
    "payload": {
      "ticketId": "TCK-101",
      "title": "Unable to modify team role settings",
      "priority": "high"
    },
    "orgId": "org_acme_123",
    "timestamp": "2026-06-16T17:00:00.000Z"
  }
}

Query events

Query event log

GET /events Query and filter events recorded in the ledger. Query parameters:
  • type (string, optional): Filter by exact event type handle.
  • limit (integer, optional): Maximum number of events to return. Default is 50.
  • cursor (string, optional): Token used to fetch the next page of results.
Response (200 OK):
{
  "success": true,
  "data": {
    "events": [
      {
        "id": "evt_9b1a8c7e6f",
        "type": "support.ticket.created",
        "actor": {
          "type": "user",
          "id": "usr_human_4455"
        },
        "payload": {
          "ticketId": "TCK-101"
        },
        "timestamp": "2026-06-16T17:00:00.000Z"
      }
    ],
    "nextCursor": "cx_eyJvZmZzZXQiOjEwfQ"
  }
}

Get a single event

GET /events/{id} Retrieve the full details and payload of a specific event using its unique ID. Path parameters:
  • id (string, required): The unique event ID.
Response (200 OK):
{
  "success": true,
  "data": {
    "id": "evt_9b1a8c7e6f",
    "type": "support.ticket.created",
    "actor": {
      "type": "user",
      "id": "usr_human_4455"
    },
    "payload": {
      "ticketId": "TCK-101"
    },
    "timestamp": "2026-06-16T17:00:00.000Z"
  }
}