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

# Create a webhook

`POST /webhooks`

Create a Webhook for notification in the CallFire system. Use the webhooks API to receive notifications of important CallFire events. Select the resource to listen to, and then choose the resource events to receive notifications on. When an event triggers, a POST will be made to the callback URL with a payload of notification information. Available resources and their events include 'CccCampaign': ['started', 'stopped', 'finished'], 'CallBroadcast': ['started', 'stopped', 'finished'], 'TextBroadcast': ['started', 'stopped', 'finished'], 'OutboundCall': ['finished'], 'InboundCall': ['finished'], 'OutboundText': ['finished'], 'InboundText': ['finished'], 'ContactList': ['validationFinished', 'validationFailed'], 'MonthlyRenewal': ['failed', 'finished'], 'LowBalance': ['failed', 'finished']. Webhooks support secret token which is used as signing key to HmacSHA256 hash of json payload which is returned in 'X-CallFire-Signature-256' header. This header can be used to verify callback POST is coming from CallFire. See [security guide](https://developers.callfire.com/security-guide.html)

## Request body

- Webhook — Webhook is a user-defined callback, which can be maintained via API. CallFire will send POST request to a client's endpoint defined in webhook once one of assigned events is triggered. See [webhooks guide](https://developers.callfire.com/webhooks-guide.html) for more information about CallFire Webhooks API.
  - `id` integer — An id of a webhook
  - `enabled` boolean — A parameter which allows the webhook to send requests to unknown ssl endpoints (ssl certificate verification is disabled)
  - `nonStrictSsl` boolean — A parameter which allows the webhook to send requests to unknown ssl endpoints (ssl certificate verification is disabled)
  - `name` string — A name of a webhook
  - `resource` string — A resource name that webhook is watching events on. Use GET /webhooks/resources to determine resources and events available (ex: InboundCall, OutboundCall, InboundText, OutboundText, CallBroadcast, TextBroadcast, etc...)
  - `events` string[] — Comma separated list of events on resource that will trigger callbacks (ex: STARTED, STOPPED, FINISHED, etc...).
  - `fields` string — A limit callback response to a particular fields
  - `callback` string — URL that webhook will send POST to on resource event trigger
  - `secret` string — Webhook secret token which is used as a signing key to HmacSHA256 hash of json payload which is returned in 'X-CallFire-Signature-256' header. This header can be used to verify callback POST is coming from CallFire. See [security guide](https://developers.callfire.com/security-guide.html)
  - `singleUse` boolean — If true is set then webhook triggers only once. Afterwards the webhook will be deleted
  - `createdAt` integer — A time when the given resource was created, formatted in unix time milliseconds (read only). Example: 1473781817000
  - `updatedAt` integer — A time when the given resource was updated, formatted in unix time milliseconds (read only). Example: 1473781817000
  - `expiresAt` integer — ~

## Response `201`

successful operation

- ResourceId — An id of a resource
  - `id` integer — An id of a resource

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Internal Server Error

---

[API](https://skmtc.dev/callfire/apis/callfire-api-documentation.md) · [All operations](https://skmtc.dev/callfire/apis/callfire-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/callfire/callfire-api-documentation/revisions/9f6fb501bc03/schema)
