WorkestraDocs
API Reference

Webhooks

Receive real-time event notifications from Workestra.

Webhooks

Webhooks notify your application when events occur in Workestra. Build real-time integrations without polling.

webhooks configuration

Screenshot needed � add an annotated image showing this UI

What Are Webhooks?

Webhooks are HTTP callbacks:

  1. Event occurs in Workestra
  2. HTTP POST sent to your URL
  3. Your application receives data
  4. Your application processes event

Webhooks are more efficient than polling. You receive events instantly instead of checking periodically.

Available Events

CRM Events

EventDescription
contact.createdNew contact added
contact.updatedContact modified
contact.deletedContact removed
deal.createdNew deal created
deal.updatedDeal changed
deal.stage_changedDeal moved stages
deal.wonDeal closed won
deal.lostDeal closed lost
activity.createdActivity logged

Recruiting Events

EventDescription
candidate.createdNew candidate applied
candidate.updatedCandidate modified
job.createdNew job posted
application.receivedApplication submitted
interview.scheduledInterview booked

Project Events

EventDescription
task.createdTask created
task.updatedTask modified
task.completedTask marked done
cycle.startedCycle began
cycle.endedCycle completed

Finance Events

EventDescription
invoice.createdInvoice generated
invoice.paidPayment received
invoice.overdueInvoice past due
expense.createdExpense logged

Support Events

EventDescription
ticket.createdTicket received
ticket.updatedTicket modified
ticket.resolvedTicket closed
ticket.escalatedPriority increased

Setting Up Webhooks

Step 1: Create Endpoint

Your application needs a URL that accepts POST requests:

https://your-app.com/webhooks/workestra

Step 2: Configure in Workestra

  1. Go to Settings > API > Webhooks
  2. Click New Webhook
  3. Enter:
    • URL — Your endpoint
    • Events — Select which events
    • Secret — For signature verification
  4. Save

Step 3: Verify Endpoint

Workestra sends test event:

{
  "type": "endpoint.verify",
  "id": "evt_test_123",
  "created_at": "2024-03-15T10:00:00Z"
}

Your endpoint must respond with 200 OK.

Webhook Payload

Event Structure

{
  "id": "evt_1234567890",
  "type": "contact.created",
  "created_at": "2024-03-15T10:30:00Z",
  "workspace_id": "ws_abc123",
  "data": {
    "id": "con_def456",
    "first_name": "John",
    "last_name": "Smith",
    "email": "john@example.com",
    "company": "Acme Corp",
    "created_at": "2024-03-15T10:30:00Z"
  }
}

Common Fields

FieldDescription
idUnique event ID
typeEvent type
created_atWhen event occurred
workspace_idSource workspace
dataEvent-specific data

Security

Signature Verification

Verify webhooks came from Workestra:

X-Workestra-Signature: sha256=<hex>

Verification code:

import hmac
import hashlib

secret = b'your_webhook_secret'
payload = request.body
signature = hmac.new(secret, payload, hashlib.sha256).hexdigest()

if signature == request.headers['X-Workestra-Signature']:
    # Valid webhook
else:
    # Invalid, reject

HTTPS Only

Webhook URLs must use HTTPS for security.

IP Allowlist

Webhook requests come from these IPs:

203.0.113.0/24
198.51.100.0/24

Handling Webhooks

Best Practices

  1. Respond quickly — Return 200 ASAP, process async
  2. Idempotency — Handle duplicate events gracefully
  3. Retries — Workestra retries on failure
  4. Order — Events may arrive out of order

Retry Policy

If your endpoint fails:

AttemptDelay
1Immediate
25 seconds
330 seconds
42 minutes
510 minutes

After 5 failures, webhook disabled.

Example Handler

app.post('/webhooks/workestra', (req, res) => {
  // Respond immediately
  res.sendStatus(200);
  
  // Process async
  const event = req.body;
  
  switch(event.type) {
    case 'contact.created':
      handleNewContact(event.data);
      break;
    case 'deal.won':
      handleWonDeal(event.data);
      break;
  }
});

Testing Webhooks

Local Development

Use tools like ngrok:

ngrok http 3000

Use the ngrok URL as webhook endpoint.

Test Events

Send test events from dashboard:

  1. Go to webhook settings
  2. Click Send Test
  3. Select event type
  4. View delivery status

Managing Webhooks

Viewing Webhooks

List all configured webhooks:

  • URL
  • Events subscribed
  • Status (active/disabled)
  • Last delivery

Editing Webhooks

  1. Click webhook in list
  2. Modify events or URL
  3. Save changes

Disabling Webhooks

Temporarily stop deliveries:

  1. Find webhook
  2. Toggle Active off
  3. Deliveries pause
  4. Toggle on to resume

Deleting Webhooks

  1. Click webhook
  2. Click Delete
  3. Confirm

Deleting a webhook stops all deliveries. Ensure no systems depend on it.


Next Steps