> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myabode.ca/llms.txt
> Use this file to discover all available pages before exploring further.

# Events: keep your system in sync

> Use the myAbode Deals event feed to follow every deal and task change in order, covering created, updated, status changed, agent added and task reassigned, and keep a CRM or back office in sync.

The event feed lists every change to your deals and tasks in the order it happened, oldest first. Poll it to keep another system in sync, including changes that a list query can't show, such as a deleted deal.

Requires the `events:read` scope (and `tasks:read` for task events).

## Event types

| Type | When |
| - | - |
| `deal.created` | A new deal is opened |
| `deal.updated` | A deal's details change |
| `deal.status_changed` | A deal moves stage, for example to `READY_FOR_PAYOUT` |
| `deal.deleted` / `deal.restored` | A deal is removed or brought back |
| `deal.agent_added` / `deal.agent_removed` | An agent joins or leaves a deal |
| `deal.primary_agent_changed` | The deal's primary agent changes |
| `task.created` | A task is opened on a deal |
| `task.status_changed` | A task is held, completed or dismissed |
| `task.reassigned` | A task moves to another person or queue |

New event types may be added. Ignore types you don't handle.

## Polling the feed

**1. Start from now.** On first run, ask for the current position without replaying history:

```bash theme={null}
curl "https://api.myabode.ca/v1/events?start=latest" \
  -H "Authorization: Bearer $MYABODE_API_KEY"
```

Then load your starting state from the list endpoints (for example, page through `/v1/deals`).

**2. Poll forward.** Save `next_cursor` and send it back on every poll:

```bash theme={null}
curl "https://api.myabode.ca/v1/events?cursor=eyJlIjox..." \
  -H "Authorization: Bearer $MYABODE_API_KEY"
```

`next_cursor` is never null. When `has_more` is `false` you are caught up. Wait a little and poll again from the same cursor.

**3. Fetch the subject.** Each event names its `subject` (the deal or task) and `actor` (who made the change). Two changes to the same deal can arrive out of order, so fetch the subject for its current state instead of replaying the change yourself. If the fetch returns `404`, the subject was deleted or your key can no longer read it: remove it from your copy.

```json theme={null}
{
  "object": "event",
  "id": "k3x9q2m8v1c7p0w4z6r5t8yb",
  "type": "deal.status_changed",
  "created_at": "2026-11-05T15:04:11.000Z",
  "brokerage": "cmod1dl5o000407u37fg702my",
  "deal": "q9lmv8ce5rlucyc0lljw0a4l",
  "subject": { "object": "deal", "id": "q9lmv8ce5rlucyc0lljw0a4l" },
  "actor": { "type": "user", "id": "…", "name": "Avery Thompson", "impersonated_by": null }
}
```

Narrow the feed with `type` and `brokerage`, for example `?type=deal.status_changed&type=deal.created`.

## When a cursor expires

In rare cases, such as after a major upgrade, an old cursor can no longer be read and the feed returns `410 CURSOR_EXPIRED`. Start again from `start=latest` and reload your state from the list endpoints.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.