---
title: "Create webhook"
method: POST
path: "/applications/{applicationId}/webhooks"
tags: ["Webhooks"]
---

# Create webhook

`POST /applications/{applicationId}/webhooks`

## Request

- Base URL: `https://api.darwin.so/api/v1`
- URL: `https://api.darwin.so/api/v1/applications/{applicationId}/webhooks`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

## Path parameters

- `applicationId` string, required

## Request body

- CreateWebhookRequest
  - `url` string, uri, required
  - `events` string[], required

## Response `201`

The webhook and one-time signing secret.

- object
  - `webhook` CreatedWebhook, required
    - `id` string, required
    - `applicationId` string
    - `url` string, uri
    - `events` string[]
    - `status` 'ACTIVE' | 'REVOKED', required
    - `secretPrefix` string
    - `lastDeliveredAt` string, date-time, nullable
    - `lastFailureAt` string, date-time, nullable
    - `failureCount` integer
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `signingSecret` string, required: Returned only once.

## Other responses

- `400`: The request was invalid.
- `401`: The API key or access token is missing, invalid, expired, or revoked.
- `403`: The principal does not have the required scope or resource access.
- `404`: The resource was not found for this principal.

---

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