---
title: "Create a webhook destination"
method: POST
path: "/v1/{organization}/webhook_destination/"
tags: ["Webhook Destination"]
---

# Create a webhook destination

`POST /v1/{organization}/webhook_destination/`

Create a new webhook destination. At most 10 webhook destinations can be defined per organization.

A secret will immediately be issued for the webhook destination. Every webhook sent to this destination will be signed using this secret.
This secret is one-view only and cannot be retrieved later.

#### Permissions
This endpoint requires the following permissions:
* `Webhook:CreateWebhookDestination` for the webhook destination.

## Path parameters

- `organization` string, required

## Headers

- `x-mongo-cluster-name` string, nullable — The Mongo cluster name to perform this request in. This is usually not needed unless the organization does not exist yet in the Amigo organization infra config database.
- `Sec-WebSocket-Protocol` string[]

## Request body

- SrcAppEndpointsWebhookDestinationCreateWebhookDestinationRequest
  - `url` string, uri, required — The URL to which the webhook will be sent. The URL must be in HTTPS.
  - `accepted_types` WebhookType[], required — A list of webhook types to receive.
  - `retry_attempts` integer — The number of attempts to retry sending the webhook event in case of failure.

## Response `201`

Succeeded.

- SrcAppEndpointsWebhookDestinationCreateWebhookDestinationResponse
  - `webhook_destination_id` string, required — The ID of the created webhook destination.
  - `secret` string, required — The secret used to sign the webhook event. This is only visible once and cannot be retrieved later.

## Other responses

- `400` — The organization already has the maximum amount of webhook destinations defined.
- `401` — Invalid authorization credentials.
- `403` — Missing required permissions.
- `404` — Specified organization is not found.
- `409` — A related operation is in progress.
- `422` — Invalid request path parameter or request body failed validation.
- `429` — The user has exceeded the rate limit of 20 requests per minute for this endpoint.
- `503` — The service is going through temporary maintenance.

---

[API](https://skmtc.net/amigo/apis/amigo-api.md) · [All operations](https://skmtc.net/amigo/apis/amigo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/amigo/amigo-api/revisions/f0f28319e448/schema)
