# All events

You subscribe to a group of events in the dashboard. Each group sends one or more `event_type` values.

| Subscribe to | `event_type` values |
| --- | --- |
| [Toxicology](https://developers.youareaccountable.com/webhooks/events/toxicology.md) (`toxicology`) | `toxicology.result.posted`, `toxicology.result.deleted` |
| [Breathalyzer](https://developers.youareaccountable.com/webhooks/events/breathalyzer.md) (`breathalyzer`) | `breathalyzer.result.posted`, `breathalyzer.result.deleted` |
| [Notes](https://developers.youareaccountable.com/webhooks/events/notes.md) (`notes`) | `notes.created`, `notes.updated`, `notes.deleted` |
| [Plan details](https://developers.youareaccountable.com/webhooks/events/plan-details.md) (`plan_details`) | `plan_details.created`, `plan_details.updated` |
| [Scheduled intake](https://developers.youareaccountable.com/webhooks/events/scheduled-intake.md) (`scheduled_intake`) | `scheduled_intake.created`, `scheduled_intake.canceled` |
| [Coaching session](https://developers.youareaccountable.com/webhooks/events/coaching-session.md) (`coaching_session`) | `coaching_session.created`, `coaching_session.updated`, `coaching_session.canceled` |

## Shared fields

Most events include these fields in `data`.

| Field | Type | Description |
| --- | --- | --- |
| `medical_record_number` | string (UUID) | The member's medical record number. Use it to match the event to your own record. |
| `plan_name` | string | The member's Accountable plan. Optional. |

> **Caution: Medical record numbers must be UUIDs**
>
> We send events only for members whose medical record number is a UUID, such as `3f2b8c1e-7a4d-4e9b-9c55-0d6a1f2e8b47`. Events for other members are skipped.

## JSON Schemas

Every event has a JSON Schema with example payloads. Use them to generate types or to validate requests.

- [`/schemas/webhook-event.json`](https://developers.youareaccountable.com/schemas/webhook-event.json) covers every event in one file.
- Each event also has its own file at `/schemas/{event_type}.json`, such as [`/schemas/notes.created.json`](https://developers.youareaccountable.com/schemas/notes.created.json).

The schemas allow fields they don't list, because new fields can be added.

## Reading payloads

- **Dates** are ISO 8601 strings in UTC.
- **IDs** are strings. Treat them as opaque.
- **Optional fields** can be `null` or left out. Check for both.
- **New fields** can be added at any time. Ignore fields you don't recognize.
- **Delete and cancel events** carry only an ID, because the record is gone.
