# Webhooks

Accountable sends an HTTPS `POST` to your endpoint when something happens for one of your members. Use webhooks to keep your EMR or case management system in sync.

## How it works

1. You add an endpoint URL in the Accountable dashboard and choose the events you want.
2. When one of those events happens, we send a signed JSON request to your URL.
3. Your endpoint verifies the signature and returns a `2xx` status.
4. If the request fails, we retry it.

## What a request looks like

```http
POST /your/endpoint HTTP/1.1
Content-Type: application/json
X-YAA-Webhook-Id: toxicology_665f1c2ab7e4d90012a3f4c1_1767225600000_k3x9q2a
X-YAA-Webhook-Signature: 3q2+7wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
X-YAA-Webhook-Signature-Timestamp: 1767225600
```

```json
{
  "event_type": "toxicology.result.posted",
  "data": {
    "medical_record_number": "3f2b8c1e-7a4d-4e9b-9c55-0d6a1f2e8b47",
    "plan_name": "Standard Plan",
    "test_date": "2026-01-01T00:00:00.000Z",
    "test_type": "10 Panel Instant",
    "test_result": "Negative",
    "self_reported": false,
    "test_id": "665f1c2ab7e4d90012a3f4c2"
  }
}
```

Every body has two fields:

| Field | Type | Description |
| --- | --- | --- |
| `event_type` | string | What happened, such as `toxicology.result.posted`. |
| `data` | object | The details. The shape depends on `event_type`. |

## Events

| Subscribe to | You receive |
| --- | --- |
| [Toxicology](https://developers.youareaccountable.com/webhooks/events/toxicology.md) | Drug test results |
| [Breathalyzer](https://developers.youareaccountable.com/webhooks/events/breathalyzer.md) | Breathalyzer results |
| [Notes](https://developers.youareaccountable.com/webhooks/events/notes.md) | Notes written about a member |
| [Plan details](https://developers.youareaccountable.com/webhooks/events/plan-details.md) | What a member's plan includes |
| [Scheduled intake](https://developers.youareaccountable.com/webhooks/events/scheduled-intake.md) | Intake meetings |
| [Coaching session](https://developers.youareaccountable.com/webhooks/events/coaching-session.md) | Scheduled coaching sessions |

## Next

- [Get started](https://developers.youareaccountable.com/webhooks/get-started.md)
- [Verify signatures](https://developers.youareaccountable.com/webhooks/verify-signatures.md)
