curl -X POST "https://api.foxreach.io/api/v1/webhooks" \
-H "X-API-Key: otr_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/outreach",
"events": ["email.sent", "reply.received", "campaign.completed"]
}'
import requests
response = requests.post(
"https://api.foxreach.io/api/v1/webhooks",
headers={"X-API-Key": "otr_your_key"},
json={
"url": "https://your-app.com/webhooks/outreach",
"events": ["email.sent", "reply.received", "campaign.completed"]
}
)
data = response.json()
const response = await fetch(
"https://api.foxreach.io/api/v1/webhooks",
{
method: "POST",
headers: {
"X-API-Key": "otr_your_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
url: "https://your-app.com/webhooks/outreach",
events: ["email.sent", "reply.received", "campaign.completed"]
})
}
);
const data = await response.json();
{
"data": {
"id": "cwh_new456",
"url": "https://your-app.com/webhooks/outreach",
"isActive": true,
"events": ["email.sent", "reply.received", "campaign.completed"],
"secret": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2",
"lastDeliveredAt": null,
"consecutiveFailures": 0,
"createdAt": "2025-01-15T10:00:00",
"updatedAt": "2025-01-15T10:00:00"
}
}
Webhooks API
Create Webhook
Create a new webhook. A signing secret is auto-generated and returned once.
POST
/
api
/
v1
/
webhooks
curl -X POST "https://api.foxreach.io/api/v1/webhooks" \
-H "X-API-Key: otr_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/outreach",
"events": ["email.sent", "reply.received", "campaign.completed"]
}'
import requests
response = requests.post(
"https://api.foxreach.io/api/v1/webhooks",
headers={"X-API-Key": "otr_your_key"},
json={
"url": "https://your-app.com/webhooks/outreach",
"events": ["email.sent", "reply.received", "campaign.completed"]
}
)
data = response.json()
const response = await fetch(
"https://api.foxreach.io/api/v1/webhooks",
{
method: "POST",
headers: {
"X-API-Key": "otr_your_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
url: "https://your-app.com/webhooks/outreach",
events: ["email.sent", "reply.received", "campaign.completed"]
})
}
);
const data = await response.json();
{
"data": {
"id": "cwh_new456",
"url": "https://your-app.com/webhooks/outreach",
"isActive": true,
"events": ["email.sent", "reply.received", "campaign.completed"],
"secret": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2",
"lastDeliveredAt": null,
"consecutiveFailures": 0,
"createdAt": "2025-01-15T10:00:00",
"updatedAt": "2025-01-15T10:00:00"
}
}
Request Body
string
required
The HTTPS endpoint URL that will receive webhook events.
array
required
List of event types to subscribe to. See Event Types for all available events.
boolean
default:"true"
Whether the webhook should start receiving events immediately.
Response
Returns the created webhook including thesecret field. The secret is only returned on creation — save it securely for signature verification.
curl -X POST "https://api.foxreach.io/api/v1/webhooks" \
-H "X-API-Key: otr_your_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/outreach",
"events": ["email.sent", "reply.received", "campaign.completed"]
}'
import requests
response = requests.post(
"https://api.foxreach.io/api/v1/webhooks",
headers={"X-API-Key": "otr_your_key"},
json={
"url": "https://your-app.com/webhooks/outreach",
"events": ["email.sent", "reply.received", "campaign.completed"]
}
)
data = response.json()
const response = await fetch(
"https://api.foxreach.io/api/v1/webhooks",
{
method: "POST",
headers: {
"X-API-Key": "otr_your_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
url: "https://your-app.com/webhooks/outreach",
events: ["email.sent", "reply.received", "campaign.completed"]
})
}
);
const data = await response.json();
{
"data": {
"id": "cwh_new456",
"url": "https://your-app.com/webhooks/outreach",
"isActive": true,
"events": ["email.sent", "reply.received", "campaign.completed"],
"secret": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0e1f2",
"lastDeliveredAt": null,
"consecutiveFailures": 0,
"createdAt": "2025-01-15T10:00:00",
"updatedAt": "2025-01-15T10:00:00"
}
}
Save the
secret value immediately. It is only returned in this response and cannot be retrieved later. You’ll need it to verify webhook signatures.Errors
| Status | Description |
|---|---|
422 | Invalid event types provided |
Available Event Types
email.sent, email.failed, email.bounced, email.opened,
reply.received, reply.categorized,
campaign.started, campaign.paused, campaign.completed,
lead.created, lead.updated
Rate Limit
- 100 requests per minute, per API key. Fixed 60-second window.
- Every response includes
X-RateLimit-Limit,X-RateLimit-Remaining, andX-RateLimit-Reset(unix epoch seconds). - A
429response includes aRetry-Afterheader (seconds until the bucket resets).
Retry-After, exponential backoff, monitoring X-RateLimit-Remaining), see Rate Limiting.