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

# Create a webhook

`POST /api/v1/webhooks`

## Request

- Base URL: `https://app.tryadeli.com`
- URL: `https://app.tryadeli.com/api/v1/webhooks`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/adeli/apis/adeli-api/docs/api/v1/webhooks/post.ts> (a function with typed inputs; its response is checked against the schema)

Registers a URL for comment.created, message.postback and message.created events on one profile. Pass `platform` (`instagram`, `tiktok`, `facebook` or `whatsapp`) to receive one platform's events only; omit it to receive every supported platform. Each platform sends only some events: `comment.created` comes from Instagram and TikTok, `message.postback` from Instagram, and `message.created` (inbound direct messages) from Instagram, Facebook and WhatsApp. A platform with an event it does not send is 422 unsupported_for_platform. The signing secret is returned only in this response.

## Request body

- object
  - `profileId` string, uuid, required
  - `url` string, required
  - `events` string[], required
  - `platform` 'instagram' | 'tiktok' | 'facebook' | 'whatsapp': Receive events from this platform only. Omit to receive every supported platform. `message.postback` requires `instagram` or no platform; `comment.created` requires `instagram`, `tiktok` or no platform; `message.created` requires `instagram`, `facebook`, `whatsapp` or no platform.

## Response `201`

Success

- object
  - `webhook` object, required
    - `id` string, uuid, required
    - `profileId` string, uuid, required
    - `url` string, required
    - `events` string[], required
    - `platform` 'instagram' | 'tiktok' | 'facebook' | 'whatsapp', nullable: The one platform this webhook receives events from, or null for every supported platform. Always present in responses; optional so clients built before it existed still type-check.
    - `status` 'active' | 'disabled', required
    - `createdAt` string, date-time, required
  - `secret` string, required

## Other responses

- `400`: Invalid request or provider failure
- `401`: Missing or invalid API key
- `404`: Profile, account, or object not found
- `422`: The connected account cannot perform this operation
- `502`: Invalid request or provider failure

---

[API](https://skmtc.dev/adeli/apis/adeli-api.md) - [All operations](https://skmtc.dev/adeli/apis/adeli-api/llms.txt) - [OpenAPI document](https://skmtc.dev/adeli/apis/adeli-api/revisions/ed680dfa9033?raw)
