Create a webhook endpoint
curl --request POST \
--url https://prod.leadvector.app/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://hooks.example.com/leadvector",
"eventTypes": [
"lead.replied"
],
"filters": {
"campaignIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"description": "Replies to our CRM"
}
'import requests
url = "https://prod.leadvector.app/v1/webhooks"
payload = {
"url": "https://hooks.example.com/leadvector",
"eventTypes": ["lead.replied"],
"filters": { "campaignIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] },
"description": "Replies to our CRM"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://hooks.example.com/leadvector',
eventTypes: ['lead.replied'],
filters: {campaignIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']},
description: 'Replies to our CRM'
})
};
fetch('https://prod.leadvector.app/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod.leadvector.app/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://hooks.example.com/leadvector',
'eventTypes' => [
'lead.replied'
],
'filters' => [
'campaignIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'description' => 'Replies to our CRM'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod.leadvector.app/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://hooks.example.com/leadvector\",\n \"eventTypes\": [\n \"lead.replied\"\n ],\n \"filters\": {\n \"campaignIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"Replies to our CRM\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://prod.leadvector.app/v1/webhooks")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://hooks.example.com/leadvector\",\n \"eventTypes\": [\n \"lead.replied\"\n ],\n \"filters\": {\n \"campaignIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"Replies to our CRM\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.leadvector.app/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://hooks.example.com/leadvector\",\n \"eventTypes\": [\n \"lead.replied\"\n ],\n \"filters\": {\n \"campaignIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"Replies to our CRM\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "WEBHOOK_CREATED",
"data": {
"id": "whe_0192b5c4e7a87c3e9d1f2a6b4c8e0d13",
"url": "https://hooks.example.com/leadvector",
"description": "Replies to our CRM",
"eventTypes": [
"lead.replied"
],
"filters": {
"campaignIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"status": "active",
"disabledReason": null,
"apiVersion": "2026-11",
"previousSecretExpiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"secret": "whsec_C2FNcGxlIHNlY3JldCBmb3IgdGhlIGRvY3MgMDEyMzQ1Njc4OQ=="
}
}{
"statusCode": 401,
"message": "INVALID_API_KEY",
"traceId": "4f1c2b7e9a0d4c3b8e6f5a2d1c0b9e8f",
"timestamp": "2026-11-03T09:41:12.000Z",
"path": "/v1/find-email",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "INVALID_API_KEY",
"traceId": "4f1c2b7e9a0d4c3b8e6f5a2d1c0b9e8f",
"timestamp": "2026-11-03T09:41:12.000Z",
"path": "/v1/find-email",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "INVALID_API_KEY",
"traceId": "4f1c2b7e9a0d4c3b8e6f5a2d1c0b9e8f",
"timestamp": "2026-11-03T09:41:12.000Z",
"path": "/v1/find-email",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "RATE_LIMIT_EXCEEDED",
"traceId": "4f1c2b7e9a0d4c3b8e6f5a2d1c0b9e8f",
"timestamp": "2026-11-03T09:41:12.000Z",
"path": "/v1/find-email",
"limit": 10,
"windowSeconds": 60,
"retryAfterSeconds": 6,
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "INVALID_API_KEY",
"traceId": "4f1c2b7e9a0d4c3b8e6f5a2d1c0b9e8f",
"timestamp": "2026-11-03T09:41:12.000Z",
"path": "/v1/find-email",
"error": "Unauthorized"
}Webhooks
Create a webhook endpoint
Subscribes a URL to event types for the API key’s team. The answer holds the signing secret, shown only here and on rotation. Needs a paid plan, and the team owner or a member with team management.
POST
/
v1
/
webhooks
Create a webhook endpoint
curl --request POST \
--url https://prod.leadvector.app/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "https://hooks.example.com/leadvector",
"eventTypes": [
"lead.replied"
],
"filters": {
"campaignIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"description": "Replies to our CRM"
}
'import requests
url = "https://prod.leadvector.app/v1/webhooks"
payload = {
"url": "https://hooks.example.com/leadvector",
"eventTypes": ["lead.replied"],
"filters": { "campaignIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] },
"description": "Replies to our CRM"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://hooks.example.com/leadvector',
eventTypes: ['lead.replied'],
filters: {campaignIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']},
description: 'Replies to our CRM'
})
};
fetch('https://prod.leadvector.app/v1/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod.leadvector.app/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://hooks.example.com/leadvector',
'eventTypes' => [
'lead.replied'
],
'filters' => [
'campaignIds' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'description' => 'Replies to our CRM'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod.leadvector.app/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://hooks.example.com/leadvector\",\n \"eventTypes\": [\n \"lead.replied\"\n ],\n \"filters\": {\n \"campaignIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"Replies to our CRM\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://prod.leadvector.app/v1/webhooks")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://hooks.example.com/leadvector\",\n \"eventTypes\": [\n \"lead.replied\"\n ],\n \"filters\": {\n \"campaignIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"Replies to our CRM\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.leadvector.app/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://hooks.example.com/leadvector\",\n \"eventTypes\": [\n \"lead.replied\"\n ],\n \"filters\": {\n \"campaignIds\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"description\": \"Replies to our CRM\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "WEBHOOK_CREATED",
"data": {
"id": "whe_0192b5c4e7a87c3e9d1f2a6b4c8e0d13",
"url": "https://hooks.example.com/leadvector",
"description": "Replies to our CRM",
"eventTypes": [
"lead.replied"
],
"filters": {
"campaignIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"status": "active",
"disabledReason": null,
"apiVersion": "2026-11",
"previousSecretExpiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"secret": "whsec_C2FNcGxlIHNlY3JldCBmb3IgdGhlIGRvY3MgMDEyMzQ1Njc4OQ=="
}
}{
"statusCode": 401,
"message": "INVALID_API_KEY",
"traceId": "4f1c2b7e9a0d4c3b8e6f5a2d1c0b9e8f",
"timestamp": "2026-11-03T09:41:12.000Z",
"path": "/v1/find-email",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "INVALID_API_KEY",
"traceId": "4f1c2b7e9a0d4c3b8e6f5a2d1c0b9e8f",
"timestamp": "2026-11-03T09:41:12.000Z",
"path": "/v1/find-email",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "INVALID_API_KEY",
"traceId": "4f1c2b7e9a0d4c3b8e6f5a2d1c0b9e8f",
"timestamp": "2026-11-03T09:41:12.000Z",
"path": "/v1/find-email",
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "RATE_LIMIT_EXCEEDED",
"traceId": "4f1c2b7e9a0d4c3b8e6f5a2d1c0b9e8f",
"timestamp": "2026-11-03T09:41:12.000Z",
"path": "/v1/find-email",
"limit": 10,
"windowSeconds": 60,
"retryAfterSeconds": 6,
"error": "Unauthorized"
}{
"statusCode": 401,
"message": "INVALID_API_KEY",
"traceId": "4f1c2b7e9a0d4c3b8e6f5a2d1c0b9e8f",
"timestamp": "2026-11-03T09:41:12.000Z",
"path": "/v1/find-email",
"error": "Unauthorized"
}Authorizations
Your API key, from the API keys page of the app.
Body
application/json
Where LeadVector POSTs the events: an https URL whose host resolves to public addresses.
Maximum string length:
2048Example:
"https://hooks.example.com/leadvector"
The event types to receive (GET /v1/webhooks/event-types), or ["*"] for every type, including types added later.
Example:
["lead.replied"]
Show child attributes
Show child attributes
A note for the team: what the endpoint is for.
Maximum string length:
255Example:
"Replies to our CRM"