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

# Add a webhook address

`POST /webhooks`

## Request

- Base URL: `https://tryslicemedia.com/api/v1`
- URL: `https://tryslicemedia.com/api/v1/webhooks`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `url` string, uri, required: https only; private networks are refused.
  - `events` EventType[]

## Response `201`

Created

- object
  - `id` string
  - `url` string
  - `events` EventType[]
  - `enabled` boolean
  - `created_at` string
  - `last_success_at` string, nullable
  - `secret` string: whsec_..., shown in this answer only.

## Other responses

- `400`: Invalid input. The message says which field.
- `401`: Missing, unknown, revoked or expired key.
- `402`: Needs credit or the Slice plan (plan_or_credit_required, credit_required, plan_required), or the balance is below zero after a refunded credit pack (balance_below_zero). Numbers are in the error.
- `403`: The key lacks the permission (scope) this needs, or the account is under billing review.
- `409`: Busy, or an Idempotency-Key still running.
- `422`: Idempotency-Key reused with a different body.
- `429`: Rate limited. See retry_after and the RateLimit-* headers.

---

[API](https://skmtc.dev/tryslicemedia/apis/slice-api.md) · [All operations](https://skmtc.dev/tryslicemedia/apis/slice-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tryslicemedia/apis/slice-api/revisions/3dc0b0bd8755?raw)
