Amarsia
API Reference

Events API

Query the immutable event log for your workspace.

Overview

Events are append-only records of everything that has happened to resources in your workspace. You can query them for audit trails, debugging, and building reactive systems.

List events

GET /v1/events

Query parameters

ParameterTypeDescription
resourceIdstringFilter events for a specific resource
typestringFilter by event type (e.g. resource.created)
fromISO 8601Start of time range
toISO 8601End of time range
limitintegerResults per page (default: 20, max: 100)
cursorstringPagination cursor

Response

{
  "data": [
    {
      "id": "evt_01j...",
      "type": "resource.created",
      "resource_id": "res_01j...",
      "payload": { ... },
      "occurred_at": "2025-01-01T00:00:00Z"
    }
  ],
  "meta": {
    "nextCursor": "cursor_...",
    "hasMore": false
  }
}

Get event

GET /v1/events/:id

Response

{
  "data": {
    "id": "evt_01j...",
    "type": "resource.updated",
    "resource_id": "res_01j...",
    "payload": {
      "before": { "name": "Jane" },
      "after": { "name": "Jane Doe" }
    },
    "occurred_at": "2025-01-01T00:00:00Z"
  }
}

Event types

TypeDescription
resource.createdA new resource was created
resource.updatedA resource's fields were changed
resource.deletedA resource was deleted
integration.connectedAn integration was enabled
integration.disconnectedAn integration was disabled

Events cannot be created, updated, or deleted through the API. They are written automatically by the platform.