---
title: "Register a webhook subscription"
method: POST
path: "/v1/webhooks"
tags: ["Webhooks"]
---

# Register a webhook subscription

`POST /v1/webhooks`

## Request

- Base URL: `https://api.automatedclientacquisition.com`
- URL: `https://api.automatedclientacquisition.com/v1/webhooks`
- Auth: HTTP bearer

Registers a delivery target and returns the secret ACA will sign its
deliveries with. Keep it — it is not regenerated on read, but it is
returned on read.

Posting the same `target_url` twice updates the existing subscription's
events and re-activates it rather than failing, so an integration that
re-registers on every start is safe. Twenty subscriptions per
organization; `target_url` must be `https` and publicly reachable.

## Request body

- object
  - `target_url` string, uri, required: Where deliveries are POSTed. Must be https.
  - `events` WebhookEvent[], required
  - `source` string: Free-form label for what registered this, e.g. `n8n`.

## Response `200`

An existing subscription for this URL was updated.

- object
  - `success` boolean
  - `data` WebhookSubscription
    - `id` string, uuid
    - `target_url` string, uri
    - `events` WebhookEvent[]
    - `secret` string: Signs this subscription's deliveries as `X-Webhook-Signature`. Returned on read so an integration can recover it.
    - `is_active` boolean
    - `source` string: Free-form label for whatever registered this.
    - `max_attempts` integer
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `201`: Subscription created.
- `400`: Malformed or invalid body. Do not retry — it will fail identically.
- `401`: Missing, invalid or revoked token.
- `409`: This organization already has 20 subscriptions.
- `429`: Over 120 requests in the current minute. `Retry-After` says how many seconds until the window resets; wait that long and continue.
- `500`: Something broke on our side. Safe to retry with backoff.

---

[API](https://skmtc.dev/automatedclientacquisition/apis/aca-api.md) · [All operations](https://skmtc.dev/automatedclientacquisition/apis/aca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/automatedclientacquisition/apis/aca-api/revisions/8f3e3b141311?raw)
