---
title: "add webhook"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# add webhook

`POST /webhooks`

Add a new webhook to your Raisely account. By default, this webhook will trigger for events across all campaigns in your Raisely account. Specify a `campaignUuid` if you'd like to restrict it to one campaign.
#### For custom components:
`RaiselyComponents.api.all('webhooks').post(data = {}, params = {}, headers = {}) => Promise<{result}>`

 :fa-gears: See [Restie Response Data](https://github.com/raisely/restie#reading-and-handling-responses) for a more detailed overview of responses through the client wrapper

## Headers

- `Authorization` string

## Request body

- object
  - `data` CreateWebhook
    - `campaignUuid` string — Filter events to the specific campaign only. If omitted you will receive events for the whole Raisely account. Example: `f2a3bcb0-96d8-11e9-8a7b-47a01a90ec39`
    - `events` unknown[] — Array of events to forward to the webhook Examples: `badge.awarded`, `badge.revoked`, `donation.created`, `donation.deleted`, `donation.succeeded`, `donation.updated`, `donation.refunded`, `donation.achDisputed`, `post.created`, `post.deleted`, `post.updated`, `profile.created`, `profile.deleted`, `profile.totalUpdated`, `profile.exerciseTotalUpdated`, `profile.updated`, `profile.memberAdded`, `profile.memberRemoved`, `subscription.created`, `subscription.deleted`, `subscription.failed`, `subscription.failing`, `subscription.succeeded`, `subscription.rebilled`, `subscription.updated`, `subscription.paused`, `subscription.resumed`, `subscription.cancelled`, `subscription.achDisputed`, `subscription.achVerificationEmailSent`, `donation.achVerificationEmailSent`, `user.created`, `user.updated`, `order.created`, `order.succeeded`
      - unknown
    - `secret` string — A shared secret for use with your webhook. This will be included in the payload from Raisely so you can verify it is authentic.
    - `url` string — The url to send the webhooks to Example: `https://myapp.com/raisely`

## Response `200`

The created Webhook record

- object
  - `data` CreateResultWebhook
    - `uuid` string — Unique identifier for the record
    - `createdAt` string — Date and time the record was created
    - `campaignUuid` string — Filter events to the specific campaign only. If omitted you will receive events for the whole Raisely account.
    - `events` unknown[] — Array of events to forward to the webhook
      - unknown
    - `secret` string — A shared secret for use with your webhook. This will be included in the payload from Raisely so you can verify it is authentic.
    - `url` string — The url to send the webhooks to

## Other responses

- `401` — Authorization credentials were missing or invalid
- `403` — The user is authenticated, but is not allowed to perform the requested operation
- `410` — The requested record no longer exists, or that API has been deprecated
- `429` — You have made too many requests to the given endpoint, please try again later
- `500` — An unexpected error has occurred with Raisely. If the error persists you can contact support@raisely.com

---

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