Skip to content
AstroWay/api v2.95.1 · docs
all systems operational

Cosmic Notifications — webhooks for astrological events

Turn the AstroWay API from request-response into an event stream. Instead of polling the sky in a loop, you subscribe a URL to an event type — and AstroWay delivers a webhook the moment it occurs (signed with HMAC-SHA256, with auto-retry and auto-disable of dead subscriptions).

These events are mundane (global sky state, independent of natal data) — every subscriber receives the same payload.

EventRegisterFires when
retrograde-startPOST /v1/webhooks/retrograde-starta planet (Mercury–Pluto) stations retrograde
retrograde-endPOST /v1/webhooks/retrograde-enda planet stations direct
sign-ingressPOST /v1/webhooks/sign-ingressa planet (Sun + Mercury–Pluto) enters a new sign
void-of-course-startPOST /v1/webhooks/void-of-course-starta void-of-course (VOC) Moon period begins
eclipse-alertPOST /v1/webhooks/eclipse-alert7 days before a solar or lunar eclipse

Requires an API key bound to your account.

Terminal window
curl -X POST https://api.astroway.info/v1/webhooks/retrograde-start \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "url": "https://your-app.com/hooks/astroway" }'
# { "id": 44, "event": "retrograde-start",
# "url": "https://your-app.com/hooks/astroway",
# "signing_secret": "a1b2…", ← store it; it verifies the signature
# "active": true }

Manage subscriptions: GET /v1/webhooks (list), GET /v1/webhooks/{id}, DELETE /v1/webhooks/{id}, POST /v1/webhooks/{id}/test (test delivery to your URL).

A POST with headers X-AstroWay-Signature: sha256=<hmac>, X-AstroWay-Event, X-AstroWay-Delivery-Id and body:

{
"event": "retrograde-start",
"delivered_at": "2026-07-15T12:00:00.000Z",
"subscription_id": 44,
"data": {
"planet": "Mercury",
"station": "retrograde",
"exactAt": "2026-07-15T11:48:09.967Z",
"sign": "Leo",
"longitude": 142.31
}
}

The signature is HMAC-SHA256(signing_secret, raw_body) in hex. Compare it to the X-AstroWay-Signature header (without the sha256= prefix):

import { createHmac, timingSafeEqual } from 'node:crypto';
function verify(rawBody, header, secret) {
const expected = createHmac('sha256', secret).update(rawBody).digest('hex');
const got = header.replace(/^sha256=/, '');
return got.length === expected.length &&
timingSafeEqual(Buffer.from(got), Buffer.from(expected));
}

A subscription auto-disables after 5 consecutive failed deliveries (non-2xx or an 8s timeout) — re-enable it via GET /v1/webhooks; pausing/resuming resets the counter.

Registering and managing subscriptions costs Tier 1 (10 credits) per call, made rarely. Event delivery to your URL is not metered — there is no separate tier.

Was this helpful?
Suggest an edit

Last updated: