> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.heyreach.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.heyreach.io/_mcp/server.

# Get Webhook By Id

GET https://api//api/public/webhooks/GetWebhookById?webhookId=123&includeCustomHeaders=false

# Get Webhook By Id

**Description**  
Get a webhook by Id.

Reference: https://docs.heyreach.io/hey-reach-api/webhooks/get-webhook-by-id

## Request

### Query parameters

- `webhookId` (integer, optional)
- `includeCustomHeaders` (boolean, optional)

### Headers

- `X-API-KEY` (string, optional) — API key header using this scheme. Example: "X-API-KEY: \{API\_KEY}"

## Response

### 200

OK

- `id` (integer, required)
- `webhookName` (string, required)
- `webhookUrl` (string, required)
- `eventType` (string, required)
- `campaignIds` (list of integer, required)
- `isActive` (boolean, required)
- `customHeaders` (list of object, required)
  - `name` (string, required)
  - `value` (string, required)

## Examples

**Response**

```json
{
  "id": 123,
  "webhookName": "My Webhook Name",
  "webhookUrl": "https://webhook.site/my-webhook-url",
  "eventType": "CONNECTION_REQUEST_SENT",
  "campaignIds": [
    123,
    124
  ],
  "isActive": true,
  "customHeaders": [
    {
      "name": "x-custom-header-1",
      "value": "value1"
    },
    {
      "name": "x-custom-header-2",
      "value": "Value2"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api//api/public/webhooks/GetWebhookById"

querystring = {"webhookId":"123","includeCustomHeaders":"false"}

headers = {"X-API-KEY": "<string>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api//api/public/webhooks/GetWebhookById?webhookId=123&includeCustomHeaders=false';
const options = {method: 'GET', headers: {'X-API-KEY': '<string>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api//api/public/webhooks/GetWebhookById?webhookId=123&includeCustomHeaders=false"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-KEY", "<string>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api//api/public/webhooks/GetWebhookById?webhookId=123&includeCustomHeaders=false")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<string>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api//api/public/webhooks/GetWebhookById?webhookId=123&includeCustomHeaders=false")
  .header("X-API-KEY", "<string>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api//api/public/webhooks/GetWebhookById?webhookId=123&includeCustomHeaders=false', [
  'headers' => [
    'X-API-KEY' => '<string>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api//api/public/webhooks/GetWebhookById?webhookId=123&includeCustomHeaders=false");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-KEY", "<string>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-KEY": "<string>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api//api/public/webhooks/GetWebhookById?webhookId=123&includeCustomHeaders=false")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```