Webhooks
Receive real-time notifications when events occur in your Get A Team instance.
Setting Up Webhooks
- Go to Settings → Webhooks
- Click "Add Webhook"
- Enter your endpoint URL
- Select events to subscribe to
- Save and copy your signing secret
Available Events
| Event | Description |
|---|---|
conversation.created | New conversation started |
conversation.closed | Conversation was closed |
message.created | New message in a conversation |
employee.created | New employee hired |
employee.updated | Employee settings changed |
employee.deleted | Employee 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.