Outbound Webhooks Guide
Overview
Outbound webhooks allow MojaAI to send real-time notifications to your systems when call events occur. Configure webhook endpoints to receive instant updates about calls and conversions.
What you can do with webhooks:
Receive instant call event notifications
Update your CRM in real-time
Track conversions and revenue automatically
Trigger workflows based on call duration milestones
Setting Up Webhooks
Navigate to Webhooks > Outgoing in your MojaAI dashboard
Click Create Webhook
Enter your endpoint URL
Select the event type you want to trigger on
Define your request template (URL, headers, body) using
[TAG_NAME]placeholdersChoose body format (JSON or form data)
Save the webhook
Sample Event Types
The following are common event types. For a complete and up-to-date list, see Webhooks > Outgoing in your MojaAI dashboard.
Event | Description | When It's Sent |
| A new inbound call has been received | When a caller dials a tracking number and the platform begins processing |
| The call has been answered | When the call connects to a target |
| The call has been hung up | When either party ends the call |
| The call failed to connect | When the call cannot be connected to a target (e.g. busy, no answer, error) |
| Call processing is complete | After hangup, when all post-call processing (conversion evaluation, logging) is finished |
| The call met conversion criteria | When the system determines a call qualifies as a conversion (fires after hangup) |
| Call reached 5 seconds connected | When the connected call duration hits 5 seconds |
| Call reached 15 seconds connected | When the connected call duration hits 15 seconds |
| Call reached 30 seconds connected | When the connected call duration hits 30 seconds |
| Call reached 45 seconds connected | When the connected call duration hits 45 seconds |
| Call reached 60 seconds connected | When the connected call duration hits 60 seconds |
Webhook Payload
Outbound webhooks are fully configurable. When creating a webhook, you define your own request template β including the URL, HTTP method, headers, and body. MojaAI replaces [TAG_NAME] placeholders in your template with actual call data at dispatch time.
How It Works
Create a webhook configuration in Webhooks > Outgoing
Select an event type to trigger on
Define your URL, headers, and body using
[TAG_NAME]placeholdersWhen the event fires, MojaAI replaces all placeholders with real values and sends the request
Supported Formats
JSON β Request body sent as
application/jsonForm Data β Request body sent as
application/x-www-form-urlencoded
HTTP Methods
Webhooks support: GET, POST, PUT, PATCH, DELETE
Example Template
Body template (configured in dashboard):
{
"call_id": "[CALL_ID]",
"caller": "[CALLER_ID]",
"campaign": "[CAMPAIGN_NAME]",
"duration": "[DURATION]",
"converted": "[CONVERTED]",
"revenue": "[REVENUE_PAID_OUT]",
"tags": {
"source": "[UTM_SOURCE]",
"state": "[CALLER_STATE]"
}
}Resulting payload (after placeholder replacement):
{
"call_id": "call_abc123def456",
"caller": "+13105559876",
"campaign": "Medicare Leads Q1",
"duration": "145",
"converted": "true",
"revenue": "35.00",
"tags": {
"source": "google_ads",
"state": "CA"
}
}
Placeholders can also be used in the URL and query parameters. For example: https://your-api.com/webhook?call_id=[CALL_ID]&campaign=[CAMPAIGN_ID]
Sample Tags
The tags below are commonly used placeholders. For a complete and up-to-date list of available tags, see Webhooks > Outgoing in your MojaAI dashboard when creating or editing a webhook.
Use these [TAG_NAME] placeholders in your webhook URL, headers, query parameters, and body.
Call Identification
Tag | Description |
| Internal call session ID |
| MojaAI call ID |
| Caller's phone number (raw) |
| Dialed tracking number (raw) |
| Caller's phone number (formatted) |
| Caller's phone number without + prefix |
| Caller's phone number as numeric value |
| Caller's ZIP code |
| Caller's state |
| State (current, may differ from original if updated) |
| ZIP code (current) |
| Original state at call start |
| Original ZIP code at call start |
| Inbound call session identifier |
| Organization ID |
Campaign & Publisher
Tag | Description |
| Campaign ID |
| Campaign name |
| Publisher ID |
| Publisher name |
| Publisher's tracking number |
| Publisher payout amount (formatted) |
| Publisher payout amount (numeric) |
Target & Buyer
Tag | Description |
| Target ID |
| Target name |
| Target type |
| Buyer ID |
| Buyer name |
| Target-level payout |
| Publisher payout for this call |
Conversion & Revenue
Tag | Description |
| Whether the call converted ( |
| Buyer revenue amount |
| Publisher payout amount |
| Who terminated the call |
| Connected call duration (seconds) |
| Inbound leg duration (seconds) |
| Outbound leg duration (seconds) |
| Timestamp when conversion was detected |
| Timestamp of the event |
| Configured publisher payout (formatted) |
| Configured publisher payout (numeric) |
| Configured buyer revenue (formatted) |
| Configured buyer revenue (numeric) |
| Overwritten buyer revenue (if applicable) |
Landing Page & Attribution
These tags are populated for calls originating from Dynamic Number Insertion (DNI):
Tag | Description |
| Google Click ID |
| Facebook Click ID |
| UTM source parameter |
| UTM medium parameter |
| UTM campaign parameter |
| UTM content parameter |
| UTM term parameter |
| Search keyword |
| Visitor identifier |
| Full landing page URL |
| Landing page domain |
| Landing page path |
| Referrer URL |
| Visitor's city |
| Visitor's state |
| Visitor's ZIP code |
| Visitor's country code |
| Visitor's IP address |
| Visitor's browser |
Custom Tags
Any custom tags you define are also available as placeholders using their tag key in uppercase. For example, if you create a custom tag with key lead_type, use [LEAD_TYPE] in your template.
Failed webhook deliveries are logged and visible in Webhooks > Outgoing Webhook Requests in your dashboard.
Best Practices
Use HTTPS - All webhook endpoints should use HTTPS
Handle duplicates - Use
[CALL_ID]to deduplicate if neededLog payloads - Store raw payloads for debugging
Monitor deliveries - Check Webhooks > Outgoing Webhook Requests for failed deliveries
Testing Webhooks
Use the Test Webhook button in your dashboard to send a sample payload to your endpoint. This helps verify your integration before going live.
Custom Headers
Add custom headers to authenticate requests to your endpoint:
{
"Authorization": "Bearer your-api-token",
"X-Custom-Header": "custom-value"
}
Configure these in the webhook settings in your dashboard.
Troubleshooting
Problem: Webhooks aren't being received
Solution: Verify your endpoint URL is correct and accessible. Check that your server isn't blocking requests from MojaAI IP addresses. Review delivery status in Webhooks > Outgoing Webhook Requests.
Problem: Placeholder tags not being replaced
Solution: Ensure tag names in your template are uppercase and wrapped in brackets, e.g.
[CALL_ID]. Note that not all tags are available on every event type β for example, conversion-related tags like[CONVERTED]and[REVENUE_PAID_OUT]are not populated on early events such ascall.incoming. If a tag is not available for the event that fired, the raw placeholder text (e.g.[CONVERTED]) is returned in the payload instead of a value. Check the event type documentation in your dashboard to confirm which tags are available for each event.
Problem: Webhooks are timing out
Solution: Return 200 OK immediately and process the webhook asynchronously. Your endpoint must respond within 10 seconds.
Need Help?
Email: [email protected]
Help Center: Available in your dashboard