This guide will walk you through setting up and using webhooks with atoms.

Setting Up Webhooks

Step 1: Add a Webhook

  1. Navigate to your dashboard
  2. Go to the “Webhook” section
  3. Click on “Create”
  4. Enter your webhook URL where you want to receive events
  5. (Optional) Add a small description
  6. Click “Add endpoint” to create your webhook

Step 2: Attach Webhook to Your Agent

  1. Go to your agent’s configuration page
  2. Press the “add webhook” button
  3. Select the webhook url from dropdown and choose which events you want to receive
  4. Save your changes

You should start recieving events on your agent calls. You can check all webhook events directly from your dashboard.

Webhook Event Types

Your webhook will receive the following types of events:

  • pre-conversation: When an agent call begins
  • post-conversation: When an agent call completes

Webhook Payload Format

Each webhook event includes different data based on the event type. You can view the payload for each event type below:

{
  "url": "https://webhook-test.com/abc123",
  "description": "test webhook",
  "event": "agent123.pre-conversation",
  "metadata": {
    "agentId": "agent123",
    "eventType": "pre-conversation",
    "conversationType": "telephonyOutbound",
    "toPhone": "+1234567890",
    "fromPhone": "+0987654321"
  },
  "id": "webhook123"
}