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

# Create a webhook

`POST /webhooks`

## Request

- Base URL: `https://api.savanto.ai`
- URL: `https://api.savanto.ai/webhooks`
- Auth: HTTP bearer

Register a new webhook endpoint to receive event notifications.

## Request body

- CreateWebhookInput
  - `name` string, required
  - `url` string, uri, required
  - `events` string[], required
  - `description` string
  - `method` 'POST' | 'PUT' | 'PATCH'
  - `secret` string
  - `timeoutMs` integer
  - `eventFilters` object
  - `payloadTemplate` string
  - `status` 'active' | 'inactive'
  - `retryPolicy` object
    - `maxAttempts` integer
    - `backoffStrategy` 'linear' | 'exponential'
    - `initialDelayMs` integer
    - `maxDelayMs` integer
  - `headers` object
  - `authType` 'none' | 'bearer' | 'basic' | 'custom' | 'apiKey'
  - `authConfig` object
    - `bearerToken` string
    - `username` string
    - `password` string
    - `headerName` string
    - `headerValue` string
    - `apiKey` string
    - `apiKeyHeader` string
  - `schedule` object
    - `enabled` boolean, required
    - `cronExpression` string, required
    - `timezone` string, required
  - `metadata` object

## Response `201`

Webhook created successfully

- object
  - `object` 'webhook', required
  - `requestId` string, required
  - `data` object, required
    - `message` string, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict
- `413`: Payload too large
- `429`: Rate limit exceeded

---

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