API ReferenceWebhooks

Webhooks

Receive real-time notifications when events occur in your Get A Team instance.

Setting Up Webhooks

  1. Go to Settings → Webhooks
  2. Click "Add Webhook"
  3. Enter your endpoint URL
  4. Select events to subscribe to
  5. Save and copy your signing secret

Available Events

EventDescription
conversation.createdNew conversation started
conversation.closedConversation was closed
message.createdNew message in a conversation
employee.createdNew employee hired
employee.updatedEmployee settings changed
employee.deletedEmployee was removed

Webhook Payload

JSON Payload
{
  "id": "evt_abc123",
  "type": "message.created",
  "created_at": "2024-01-15T10:30:00Z",
  "data": {
    "conversation_id": "conv_123",
    "message": {
      "id": "msg_456",
      "content": "Hello!",
      "role": "user"
    }
  }
}

Verifying Signatures

All webhook requests include a signature header for verification:

Header
X-Webhook-Signature: sha256=abc123...

Verify by computing HMAC-SHA256 of the request body using your signing secret:

Node.js Example
const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return `sha256=${expected}` === signature;
}

Retry Policy

  • Webhooks timeout after 30 seconds
  • Failed webhooks retry up to 5 times
  • Retry intervals: 1 min, 5 min, 30 min, 2 hours, 24 hours
  • After 5 failures, webhook is disabled

Testing Webhooks

Use the "Send Test" button in Settings to verify your endpoint is receiving events correctly.