Create Webhook
curl --request POST \
--url https://api.kakiyo.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "CRM Integration",
"url": "https://your-app.com/kakiyo/webhook",
"events": [
"linkedin.message.received",
"prospect.qualification.manual"
],
"secret": "your_webhook_secret"
}
'import requests
url = "https://api.kakiyo.com/v1/webhooks"
payload = {
"name": "CRM Integration",
"url": "https://your-app.com/kakiyo/webhook",
"events": ["linkedin.message.received", "prospect.qualification.manual"],
"secret": "your_webhook_secret"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'CRM Integration',
url: 'https://your-app.com/kakiyo/webhook',
events: ['linkedin.message.received', 'prospect.qualification.manual'],
secret: 'your_webhook_secret'
})
};
fetch('https://api.kakiyo.com/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://api.kakiyo.com/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([
'name' => 'CRM Integration',
'url' => 'https://your-app.com/kakiyo/webhook',
'events' => [
'linkedin.message.received',
'prospect.qualification.manual'
],
'secret' => 'your_webhook_secret'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.kakiyo.com/v1/webhooks"
payload := strings.NewReader("{\n \"name\": \"CRM Integration\",\n \"url\": \"https://your-app.com/kakiyo/webhook\",\n \"events\": [\n \"linkedin.message.received\",\n \"prospect.qualification.manual\"\n ],\n \"secret\": \"your_webhook_secret\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.kakiyo.com/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"CRM Integration\",\n \"url\": \"https://your-app.com/kakiyo/webhook\",\n \"events\": [\n \"linkedin.message.received\",\n \"prospect.qualification.manual\"\n ],\n \"secret\": \"your_webhook_secret\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kakiyo.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"CRM Integration\",\n \"url\": \"https://your-app.com/kakiyo/webhook\",\n \"events\": [\n \"linkedin.message.received\",\n \"prospect.qualification.manual\"\n ],\n \"secret\": \"your_webhook_secret\"\n}"
response = http.request(request)
puts response.read_body{
"id": "webhook_12345abcde",
"name": "CRM Integration",
"url": "https://your-app.com/kakiyo/webhook",
"events": [
"linkedin.message.received",
"prospect.qualification.manual"
],
"active": true,
"message": "Webhook created successfully"
}{
"error": "validation_error",
"message": "The request parameters failed validation",
"details": [
{
"field": "name",
"message": "The name field is required"
}
]
}{
"error": "validation_error",
"message": "The request parameters failed validation",
"details": [
{
"field": "name",
"message": "The name field is required"
}
]
}Webhooks
Create Webhook
Creates a new webhook endpoint that will receive event notifications
POST
/
webhooks
Create Webhook
curl --request POST \
--url https://api.kakiyo.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "CRM Integration",
"url": "https://your-app.com/kakiyo/webhook",
"events": [
"linkedin.message.received",
"prospect.qualification.manual"
],
"secret": "your_webhook_secret"
}
'import requests
url = "https://api.kakiyo.com/v1/webhooks"
payload = {
"name": "CRM Integration",
"url": "https://your-app.com/kakiyo/webhook",
"events": ["linkedin.message.received", "prospect.qualification.manual"],
"secret": "your_webhook_secret"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'CRM Integration',
url: 'https://your-app.com/kakiyo/webhook',
events: ['linkedin.message.received', 'prospect.qualification.manual'],
secret: 'your_webhook_secret'
})
};
fetch('https://api.kakiyo.com/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://api.kakiyo.com/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([
'name' => 'CRM Integration',
'url' => 'https://your-app.com/kakiyo/webhook',
'events' => [
'linkedin.message.received',
'prospect.qualification.manual'
],
'secret' => 'your_webhook_secret'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.kakiyo.com/v1/webhooks"
payload := strings.NewReader("{\n \"name\": \"CRM Integration\",\n \"url\": \"https://your-app.com/kakiyo/webhook\",\n \"events\": [\n \"linkedin.message.received\",\n \"prospect.qualification.manual\"\n ],\n \"secret\": \"your_webhook_secret\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.kakiyo.com/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"CRM Integration\",\n \"url\": \"https://your-app.com/kakiyo/webhook\",\n \"events\": [\n \"linkedin.message.received\",\n \"prospect.qualification.manual\"\n ],\n \"secret\": \"your_webhook_secret\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kakiyo.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"CRM Integration\",\n \"url\": \"https://your-app.com/kakiyo/webhook\",\n \"events\": [\n \"linkedin.message.received\",\n \"prospect.qualification.manual\"\n ],\n \"secret\": \"your_webhook_secret\"\n}"
response = http.request(request)
puts response.read_body{
"id": "webhook_12345abcde",
"name": "CRM Integration",
"url": "https://your-app.com/kakiyo/webhook",
"events": [
"linkedin.message.received",
"prospect.qualification.manual"
],
"active": true,
"message": "Webhook created successfully"
}{
"error": "validation_error",
"message": "The request parameters failed validation",
"details": [
{
"field": "name",
"message": "The name field is required"
}
]
}{
"error": "validation_error",
"message": "The request parameters failed validation",
"details": [
{
"field": "name",
"message": "The name field is required"
}
]
}Overview
Register a webhook endpoint to receive real-time notifications about events in your Kakiyo campaigns. Webhooks enable seamless integration with your CRM, analytics tools, and custom applications.Use Cases
- CRM Integration: Sync qualified prospects to your CRM automatically
- Analytics Tracking: Send campaign events to analytics platforms
- Notification Systems: Alert team members about important events
- Workflow Automation: Trigger automated workflows based on prospect actions
Supported Events
- prospect.qualified - Prospect marked as qualified
- prospect.responded - Prospect responded to outreach
- campaign.completed - Campaign reached completion
- message.sent - Message sent to prospect
- connection.accepted - LinkedIn connection accepted
- agent.status_changed - Agent status changed
Security
Webhooks support optional secret-based authentication. Include a secret to verify webhook authenticity using HMAC-SHA256 signatures.Testing Example
curl -X POST "https://api.kakiyo.com/v1/webhooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "CRM Integration",
"url": "https://your-app.com/kakiyo/webhook",
"secret": "your_webhook_secret_key",
"events": [
"prospect.qualified",
"prospect.responded",
"campaign.completed"
]
}'
// JavaScript/Node.js
const createWebhook = async (webhookData) => {
const response = await fetch('https://api.kakiyo.com/v1/webhooks', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify(webhookData)
});
return await response.json();
};
// Usage example
const newWebhook = await createWebhook({
name: 'CRM Integration',
url: 'https://your-app.com/kakiyo/webhook',
secret: 'your_webhook_secret_key',
events: [
'prospect.qualified',
'prospect.responded',
'campaign.completed'
]
});
console.log('Webhook Created:', newWebhook);
# Python
import requests
def create_webhook(webhook_data):
"""Create a new webhook endpoint"""
response = requests.post(
'https://api.kakiyo.com/v1/webhooks',
json=webhook_data,
headers={
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
)
return response.json()
# Usage example
webhook_data = {
'name': 'CRM Integration',
'url': 'https://your-app.com/kakiyo/webhook',
'secret': 'your_webhook_secret_key',
'events': [
'prospect.qualified',
'prospect.responded',
'campaign.completed'
]
}
result = create_webhook(webhook_data)
print('Webhook Created:', result)
Webhook Handler Example
// Express.js webhook handler
const express = require('express');
const crypto = require('crypto');
const app = express();
app.use(express.json());
app.post('/kakiyo/webhook', (req, res) => {
const signature = req.headers['x-kakiyo-signature'];
const payload = JSON.stringify(req.body);
const secret = 'your_webhook_secret_key';
// Verify signature
const expectedSignature = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
if (signature !== `sha256=${expectedSignature}`) {
return res.status(401).send('Invalid signature');
}
// Process webhook event
const { event, data, timestamp } = req.body;
switch (event) {
case 'prospect.qualified':
handleProspectQualified(data);
break;
case 'prospect.responded':
handleProspectResponded(data);
break;
case 'campaign.completed':
handleCampaignCompleted(data);
break;
default:
console.log(`Unhandled event: ${event}`);
}
res.status(200).send('OK');
});
const handleProspectQualified = (data) => {
// Sync to CRM
console.log('Qualified prospect:', data.prospect.name);
// Add your CRM integration logic here
};
Best Practices
- HTTPS Only: Always use HTTPS URLs for webhook endpoints
- Signature Verification: Implement signature verification for security
- Idempotency: Handle duplicate webhook deliveries gracefully
- Error Handling: Return appropriate HTTP status codes
- Timeout Handling: Respond within 30 seconds to avoid retries
- Event Filtering: Subscribe only to events you need
Testing Your Webhook
Use the webhook test endpoints to validate your integration:- Get Available Events:
GET /webhooks/test/events - Get Event Examples:
GET /webhooks/test/example/{event} - Send Test Event:
POST /webhooks/test
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Webhook to create
Example:
"CRM Integration"
Example:
"https://your-app.com/kakiyo/webhook"
Available options:
*, linkedin.message.sent, linkedin.message.received, linkedin.invitation.sent, linkedin.invitation.accepted, prospect.qualification.manual, prospect.unqualified Example:
[
"linkedin.message.received",
"prospect.qualification.manual"
]
Example:
"your_webhook_secret"
Response
Webhook created successfully
Last modified on August 29, 2025

