Skip to main content
Manage webhooks to receive real-time event notifications from your G-Tateth account.

Create Webhook

name
body
required
Name for the webhook (1-100 characters)
url
body
required
HTTPS URL where webhook events will be sent
events
body
required
Array of event types to subscribe to (e.g., ["conversation.created", "customer.updated"])
headers
body
Custom headers to include with webhook requests (object)
retryPolicy
body
Retry policy configuration:
{
  "maxRetries": 3,
  "backoffStrategy": "exponential"
}
  • maxRetries: Number of retry attempts (0-10)
  • backoffStrategy: "linear" or "exponential"
success
boolean
true
data._id
string
Webhook ID
data.name
string
Webhook name
data.url
string
Webhook URL
data.events
array
Array of subscribed events
data.secret
string
Webhook secret for signature verification (only shown once)
data.isActive
boolean
Whether the webhook is active
Save the webhook secret immediately - it’s only shown once and is required for signature verification!

Example Request

curl -X POST https://api.g-tateth.com/api/v1/webhooks \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production Webhook",
    "url": "https://myapp.com/webhooks/g-tateth",
    "events": ["conversation.created", "conversation.updated", "customer.created"],
    "retryPolicy": {
      "maxRetries": 3,
      "backoffStrategy": "exponential"
    }
  }'

List Webhooks

isActive
boolean
Filter by active status: true or false
page
integer
Page number (default: 1)
limit
integer
Items per page (default: 20, max: 100)
success
boolean
true
data.webhooks
array
Array of webhook objects
data.total
number
Total number of webhooks
data.page
number
Current page number
data.limit
number
Items per page
data.totalPages
number
Total number of pages

Get Webhook

id
string
required
Webhook ID
success
boolean
true
data
object
Webhook object (secret is not included)

Update Webhook

id
string
required
Webhook ID
name
body
Update webhook name (1-100 characters)
url
body
Update webhook URL (must be HTTPS)
events
body
Update array of subscribed events
isActive
body
Activate or deactivate the webhook
headers
body
Update custom headers
retryPolicy
body
Update retry policy
success
boolean
true
data
object
Updated webhook object

Delete Webhook

id
string
required
Webhook ID
success
boolean
true
message
string
Success message
This action cannot be undone! The webhook will stop receiving events immediately.

Test Webhook

id
string
required
Webhook ID
success
boolean
true
message
string
“Test webhook event sent”
This sends a test event to your webhook URL. Use this to verify your webhook endpoint is working correctly.

Get Webhook Logs

id
string
required
Webhook ID
status
string
Filter by delivery status: pending, success, failed
page
integer
Page number (default: 1)
limit
integer
Items per page (default: 20, max: 100)
success
boolean
true
data.logs
array
Array of delivery log objects
data.total
number
Total number of logs
data.page
number
Current page number
data.limit
number
Items per page
data.totalPages
number
Total number of pages

Log Object Structure

{
  "_id": "...",
  "webhookId": "...",
  "event": "conversation.created",
  "status": "success",
  "statusCode": 200,
  "attempt": 1,
  "deliveredAt": "2024-01-01T12:00:00Z",
  "responseTime": 150,
  "error": null
}

Supported Events

Conversation Events

  • conversation.created - New conversation created
  • conversation.updated - Conversation updated
  • conversation.assigned - Conversation assigned to agent
  • conversation.closed - Conversation closed

Customer Events

  • customer.created - New customer created
  • customer.updated - Customer updated

Message Events

  • message.sent - Message sent
  • message.received - Message received

Call Events

  • call.initiated - Call has been initiated
  • call.answered - Call has been answered
  • call.completed - Call has completed
  • call.recording.available - Call recording is available

Required Permissions

  • webhook:manage - Required for all webhook operations

Webhook Signature Verification

Each webhook request includes an X-Webhook-Signature header. Always verify signatures to ensure requests are from G-Tateth. See the Webhooks Guide for signature verification examples in various languages.