---
title: "Create Webhook Subscription"
method: POST
path: "/webhooks/subscribe"
tags: ["Webhooks"]
---

# Create Webhook Subscription

`POST /webhooks/subscribe`

Subscribe to outbound webhook deliveries. Events: report-ready, transit-alert, eclipse-alert. Returns a signing_secret used to verify the X-AstroWay-Signature HMAC-SHA256 header on each delivery.

## Request body

- Subscribe
  - `event` 'report-ready' | 'transit-alert' | 'eclipse-alert' | 'transit-trigger' | 'retrograde-start' | 'retrograde-end' | 'return-due' | 'dasha-change' | 'mahadasha-end' | 'void-of-course-start' | 'planetary-hour-tick' | 'sign-ingress', required
  - `url` string, uri, required

## Response `200`

Successful calculation

- object
  - `ok` boolean
  - `data` object
    - `id` number, nullable
    - `event` string, nullable
    - `url` string, nullable
    - `signing_secret` string, nullable
    - `active` boolean, nullable
    - `created_at` string, nullable

## Other responses

- `400` — Validation error
- `401` — Missing or invalid API key

---

[API](https://skmtc.net/astroway/apis/astroway-calculation-api.md) · [All operations](https://skmtc.net/astroway/apis/astroway-calculation-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/astroway/astroway-calculation-api/revisions/6828e5609564/schema)
