cURL
curl --request POST \ --url https://api.getmalakai.com/api/api/campaigns/inbound \ --header 'Authorization: <authorization>' \ --header 'Content-Type: application/json' \ --header 'x-access-token: <x-access-token>' \ --data ' { "campaign_name": "<string>", "agent_id": "<string>", "workflow_id": "<string>", "transfer_numbers": {}, "webhooks": {} } '
{ "responseCode": 2000, "message": "Campaign created successfully", "data": { "campaign_name": "Demo Campaign", "agent_id": "25e57eca-5582-4ba7-849c-1234", "webhooks": [ "https://example.com/webhook" ], "transfer_numbers": { "Support": "+1234567890", "Sales": "+0987654321" }, "phone_number": "+1122334455", "model": "Claude 3 Haiku", "workflow_id": "291069c3-d653-479c-97f9-5678" } }
Create a new inbound campaign from scratch
Bearer
{ "campaign_name": "demo_campaign", "agent_id": "AGENT_ID_HERE", "workflow_id": "WORKFLOW_ID_HERE", "max_duration": 300, "schema_analysis": ["did the human answer?"], "model": "Claude 3 Haiku", "transfer_numbers": { "test": "PHONE_NUMBER_HERE" }, "webhooks": [], "contacts": ["CONTACT_ID_HERE"], "dialers": ["DIALER_ID_HERE"] }
id