Get Inbound Campaign logs
curl --request GET \
--url https://api.getmalakai.com/campaigns/outbound/logs/{id} \
--header 'Authorization: <authorization>' \
--header 'x-access-token: <x-access-token>'{
"responseCode": 2000,
"message": "Inbound campaign logs fetched successfully",
"data": {
"analytics": {
"Total Contacts": 2,
"Total Conversations": 113
},
"logs": [
{
"from": "DUMMY_FROM",
"number": "DUMMY_NUMBER",
"status": "completed",
"call_sid": "DUMMY_CALL_SID",
"sentiment": "neutral",
"inbound_id": "DUMMY_INBOUND_ID",
"session_id": "DUMMY_SESSION_ID",
"call_summary": "The user asked about the services the company provides. The assistant acknowledged that they do not have information about the specific services, but offered to transfer the call to the customer service department to assist the user with their inquiry.",
"call_duration": 27.71903395652771,
"goal_achieved": "yes",
"transcript": {
"conversation": [
{
"role": "user",
"content": "---"
},
{
"role": "assistant",
"content": "Thank you for calling. How can I assist you today?"
},
{
"role": "user",
"content": " Hey. What services you can provide me?"
},
{
"role": "assistant",
"content": "I'm afraid I don't have information about the specific services we offer. However, I can transfer your call to our customer service department who would be happy to assist you with your inquiry. REDIRECT_customer_service"
}
],
"recording_url": "https://dummy-audio-files.com/recording1.mp3"
}
},
{
"from": "+1234567890",
"number": "+10987654321",
"status": "completed",
"call_sid": "DUMMY_CALL_SID_2",
"sentiment": "positive",
"inbound_id": "DUMMY_INBOUND_ID_2",
"session_id": "DUMMY_SESSION_ID_2",
"call_summary": "The user initially had some technical issues with the call, but was able to clearly communicate their request to purchase a house. The assistant recognized this request and transferred the call to the sales department as per the instructions.",
"call_duration": 86.25287747383118,
"goal_achieved": "yes",
"transcript": {
"conversation": [
{
"role": "user",
"content": "---"
},
{
"role": "assistant",
"content": "Thank you for calling. How can I assist you today?"
},
{
"role": "user",
"content": " Hello? Hello?"
},
{
"role": "assistant",
"content": "I'm sorry, I didn't hear anything from you. Could you please restate your request so I can try to assist you?"
},
{
"role": "user",
"content": " What services are you providing?"
},
{
"role": "assistant",
"content": "We offer a variety of services to our customers. How may I best assist you today? If you have a specific inquiry, I'd be happy to try to help or direct you to the appropriate department."
},
{
"role": "user",
"content": " I want to buy a house. I want to buy a house."
},
{
"role": "assistant",
"content": "Okay, let me transfer you to our sales department who can assist you with purchasing a house. One moment please. REDIRECT_Sales"
}
],
"recording_url": "https://dummy-audio-files.com/recording2.mp3"
}
}
]
}
}
Inbound
Get Inbound Campaign logs
Retrieve a list of all existing campaigns
GET
campaigns
/
outbound
/
logs
/
{id}
Get Inbound Campaign logs
curl --request GET \
--url https://api.getmalakai.com/campaigns/outbound/logs/{id} \
--header 'Authorization: <authorization>' \
--header 'x-access-token: <x-access-token>'{
"responseCode": 2000,
"message": "Inbound campaign logs fetched successfully",
"data": {
"analytics": {
"Total Contacts": 2,
"Total Conversations": 113
},
"logs": [
{
"from": "DUMMY_FROM",
"number": "DUMMY_NUMBER",
"status": "completed",
"call_sid": "DUMMY_CALL_SID",
"sentiment": "neutral",
"inbound_id": "DUMMY_INBOUND_ID",
"session_id": "DUMMY_SESSION_ID",
"call_summary": "The user asked about the services the company provides. The assistant acknowledged that they do not have information about the specific services, but offered to transfer the call to the customer service department to assist the user with their inquiry.",
"call_duration": 27.71903395652771,
"goal_achieved": "yes",
"transcript": {
"conversation": [
{
"role": "user",
"content": "---"
},
{
"role": "assistant",
"content": "Thank you for calling. How can I assist you today?"
},
{
"role": "user",
"content": " Hey. What services you can provide me?"
},
{
"role": "assistant",
"content": "I'm afraid I don't have information about the specific services we offer. However, I can transfer your call to our customer service department who would be happy to assist you with your inquiry. REDIRECT_customer_service"
}
],
"recording_url": "https://dummy-audio-files.com/recording1.mp3"
}
},
{
"from": "+1234567890",
"number": "+10987654321",
"status": "completed",
"call_sid": "DUMMY_CALL_SID_2",
"sentiment": "positive",
"inbound_id": "DUMMY_INBOUND_ID_2",
"session_id": "DUMMY_SESSION_ID_2",
"call_summary": "The user initially had some technical issues with the call, but was able to clearly communicate their request to purchase a house. The assistant recognized this request and transferred the call to the sales department as per the instructions.",
"call_duration": 86.25287747383118,
"goal_achieved": "yes",
"transcript": {
"conversation": [
{
"role": "user",
"content": "---"
},
{
"role": "assistant",
"content": "Thank you for calling. How can I assist you today?"
},
{
"role": "user",
"content": " Hello? Hello?"
},
{
"role": "assistant",
"content": "I'm sorry, I didn't hear anything from you. Could you please restate your request so I can try to assist you?"
},
{
"role": "user",
"content": " What services are you providing?"
},
{
"role": "assistant",
"content": "We offer a variety of services to our customers. How may I best assist you today? If you have a specific inquiry, I'd be happy to try to help or direct you to the appropriate department."
},
{
"role": "user",
"content": " I want to buy a house. I want to buy a house."
},
{
"role": "assistant",
"content": "Okay, let me transfer you to our sales department who can assist you with purchasing a house. One moment please. REDIRECT_Sales"
}
],
"recording_url": "https://dummy-audio-files.com/recording2.mp3"
}
}
]
}
}
Headers
Your API key for authentication. Prefix with
Bearer .Your access token for authentication.
Response
The main response object containing analytics and logs.
An object containing overall analytics for the campaign logs.
Total number of contacts involved in the campaign.
Total number of conversations in the campaign.
Array of log objects for each contact in the campaign.
The sender’s identifier or phone number.
The recipient’s phone number.
Status of the campaign log (e.g., completed).
Identifier for the call session.
Sentiment analysis result for the call.
Identifier for the inbound campaign.
Identifier for the session.
Summary of the call conversation.
Duration of the call in seconds.
Indicates if the campaign goal was achieved (“yes” or “no”).
Object containing the transcript and recording URL.
Array of conversation objects with role and content.
Role in the conversation (user or assistant).
Content of the conversation message.
URL to the transcript audio file.
{
"responseCode": 2000,
"message": "Inbound campaign logs fetched successfully",
"data": {
"analytics": {
"Total Contacts": 2,
"Total Conversations": 113
},
"logs": [
{
"from": "DUMMY_FROM",
"number": "DUMMY_NUMBER",
"status": "completed",
"call_sid": "DUMMY_CALL_SID",
"sentiment": "neutral",
"inbound_id": "DUMMY_INBOUND_ID",
"session_id": "DUMMY_SESSION_ID",
"call_summary": "The user asked about the services the company provides. The assistant acknowledged that they do not have information about the specific services, but offered to transfer the call to the customer service department to assist the user with their inquiry.",
"call_duration": 27.71903395652771,
"goal_achieved": "yes",
"transcript": {
"conversation": [
{
"role": "user",
"content": "---"
},
{
"role": "assistant",
"content": "Thank you for calling. How can I assist you today?"
},
{
"role": "user",
"content": " Hey. What services you can provide me?"
},
{
"role": "assistant",
"content": "I'm afraid I don't have information about the specific services we offer. However, I can transfer your call to our customer service department who would be happy to assist you with your inquiry. REDIRECT_customer_service"
}
],
"recording_url": "https://dummy-audio-files.com/recording1.mp3"
}
},
{
"from": "+1234567890",
"number": "+10987654321",
"status": "completed",
"call_sid": "DUMMY_CALL_SID_2",
"sentiment": "positive",
"inbound_id": "DUMMY_INBOUND_ID_2",
"session_id": "DUMMY_SESSION_ID_2",
"call_summary": "The user initially had some technical issues with the call, but was able to clearly communicate their request to purchase a house. The assistant recognized this request and transferred the call to the sales department as per the instructions.",
"call_duration": 86.25287747383118,
"goal_achieved": "yes",
"transcript": {
"conversation": [
{
"role": "user",
"content": "---"
},
{
"role": "assistant",
"content": "Thank you for calling. How can I assist you today?"
},
{
"role": "user",
"content": " Hello? Hello?"
},
{
"role": "assistant",
"content": "I'm sorry, I didn't hear anything from you. Could you please restate your request so I can try to assist you?"
},
{
"role": "user",
"content": " What services are you providing?"
},
{
"role": "assistant",
"content": "We offer a variety of services to our customers. How may I best assist you today? If you have a specific inquiry, I'd be happy to try to help or direct you to the appropriate department."
},
{
"role": "user",
"content": " I want to buy a house. I want to buy a house."
},
{
"role": "assistant",
"content": "Okay, let me transfer you to our sales department who can assist you with purchasing a house. One moment please. REDIRECT_Sales"
}
],
"recording_url": "https://dummy-audio-files.com/recording2.mp3"
}
}
]
}
}
⌘I