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

# Create Webhook

`POST /api/v1/webhooks`

## Request

- Base URL: `https://app.aimrank.io` (the document declares no server; this is the origin it was published from)
- URL: `https://app.aimrank.io/api/v1/webhooks`
- Auth: none declared

Create a new webhook.

The webhook will be called whenever the specified events occur.
If you generate a secret, it will be used to sign payloads for verification.
Requires Pro plan or higher.

## Request body

- WebhookCreate
  - `name` string, required
  - `url` string, required
  - `events` string[]
  - `ranking_ids` string[], nullable
  - `generate_secret` boolean

## Response `201`

Successful Response

- WebhookCreatedResponse: Response when creating a webhook - includes secret.
  - `id` string, required
  - `name` string, required
  - `url` string, required
  - `events` string[], required
  - `ranking_ids` string[], nullable, required
  - `is_active` boolean, required
  - `is_healthy` boolean, required
  - `last_triggered_at` string, date-time, nullable, required
  - `last_status_code` integer, nullable, required
  - `consecutive_failures` integer, required
  - `total_deliveries` integer, required
  - `failed_deliveries` integer, required
  - `created_at` string, date-time, required
  - `secret` string, nullable

## Other responses

- `422`: Validation Error

---

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