---
title: "Subscribe to purchase events"
method: POST
path: "/webhooks/subscriptions"
tags: ["webhooks"]
---

# Subscribe to purchase events

`POST /webhooks/subscriptions`

## Headers

- `Authorization` string, required

## Request body

- SubscriptionCreate
  - `url` string, uri, required — HTTPS endpoint where Andel will POST events.
  - `event_types` SubscriptionCreateEventTypesItems[], required
  - `description` string — Human-readable label for this subscription.

## Response `201`

Subscription created. The response includes the signing secret used to verify webhook payloads.

- SubscriptionWithSecret
  - `subscription_id` string, uuid, required
  - `url` string, uri, required
  - `event_types` string[], required
  - `description` string
  - `created_at` string, date-time, required
  - `signing_secret` string, required — Secret used to verify the X-Andel-Signature header on webhook deliveries. Returned once at creation.

## Other responses

- `400` — Invalid request.
- `401` — Missing or invalid token.
- `500` — Unexpected server error.

---

[API](https://skmtc.dev/andel/apis/data-exchange-api.md) · [All operations](https://skmtc.dev/andel/apis/data-exchange-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/andel/data-exchange-api/revisions/a249ede79c75/schema)
