Fetchply Docs
Settings

Webhooks

Subscribe to events and receive real-time notifications when things happen in Fetchply.

What Are Webhooks?

Webhooks send HTTP POST requests to your server when events happen in Fetchply. Use them to build real-time integrations — update your CRM when a lead is captured, notify your team when feedback is received, or sync data with external systems.

Webhooks require the Starter plan or above.

Setting Up Webhooks

Create an Endpoint

Set up a URL on your server that can receive POST requests. The endpoint should:

  • Accept application/json content type
  • Return a 2xx status code to acknowledge receipt
  • Respond within 10 seconds

Subscribe to Events

Use the API to subscribe your endpoint to specific events:

Create webhook
curl -X POST https://fetchply.com/api/v1/hooks/subscribe \
  -H "Authorization: Bearer fp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourserver.com/webhooks/fetchply",
    "event": "new_lead"
  }'

Verify Signatures

Every webhook payload includes an HMAC-SHA256 signature for verification. Check the signature to ensure the request came from Fetchply.

Available Events

EventDescription
new_leadA visitor submits their contact information
new_messageA new message is sent in a conversation
new_conversationA new chat session starts
feedback_receivedA visitor rates a response
training_completedAgent training finishes
agent_createdA new agent is created
agent_deletedAn agent is deleted

Webhook Payload

All payloads follow the same format:

payload-example.json
{
  "event": "new_lead",
  "timestamp": "2025-01-15T10:30:00Z",
  "data": {
    "agentId": "agent_abc123",
    "lead": {
      "name": "Jane Doe",
      "email": "jane@example.com"
    }
  }
}

Retry Policy

If your endpoint fails to respond with a 2xx status:

  1. First retry — after 1 minute
  2. Second retry — after 5 minutes
  3. Third retry — after 30 minutes

After 3 failed attempts, the webhook is automatically deactivated. Resubscribe to restart delivery.

Make sure your endpoint responds quickly (within 10 seconds). Long-running processing should be done asynchronously after acknowledging the webhook.

Removing Webhooks

Unsubscribe from events when you no longer need them:

Delete webhook
curl -X DELETE https://fetchply.com/api/v1/hooks/subscribe \
  -H "Authorization: Bearer fp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourserver.com/webhooks/fetchply",
    "event": "new_lead"
  }'

On this page