Skip to main content
GET
https://api.getmalakai.com/api/
/
api
/
campaigns
/
inbound
Get All Inbound Campaigns
curl --request GET \
  --url https://api.getmalakai.com/api/api/campaigns/inbound \
  --header 'Authorization: <authorization>' \
  --header 'x-access-token: <x-access-token>'
{
  "data": {},
  "data.analytics.Total Calls Made": 123,
  "campaigns": [
    {}
  ],
  "campaigns.id": "<string>",
  "campaigns.user_id": "<string>",
  "campaigns.campaign_name": "<string>",
  "campaigns.phone_number": "<string>",
  "campaigns.agent_id": "<string>",
  "campaigns.transfer_numbers": {},
  "campaigns.ml_campaign_id": "<string>",
  "campaigns.status": "<string>",
  "campaigns.model": "<string>",
  "campaigns.state": "<string>",
  "campaigns.created_at": "<string>",
  "campaigns.updated_at": "<string>",
  "campaigns.workflow_id": "<string>",
  "campaigns.total_events": 123,
  "agent.agent_name": "<string>",
  "agent.opening_message": "<string>",
  "agent.qualification_scenario": "<string>",
  "agent.goals": "<string>",
  "agent.background": "<string>",
  "agent.example_scenario": "<string>"
}

Headers

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

Response

data
object
Contains campaign analytics and campaign details.
data.analytics.Total Calls Made
number
Total number of inbound calls made.
campaigns
object[]
An array of inbound campaign objects.

Campaign Fields

campaigns.id
string
Unique identifier for the campaign.
campaigns.user_id
string
Identifier of the user who owns the campaign.
campaigns.campaign_name
string
Name of the inbound campaign.
campaigns.phone_number
string
Associated phone number ID.
campaigns.agent_id
string
ID of the assigned agent for the campaign.
campaigns.transfer_numbers
object
Map of configured transfer numbers.
campaigns.ml_campaign_id
string
ID for ML-related tracking (nullable).
campaigns.status
string
Campaign status (nullable).
campaigns.model
string
Name of AI model used in the campaign.
campaigns.state
string
Current running state of the campaign.
campaigns.created_at
string
ISO timestamp of when the campaign was created.
campaigns.updated_at
string
ISO timestamp of the last update to the campaign.
campaigns.workflow_id
string
ID of the associated workflow (nullable).
campaigns.total_events
number
Number of events recorded for the campaign.

Nested: campaigns.agent

agent.agent_name
string
Name of the assigned agent.
agent.opening_message
string
Greeting message used by the agent.
agent.qualification_scenario
string
Criteria to determine how to qualify the caller.
agent.goals
string
Campaign goals for the agent.
agent.background
string
Background knowledge required by the agent.
agent.example_scenario
string
Sample dialogue or use case for the agent.

Response Example

{
   "responseCode": 2000,
   "message": "Inbound campaigns fetched successfully",
   "data": {
      "analytics": {
         "Total Calls Made": 4
      },
      "campaigns": [
         {
            "id": "********",
            "user_id": "********",
            "campaign_name": "new inbound campaign",
            "phone_number": "********",
            "agent_id": "********",
            "transfer_numbers": {
               "": ""
            },
            "ml_campaign_id": null,
            "status": null,
            "model": "Claude 3 Haiku",
            "created_at": "2025-06-27T11:40:34.133Z",
            "workflow_id": null,
            "updated_at": "2025-06-27T11:40:34.133Z",
            "state": "running",
            "userCallers": {
               "phone_number": "********",
               "phone_number_details": {
                  "phoneNumber": "********",
                  "origin": "twilio",
                  "status": "in-use",
                  "friendlyName": "(309) 387-0017"
               }
            },
            "agent": {
               "agent_name": "Andrew Hamilton",
               "opening_message": "Thank you for calling. How can I assist you today?",
               "qualification_scenario": "The caller needs to be transferred to the appropriate department based on their request.",
               "goals": "Determine which department the caller needs to be transferred to and complete the transfer efficiently.",
               "background": "The agent should be familiar with the different departments and their responsibilities in order to direct the caller to the right place.",
               "example_scenario": "Agent: Thank you for calling. How can I assist you today? Caller: I need to speak with someone in the sales department. Agent: Okay, let me transfer you to our sales department. One moment please. [Transfer to sales department]"
            },
            "total_events": 2
         }
      ]
   }
}