[
{
"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 PUT '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}}"
}
}
}
]'
{
"message": "Destinations updated successfully"
}