Subscribe to Webhook
curl --request POST \
--url https://app-api.walead.ai/api/v1/hooks/subscribe \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://app-api.walead.ai/api/v1/hooks/subscribe"
payload = { "url": "<string>" }
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: '<string>'})
};
fetch('https://app-api.walead.ai/api/v1/hooks/subscribe', 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://app-api.walead.ai/api/v1/hooks/subscribe",
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' => '<string>'
]),
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://app-api.walead.ai/api/v1/hooks/subscribe"
payload := strings.NewReader("{\n \"url\": \"<string>\"\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://app-api.walead.ai/api/v1/hooks/subscribe")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app-api.walead.ai/api/v1/hooks/subscribe")
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\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 123,
"message": "<string>"
}{
"statusCode": 123,
"message": "<string>"
}Webhooks
Subscribe to Webhook
Subscribe to a webhook to receive real-time notifications for specific events
POST
/
v1
/
hooks
/
subscribe
Subscribe to Webhook
curl --request POST \
--url https://app-api.walead.ai/api/v1/hooks/subscribe \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"url": "<string>"
}
'import requests
url = "https://app-api.walead.ai/api/v1/hooks/subscribe"
payload = { "url": "<string>" }
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: '<string>'})
};
fetch('https://app-api.walead.ai/api/v1/hooks/subscribe', 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://app-api.walead.ai/api/v1/hooks/subscribe",
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' => '<string>'
]),
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://app-api.walead.ai/api/v1/hooks/subscribe"
payload := strings.NewReader("{\n \"url\": \"<string>\"\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://app-api.walead.ai/api/v1/hooks/subscribe")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app-api.walead.ai/api/v1/hooks/subscribe")
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\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"type": "<string>",
"createdAt": "2023-11-07T05:31:56Z"
}{
"statusCode": 123,
"message": "<string>"
}{
"statusCode": 123,
"message": "<string>"
}Overview
Subscribe to a webhook to receive real-time HTTP POST notifications when specific events occur in your workspace.Webhook URL Requirements
- Must use HTTPS (HTTP is not supported for security)
- Must be publicly accessible
- Should respond with a 200 status code within 5 seconds
- Should handle duplicate events idempotently
Available Event Types
Subscribe to one of these event types:| Event Type | Description |
|---|---|
lead_tagged_interested | Lead tagged as “Interested” |
lead_meeting_booked | Lead tagged as “Meeting Booked” |
lead_status_matched | Lead accepted by screening |
lead_status_discarded | Lead discarded by screening |
campaign_completed | Campaign finished |
message_received | Lead sent a message |
linkedin_account_disconnected | LinkedIn account disconnected |
connection_request_accepted | Lead accepted connection request |
campaign_without_leads | Active campaign ran out of leads |
Example Payloads
Lead Event Payload
{
"leadId": "lead_abc123",
"campaignId": "campaign_xyz789",
"campaignName": "Sales Outreach Q1",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"companyName": "Acme Corp",
"linkedinUrl": "https://www.linkedin.com/in/johndoe",
"status": "accepted",
"tag": "Interested"
}
Campaign Event Payload
{
"campaignId": "campaign_xyz789",
"campaignName": "Sales Outreach Q1",
"progress": 100,
"status": "completed"
}
Authorizations
API key for authentication. Generate from your WaLead dashboard.
Body
application/json
Webhook subscription details
HTTPS URL where webhook notifications will be sent
Type of event to subscribe to
Available options:
lead_tagged_interested, lead_meeting_booked, lead_status_matched, lead_status_discarded, campaign_completed, message_received, linkedin_account_disconnected, connection_request_accepted, campaign_without_leads