# Receive webhook events

> Subscribe to webhooks to be notified when sessions change state or goals complete.

canonical: https://agentsky.dev/help/webhook-events
source: https://agentsky.dev/help/webhook-events.md
updated: 2026-10-21

---

**Subscribe to webhooks to be notified when sessions change state or goals complete.**

Webhooks let your server receive real-time notifications from AgentSky — no polling needed. Register a URL and AgentSky will POST events to it as they happen.

**How to register a webhook:**

1. `POST /api/v1/webhooks` with your endpoint URL and the event types you want to receive.
2. AgentSky will POST to your URL when matching events occur.
3. Respond with a 2xx status code to acknowledge each event.

**Available events:**

| Event | When it fires |
|---|---|
| `goal.completed` | The agent finished its goal |
| `goal.stopped` | The goal was stopped manually |
| `goal.paused` | The goal is waiting for input |
| `goal.resumed` | The goal resumed after a pause |
| `turn.completed` | A single turn (message + response) finished |

**Verifying webhook signatures:**

AgentSky signs each webhook request with a signature header. Always verify this signature before acting on the payload — it confirms the request came from AgentSky.

Where: API

**Good to know:** Your endpoint must respond within a few seconds or the delivery will be retried. Related: [Use the AgentSky API](https://agentsky.dev/help/api-overview), [Automate goals and routines via the API](https://agentsky.dev/help/goals-and-routines-api).
