# Get started

## Before you start

- You need a program owner or super admin account in the Accountable dashboard.
- You need an HTTPS endpoint that accepts `POST` requests from the public internet.

## Add a webhook

1. In the dashboard, open **Account**, then the **Webhooks** tab.

2. Select **Add Webhook**.

3. Enter your endpoint **URL** and choose the **Events** you want. **Description** is optional.

4. Save. Copy the secret that appears and store it somewhere safe. You need it to [verify signatures](https://developers.youareaccountable.com/webhooks/verify-signatures.md).

## Handle the request

Your endpoint should:

1. Read the raw request body before parsing it.
2. [Verify the signature](https://developers.youareaccountable.com/webhooks/verify-signatures.md).
3. Return a `2xx` status within 30 seconds.
4. Do slow work after responding.

The same event can arrive more than once. Use the `X-YAA-Webhook-Id` header to skip events you have already handled. See [Delivery and retries](https://developers.youareaccountable.com/webhooks/delivery.md).

## Manage a webhook

Open the menu (⋮) next to a webhook.

| Action | What it does |
| --- | --- |
| **View Event Logs** | Shows each event sent to this endpoint, with its status and response. You can retry a failed event here. |
| **Show Secret** | Shows the current secret. |
| **Edit** | Changes the URL, events, description or active status. The secret stays the same. |
| **Rotate Secret** | Creates a new secret. The old secret stops working right away. |
| **Delete** | Removes the webhook. |

> **Caution**
>
> Rotating a secret takes effect immediately. Requests signed with the new secret fail verification until your endpoint has it.

## Test before production

Ask us for a staging account and test your endpoint there first. Email [integrations@youareaccountable.com](mailto:integrations@youareaccountable.com).
