Skip to main content
GET
https://api.getmalakai.com/api/
/
api
/
campaigns
/
outbound
/
logs
/
{id}
Get Campaign logs
curl --request GET \
  --url https://api.getmalakai.com/api/api/campaigns/outbound/logs/{id} \
  --header 'Authorization: <authorization>' \
  --header 'x-access-token: <x-access-token>'
{
   "responseCode": 2000,
   "message": "Campaign logs fetched successfully",
   "data": {
      "analytics": {
         "Total Contacts": 1,
         "Completion": 100,
         "Answered": 1,
         "Not Answered": 0,
         "Total Conversations": 33
      },
      "logs": [
         {
            "id": "cfebaae0-b30f-4124-a0ef-1a4ff68e1ccc",
            "user_id": "**********",
            "contact_name": "John Doe",
            "contact_number": [
               "+1234567890"
            ],
            "contact_email": "[email protected]",
            "tags": [
               "tag1"
            ],
            "created_at": "2024-11-21T10:50:47.409Z",
            "updated_at": "2024-11-21T10:50:47.409Z",
            "name": "John Doe",
            "email": "[email protected]",
            "status": "completed",
            "address": "Hidden Address",
            "analysis": "[{\"question\": \"did the human answer ?\", \"answer\": \"no\"}]",
            "call_sid": "***********************",
            "sentiment": "neutral",
            "contact_id": "**********",
            "session_id": "**********",
            "call_summary": "The user was unable to provide any information related to the original request about speaking with a cybersecurity engineer or specialist. The conversation ended with the AI assistant politely acknowledging the user's situation and wishing them a great day.",
            "call_duration": 33,
            "goal_achieved": "no",
            "recording_url": "https://api.twilio.com/2010-04-01/Accounts/AC********************/Recordings/RE********************",
            "transcript": {
               "conversation": [
                  {
                     "role": "user",
                     "content": "---"
                  },
                  {
                     "role": "assistant",
                     "content": "Hello, this is [Your Company Name] calling to inquire about your cybersecurity personnel. Is there a cybersecurity engineer or specialist available that I could speak with?"
                  },
                  {
                     "role": "user",
                     "content": "The numbers are hidden. Please don't hang up and hold on a moment."
                  },
                  {
                     "role": "assistant",
                     "content": "I understand. Thank you for your time, and I hope you have a great day!"
                  },
                  {
                     "role": "user",
                     "content": "ok"
                  },
                  {
                     "role": "assistant",
                     "content": "Alright, here it is: \"Goodbye!\""
                  }
               ],
               "recording_url": "https://malakai-audio-files.s3.us-east-1.amazonaws.com/hidden.mp3"
            }
         }
      ]
   }
}

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
The main response object containing analytics and logs.
data.analytics
object
An object containing overall analytics for the campaign logs.
data.analytics.Total Contacts
number
Total number of contacts involved in the campaign.
data.analytics.Completion
number
Percentage of completion for the campaign.
data.analytics.Answered
number
Number of answered calls.
data.analytics.Not Answered
number
Number of calls not answered.
data.analytics.Total Conversations
number
Total number of conversations in the campaign.
data.logs
object[]
Array of log objects for each contact in the campaign.
data.logs.id
string
Unique identifier for the log entry.
data.logs.user_id
string
User identifier associated with the log.
data.logs.contact_name
string
Name of the contact.
data.logs.contact_number
string[]
Array of contact phone numbers.
data.logs.contact_email
string
Email address of the contact.
data.logs.tags
string[]
Array of tags associated with the contact.
data.logs.created_at
string
Timestamp when the log was created (ISO format).
data.logs.updated_at
string
Timestamp when the log was last updated (ISO format).
data.logs.name
string
Name of the contact (duplicate of contact_name).
data.logs.email
string
Email address of the contact (duplicate of contact_email).
data.logs.status
string
Status of the campaign log (e.g., completed).
data.logs.address
string
Address of the contact.
data.logs.analysis
string
JSON string containing analysis data.
data.logs.call_sid
string
Identifier for the call session.
data.logs.sentiment
string
Sentiment analysis result for the call.
data.logs.contact_id
string
Identifier for the contact.
data.logs.session_id
string
Identifier for the session.
data.logs.call_summary
string
Summary of the call conversation.
data.logs.call_duration
number
Duration of the call in seconds.
data.logs.goal_achieved
string
Indicates if the campaign goal was achieved (“yes” or “no”).
data.logs.recording_url
string
URL to the call recording.
data.logs.transcript
object
Object containing the transcript and recording URL.
data.logs.transcript.conversation
object[]
Array of conversation objects with role and content.
data.logs.transcript.conversation.role
string
Role in the conversation (user or assistant).
data.logs.transcript.conversation.content
string
Content of the conversation message.
data.logs.transcript.recording_url
string
URL to the transcript audio file.
{
   "responseCode": 2000,
   "message": "Campaign logs fetched successfully",
   "data": {
      "analytics": {
         "Total Contacts": 1,
         "Completion": 100,
         "Answered": 1,
         "Not Answered": 0,
         "Total Conversations": 33
      },
      "logs": [
         {
            "id": "cfebaae0-b30f-4124-a0ef-1a4ff68e1ccc",
            "user_id": "**********",
            "contact_name": "John Doe",
            "contact_number": [
               "+1234567890"
            ],
            "contact_email": "[email protected]",
            "tags": [
               "tag1"
            ],
            "created_at": "2024-11-21T10:50:47.409Z",
            "updated_at": "2024-11-21T10:50:47.409Z",
            "name": "John Doe",
            "email": "[email protected]",
            "status": "completed",
            "address": "Hidden Address",
            "analysis": "[{\"question\": \"did the human answer ?\", \"answer\": \"no\"}]",
            "call_sid": "***********************",
            "sentiment": "neutral",
            "contact_id": "**********",
            "session_id": "**********",
            "call_summary": "The user was unable to provide any information related to the original request about speaking with a cybersecurity engineer or specialist. The conversation ended with the AI assistant politely acknowledging the user's situation and wishing them a great day.",
            "call_duration": 33,
            "goal_achieved": "no",
            "recording_url": "https://api.twilio.com/2010-04-01/Accounts/AC********************/Recordings/RE********************",
            "transcript": {
               "conversation": [
                  {
                     "role": "user",
                     "content": "---"
                  },
                  {
                     "role": "assistant",
                     "content": "Hello, this is [Your Company Name] calling to inquire about your cybersecurity personnel. Is there a cybersecurity engineer or specialist available that I could speak with?"
                  },
                  {
                     "role": "user",
                     "content": "The numbers are hidden. Please don't hang up and hold on a moment."
                  },
                  {
                     "role": "assistant",
                     "content": "I understand. Thank you for your time, and I hope you have a great day!"
                  },
                  {
                     "role": "user",
                     "content": "ok"
                  },
                  {
                     "role": "assistant",
                     "content": "Alright, here it is: \"Goodbye!\""
                  }
               ],
               "recording_url": "https://malakai-audio-files.s3.us-east-1.amazonaws.com/hidden.mp3"
            }
         }
      ]
   }
}