> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linkedcamp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Webhook

> Create a webhook to receive real-time notifications when specific campaign events occur.

## Headers

<ParamField header="token" type="string" required>
  Your LinkedCamp API token.
</ParamField>

## Body Parameters

<ParamField body="title" type="string" required>
  A descriptive name for the webhook.
</ParamField>

<ParamField body="callbackUrl" type="string" required>
  The URL that will receive webhook POST requests when the event occurs.
</ParamField>

<ParamField body="event" type="string" required>
  The event type that triggers the webhook.

  Available values:

  | Event             | Description                          |
  | ----------------- | ------------------------------------ |
  | `CONNECT_INVITED` | A connection request was sent        |
  | `ACCEPTS_REQUEST` | A connection request was accepted    |
  | `REPLY_DETECTED`  | A reply was received from a prospect |
  | `EMAIL_SENT`      | An email was sent                    |
  | `OPENED`          | An email was opened                  |
  | `BOUNCED`         | An email bounced                     |
  | `CLICKED`         | A link in an email was clicked       |
  | `UNSUBSCRIBED`    | A prospect unsubscribed              |
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the request was successful.
</ResponseField>

<ResponseField name="message" type="string">
  A human-readable result message.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.linkedcamp.com/webhooks \
    -H "token: YOUR_API_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "title": "New Connection Webhook",
      "callbackUrl": "https://your-server.com/webhook/linkedcamp",
      "event": "ACCEPTS_REQUEST"
    }'
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api.linkedcamp.com/webhooks",
      headers={"token": "YOUR_API_TOKEN"},
      json={
          "title": "New Connection Webhook",
          "callbackUrl": "https://your-server.com/webhook/linkedcamp",
          "event": "ACCEPTS_REQUEST",
      },
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.linkedcamp.com/webhooks", {
    method: "POST",
    headers: {
      "token": "YOUR_API_TOKEN",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      title: "New Connection Webhook",
      callbackUrl: "https://your-server.com/webhook/linkedcamp",
      event: "ACCEPTS_REQUEST",
    }),
  });
  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Webhook added successfully!"
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "message": "Invalid event!"
  }
  ```
</ResponseExample>
