---
title: "Create webhook"
method: POST
path: "/workspaces/{workspaceID}/integrations/webhooks"
tags: ["Webhooks"]
---

# Create webhook

`POST /workspaces/{workspaceID}/integrations/webhooks`

## Request

- Base URL: `https://api.salesforge.ai/public/v2`
- URL: `https://api.salesforge.ai/public/v2/workspaces/{workspaceID}/integrations/webhooks`
- Auth: API key in header `Authorization`

Create a new webhook.

## Path parameters

- `workspaceID` string, required

## Request body

- ApiCreateWebhookRequest
  - `labelIds` string[]: Primebox labels to filter on. Valid only for lead_replied (matches the thread's label) and label_changed (matches the new label). Omit or leave empty for every label, including unlabelled threads.
  - `name` string, required: Label identifying this webhook in the workspace.
  - `sequenceID` string: Deprecated: use sequenceIds. Ignored when sequenceIds is non-empty.
  - `sequenceIds` string[]: Sequences whose events this webhook receives. Omit or leave empty to receive events for every sequence in the workspace.
  - `type` 'email_sent' | 'email_opened' | 'link_clicked' | 'email_replied' | 'linkedin_replied' | 'lead_replied' | 'contact_unsubscribed' | 'email_bounced' | 'positive_reply' | 'negative_reply' | 'label_changed' | 'dnc_added' | 'meeting_booked' | 'meeting_completed' | 'linkedin_message_sent' | 'linkedin_inmail_sent' | 'linkedin_connection_request_sent' | 'linkedin_connection_request_accepted' | 'linkedin_connection_request_withdrawn' | 'linkedin_profile_viewed' | 'linkedin_post_liked' | 'linkedin_contact_followed' | 'email_sent' | 'email_opened' | 'link_clicked' | 'lead_replied' | 'email_replied' | 'linkedin_replied' | 'contact_unsubscribed' | 'email_bounced' | 'positive_reply' | 'negative_reply' | 'label_changed' | 'dnc_added' | 'meeting_booked' | 'meeting_completed' | 'linkedin_message_sent' | 'linkedin_inmail_sent' | 'linkedin_connection_request_sent' | 'linkedin_connection_request_accepted' | 'linkedin_connection_request_withdrawn' | 'linkedin_profile_viewed' | 'linkedin_post_liked' | 'linkedin_contact_followed', required: Event that triggers a delivery. A webhook subscribes to exactly one type, so receiving several events means registering several webhooks. lead_replied fires for email and LinkedIn replies on multichannel sequences only. label_changed fires for every label change, positive and negative included. Deprecated: email_replied and linkedin_replied are superseded by lead_replied. positive_reply and negative_reply are superseded by lead_replied with a label filter for replies, and by label_changed for label changes. They keep working.
  - `url` string, required: Endpoint receiving the POST. Must be publicly reachable and answer 2xx: a failed delivery is not retried.

## Response `201`

Created webhook. The signingSecret is returned only here and cannot be retrieved later.

- ApiCreateWebhookResponse
  - `id` string
  - `labelIds` string[]
  - `name` string
  - `sentCount` integer
  - `sequenceId` string
  - `sequenceIds` string[]
  - `signingSecret` string: SigningSecret is returned exactly once, at creation, and cannot be retrieved afterwards.
  - `type` 'email_sent' | 'email_opened' | 'link_clicked' | 'email_replied' | 'linkedin_replied' | 'lead_replied' | 'contact_unsubscribed' | 'email_bounced' | 'positive_reply' | 'negative_reply' | 'label_changed' | 'dnc_added' | 'meeting_booked' | 'meeting_completed' | 'linkedin_message_sent' | 'linkedin_inmail_sent' | 'linkedin_connection_request_sent' | 'linkedin_connection_request_accepted' | 'linkedin_connection_request_withdrawn' | 'linkedin_profile_viewed' | 'linkedin_post_liked' | 'linkedin_contact_followed' | 'email_sent' | 'email_opened' | 'link_clicked' | 'lead_replied' | 'email_replied' | 'linkedin_replied' | 'contact_unsubscribed' | 'email_bounced' | 'positive_reply' | 'negative_reply' | 'label_changed' | 'dnc_added' | 'meeting_booked' | 'meeting_completed' | 'linkedin_message_sent' | 'linkedin_inmail_sent' | 'linkedin_connection_request_sent' | 'linkedin_connection_request_accepted' | 'linkedin_connection_request_withdrawn' | 'linkedin_profile_viewed' | 'linkedin_post_liked' | 'linkedin_contact_followed': Event that triggers a delivery. A webhook subscribes to exactly one type, so receiving several events means registering several webhooks. lead_replied fires for email and LinkedIn replies on multichannel sequences only. label_changed fires for every label change, positive and negative included. Deprecated: email_replied and linkedin_replied are superseded by lead_replied. positive_reply and negative_reply are superseded by lead_replied with a label filter for replies, and by label_changed for label changes. They keep working.
  - `url` string

## Other responses

- `500`: Internal Server Error

---

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