Back to Settings
Developer API Documentation
Integrate your marketing tools with our reporting system using the events API.
RECORD CAMPAIGN EVENT
v1.0Use this endpoint to record "clicked" or "converted" events for funnel tracking. This allows external systems (like your CRM or Marketing Automation tool) to feed data into the Campaign Funnel chart.
POST /api/events
Request Body
{
"campaignId": "string", // Required. Unique identifier for the campaign.
"recipient": "string", // Required. Recipient identifier (e.g., phone number, email).
"eventType": "string", // Required. Must be "clicked" or "converted".
"timestamp": "string", // Optional. ISO 8601 Date. Defaults to now.
"meta": "object" // Optional. Any additional JSON metadata.
}Example Request
{
"campaignId": "CAMP-2025-001",
"recipient": "+15550001234",
"eventType": "clicked",
"timestamp": "2025-01-01T10:00:00Z"
}Responses
200 OK Event recorded successfully
{
"success": true,
"id": "550e8400-e29b-41d4-a716-446655440000",
"message": "Event 'clicked' recorded successfully."
}400 Bad Request Missing fields or invalid event type
{
"error": "Invalid eventType. Must be 'clicked' or 'converted'"
}500 Internal Server Error Server-side processing error
{
"error": "Internal Server Error",
"details": "Database connection failed"
}