[
{
"destination_name": "CRM Integration",
"destination_type": "custom",
"destination_id": 123,
"api_url": "https://api.yourcrm.com/webhooks/formi",
"api_method": "POST",
"api_headers": {
"Content-Type": "application/json",
"Authorization": "Bearer your-api-token"
},
"api_body": {
"customer_name": "{{customer_name}}",
"phone_number": "{{customer_phone_number}}",
"call_summary": "{{call_transcript}}",
"timestamp": "{{timestamp_reservation}}"
}
},
{
"destination_name": "Dashboard Analytics",
"destination_type": "dashboard",
"destination_id": 124,
"api_url": "https://analytics.yourdomain.com/api/calls",
"api_method": "POST",
"api_headers": {
"Content-Type": "application/json",
"X-API-Key": "dashboard-api-key"
},
"api_body": {
"event_type": "call_completed",
"call_data": {
"customer": "{{customer_name}}",
"duration": "{{call_duration}}",
"outcome": "{{call_status}}"
}
}
}
]
curl --location --request POST 'https://staging-api.formi.co.in/v2/post_call/data/destinations' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"destination_name": "CRM Integration",
"destination_type": "custom",
"destination_id": 123,
"api_url": "https://api.yourcrm.com/webhooks/formi",
"api_method": "POST",
"api_headers": {
"Content-Type": "application/json",
"Authorization": "Bearer your-api-token"
},
"api_body": {
"customer_name": "{{customer_name}}",
"phone_number": "{{customer_phone_number}}",
"call_summary": "{{call_transcript}}",
"timestamp": "{{timestamp_reservation}}"
}
},
{
"destination_name": "Dashboard Analytics",
"destination_type": "dashboard",
"destination_id": 124,
"api_url": "https://analytics.yourdomain.com/api/calls",
"api_method": "POST",
"api_headers": {
"Content-Type": "application/json",
"X-API-Key": "dashboard-api-key"
},
"api_body": {
"event_type": "call_completed",
"call_data": {
"customer": "{{customer_name}}",
"duration": "{{call_duration}}",
"outcome": "{{call_status}}"
}
}
}
]'
{
"destination": [
{
"destination_name": "CRM Webhook",
"destination_type": "webhook",
"api_url": "https://crm.example.com/webhook",
"api_method": "POST",
"api_headers": {
"Authorization": "Bearer abcdef123456",
"Content-Type": "application/json"
},
"api_body": {
"lead_name": "John Doe",
"contact_email": "johndoe@example.com",
"phone_number": "+919876543210",
"call_summary": "Customer interested in product demo",
"location": "Bengaluru"
}
},
{
"destination_name": "Salesforce CRM",
"destination_type": "crm",
"api_url": "https://salesforce.example.com/api/leads",
"api_method": "PUT",
"api_headers": {
"Authorization": "Bearer sf_token_987654",
"Content-Type": "application/json",
"X-Custom-Header": "custom-value"
},
"api_body": {
"full_name": "Jane Smith",
"email": "janesmith@example.com",
"phone": "+918765432109",
"lead_score": "85",
"source": "Inbound call"
}
}
],
"type": "string"
}