Events API

Poll for state changes across your CRM data. Events provide an ordered log of everything that happens in your org — contact creation, deal stage moves, and more.

See also: Webhooks & Events concepts

Endpoints

MethodPathDescription
GET/eventsList events

List events

GET /events

Returns events in chronological order. Use cursor-based pagination to consume the stream incrementally.

Query parameters

ParameterTypeDescription
cursorstringPagination cursor (resume from last position)
limitintegerResults per page (default 50, max 200)
typestringFilter by event type (e.g. contact.created)

Example

curl "$REX_URL/events?limit=10" \
  -H "X-Api-Key: $REX_API_KEY"

Response

{
  "data": [
    {
      "id": "evt_01HQ...",
      "type": "contact.created",
      "occurred_at": "2026-03-16T12:00:00Z",
      "data": {
        "contact_id": "cont_01HQ...",
        "email": "ada@example.com"
      }
    },
    {
      "id": "evt_02HQ...",
      "type": "deal.stage_changed",
      "occurred_at": "2026-03-16T12:05:00Z",
      "data": {
        "deal_id": "deal_01HQ...",
        "from_stage_id": "stg_01HQ...",
        "to_stage_id": "stg_02HQ..."
      }
    }
  ],
  "has_more": true,
  "next_cursor": "eyJpZCI6..."
}

Event types

Events follow a resource.action naming convention. Common types include:

Event typeDescription
contact.createdA contact was created
contact.updatedA contact was updated
contact.deletedA contact was deleted
contact.enrichedA contact was enriched with external data
company.createdA company was created
company.updatedA company was updated
company.deletedA company was deleted
company.enrichedA company was enriched with external data
deal.createdA deal was created
deal.updatedA deal was updated
deal.deletedA deal was deleted
deal.stage_changedA deal moved to a new pipeline stage
deal.wonA deal was marked as won
deal.lostA deal was marked as lost
activity.createdAn activity was logged
activity.updatedAn activity was updated
activity.deletedAn activity was deleted
trigger.deal.staleA deal has had no activity beyond the threshold
import.completedA CSV/bulk import finished

Polling pattern

To consume events incrementally, store the next_cursor from each response and pass it on the next request:

# First poll
curl "$REX_URL/events?limit=100" -H "X-Api-Key: $REX_API_KEY"

# Subsequent polls (using cursor from previous response)
curl "$REX_URL/events?limit=100&cursor=eyJpZCI6..." -H "X-Api-Key: $REX_API_KEY"

When has_more is false, you are caught up. Poll again after a delay (e.g. 10-30 seconds) to check for new events.

For real-time delivery instead of polling, see the Webhooks API.

Was this page helpful?

·