Skip to main content
POST
https://api.getmalakai.com/api/
/
api
/
campaigns
/
outbound
Create a Campaign
curl --request POST \
  --url https://api.getmalakai.com/api/api/campaigns/outbound \
  --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>",
  "max_duration": 123,
  "schema_analysis": [
    "<string>"
  ],
  "model": "<string>",
  "transfer_numbers": {},
  "is_draft": true,
  "voice_mail": "<string>",
  "dynamic_data": {},
  "webhooks": {}
}
'
{
    "responseCode": 2000,
    "message": "Compaign created successfully",
    "data": {
        "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"
        },
        "user_id": "USER_ID_HERE",
        "is_draft": true,
        "voice_mail": null,
        "dynamic_data": null,
        "webhooks": null,
        "ml_campaign_id": null,
        "status": null,
        "state": null,
        "id": "CAMPAIGN_ID_HERE",
        "created_at": "2025-08-05T07:29:59.422Z",
        "updated_at": "2025-08-05T07:29:59.422Z"
    }
}

Headers

Authorization
string
required
Your API key for authentication. Prefix with Bearer .
x-access-token
string
required
Your access token for authentication.

Body

campaign_name
string
required
The name of the campaign to be created (e.g., “Demo Campaign”).
agent_id
string
required
The ID of the agent associated with the campaign (e.g., “25e57eca-5582-4ba7-849c-xxxx”).
workflow_id
string
required
The workflow ID linked to the campaign (e.g., “291069c3-d653-479c-97f9-xxxx”).
max_duration
number
required
Maximum duration in seconds for each interaction in the campaign (e.g., 300).
schema_analysis
string[]
A list of schema analysis items to evaluate during the campaign (e.g., [“did the human answer?”]).
model
string
required
The AI model used in the campaign (e.g., “Claude 3 Haiku”).
transfer_numbers
object
Key-value pairs of labels and phone numbers for call transfers.
is_draft
boolean
Indicates whether the campaign is in draft state (e.g., true).
voice_mail
string
Voicemail message or reference; null if not set.
dynamic_data
object
Dynamic key-value pairs used within the campaign; null if not set.
webhooks
object
Webhook configurations for the campaign; null if not set.

Request Example

{
    "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"
    ]
}

Response

message
string
Status of the request in the form of a short message.
data
object[]
List of the created campaign objects, each including a unique id.
{
    "responseCode": 2000,
    "message": "Compaign created successfully",
    "data": {
        "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"
        },
        "user_id": "USER_ID_HERE",
        "is_draft": true,
        "voice_mail": null,
        "dynamic_data": null,
        "webhooks": null,
        "ml_campaign_id": null,
        "status": null,
        "state": null,
        "id": "CAMPAIGN_ID_HERE",
        "created_at": "2025-08-05T07:29:59.422Z",
        "updated_at": "2025-08-05T07:29:59.422Z"
    }
}