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

# Create new webhook subscription

`POST /webhooks`

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/webhooks`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Creates a new webhook subscription with the specified subscription details.

## Request body

- WebhookSubscriptionDto
  - `key` string, nullable: Unique key used for creating signature header in webhook notification requests.
  - `name` string, nullable: Name or description of the webhook subscription.
  - `eventTypes` string[], nullable: The event types that the webhook subscription should be subscribed to.
  - `eventNotificationUrl` string, nullable: The uri to notify when an event has occurred.

## Response `200`

When request is successful. Returns the new webhook subscriptions.

- WebhookSubscription
  - `id` string, nullable
  - `href` string, nullable
  - `relation` string, nullable
  - `method` string, nullable
  - `self` Link
    - `id` string, nullable
    - `href` string, nullable
    - `relation` string, nullable
    - `method` string, nullable
  - `accountId` string, nullable: Unique identifier of the associated account.
  - `name` string, nullable: Name or description of the subscription.
  - `eventTypes` string[], nullable: The event types that the webhook subscription is subscribed to.
  - `eventNotificationUrl` string, nullable: The uri to notify when an event has occurred.
  - `createdDateUtc` string, date-time: The webhook subscription creation date.
  - `updatedDateUtc` string, date-time: The webhook subscription last updated date.
  - `lastUpdated` integer: Last updated timestamp

## Other responses

- `400`: When an unsupported request is made.

---

[API](https://skmtc.dev/smokeball/apis/smokeball-api.md) - [All operations](https://skmtc.dev/smokeball/apis/smokeball-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smokeball/apis/smokeball-api/revisions/6e350cf667d4?raw)
