MixdeskHelp Center
Skip to content

Developer Documentation

Mixdesk API Reference

Last updated May 13, 2026

On this page

Retrieve conversations, contacts, and other data through the API.

Before you start

Go to Settings > API, obtain an Access Token, and enable it.

API access token settings in Mixdesk

General requirements

  • All APIs below require an Access Token. Resetting it invalidates the previous token. Request header:
Authorization: Bearer YOUR_ACCESS_TOKEN
  • All request and response time fields use millisecond-level UTC ISO 8601 format. Example: 2024-01-01T00:00:00.000Z

Endpoints

1. Query conversations

Note: Only the most recent six months of data are available.

1.1 Conversation model

Field nameTypeDescription
ent_idintegerWorkspace ID
client_infoobjectContact information
agent_namestringTeam member’s real name
agent_idintegerTeam member ID
agent_nick_namestringTeam member’s display name
agent_work_numstringEmployee ID
agent_emailstringTeam member’s email
agent_group_namestringTeam group name
conv_idintegerConversation ID
track_idstringConversation visit identifier
conv_tagsarray(string)Conversation tags
conv_start_timestringConversation creation time
conv_end_timestringConversation end time
conv_typeintegerConversation type: 1 = direct message, 2 = group
summarystringConversation summary
summary_timestringSummary time
evaluationintegerRating: 0 = negative, 1 = neutral, 2 = positive
evaluation_contentstringRating content
source_typestringTraffic source
source_urlstringSource URL
sourcestringConversation channel
sub_sourcestringSubchannel name
sub_source_remarkstringSubchannel notes
visit_page_titlestringLanding page title
visit_page_urlstringLanding page URL
conv_titlestringConversation page title
conv_urlstringConversation page URL
search_enginestringSearch engine
visitor_osstringOperating system
visitor_browserstringBrowser
visitor_locationstringRegion
browser_languagestringBrowser language
utm_sourcestringutm_source
utm_mediumstringutm_medium
utm_termstringutm_term
utm_contentstringutm_content
utm_campaignstringutm_campaign
messagesarray(object)Conversation message list
source_client_infoobjectChannel profile information; available for third-party channels.

client_info fields:

Field nameTypeDescription
contact_idstringContact ID
track_idsarray(string)Visit identifiers
tagsarray(string)Contact tags
system_fieldsobjectSystem fields that are enabled for display
custom_fieldsobjectCustom fields that are enabled for display

messages fields:

Field nameTypeDescription
agent_namestringReal name of the team member associated with the message
agent_tokenstringToken of the team member associated with the message
fromstringMessage source
timestampstringMessage time
contentstringMessage content
typestringMessage type
source_usernamestringThird-party channel username (Facebook, Instagram, Telegram, LINE, WhatsApp API, WhatsApp App, or Email)
group_sender_idstringGroup user ID. Supported by WhatsApp App, LINE, and Telegram. WhatsApp App uses + followed by the phone number; other channels use the user ID.

source_client_info fields:

Field nameTypeDescription
user_idstringUser ID on the third-party channel
genderstringGender
localestringLocale
timezoneintTime zone
user_namestringUser name

1.2 Get a conversation by ID

Endpoint:

GET https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/conversation/{conversation_id}

Request parameters:

ParameterParameter typeTypeRequiredDescription
conversation_idPathintegerYesConversation ID

Response parameters:

Field nameTypeDescription
codeintegerStatus code
msgstringMessage
successbooleanWhether the request succeeded
dataConversation modelConversation model

1.3 List conversations by end time

Endpoint:

GET https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/conversations

Request parameters:

ParameterParameter typeTypeRequiredDescription
end_time_startquerystringYesStart of the conversation-end-time range
end_time_endquerystringYesEnd of the conversation-end-time range
pagequeryintegerNoPage number, starting at 1. Default: 1.
page_sizequeryintegerNoPage size, from 1 to 50. Default: 20.

Response parameters:

Field nameTypeDescription
codeintegerStatus code
msgstringMessage
successbooleanWhether the request succeeded
dataobjectConversation list data

data fields:

Field nameTypeDescription
totalintegerTotal matching conversations
dataarray(conversation model)Conversation records

2. Query contacts

Contact fields are returned only when enabled for display in the system.

2.1 Contact model

Field nameTypeDescription
contact_idstringContact ID
track_idsarray(string)Visit identifiers
system_fieldsobjectSystem fields
system_fields.sourcesarray(object)All channel information for the contact. Merged contacts can contain multiple entries; duplicates are not removed.
custom_fieldsobjectCustom fields
source_client_infoarray(object)Third-party channel profile information, keyed by track_id. Merged contacts may contain multiple keys.

2.2 List contacts by creation time

Endpoint:

GET https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/contacts

Request parameters:

ParameterParameter typeTypeRequiredDescription
create_time_startquerystringYesStart of the contact-creation-time range
create_time_endquerystringYesEnd of the contact-creation-time range
pagequeryintegerNoPage number, starting at 1. Default: 1.
page_sizequeryintegerNoPage size, from 1 to 50. Default: 20.

Response parameters:

Field nameTypeDescription
codeintegerStatus code
msgstringMessage
successbooleanWhether the request succeeded
dataobjectContact list data

data fields:

Field nameTypeDescription
totalintegerTotal matching contacts
dataarray(contact model)Contact records

3. Send messages to Telegram

The Telegram bot ID is the numeric prefix of the token used when connecting the bot.

Find chat_user_id:

1. In the conversation’s right sidebar, use the value of the ID field in channel profile information.

2. Use the value returned by the API or webhook in source_client_info.user_id

Telegram bot token with the bot ID prefix highlighted

3.1 Send-message model

Field nameTypeDescription
tg_bot_idstringTelegram bot ID
chat_user_idstringConversation user ID: negative for groups, positive for individuals
message_listarrayMessages to send: 1–10 items
message_list.message_typestringMessage type. Allowed value: text
message_list.contentstringMessage text: 1–1,024 characters

3.2 Send text messages

Endpoint:

POST https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/telegram/send

Content-Type: application/json;

Request parameters:

Send-message model in JSON format

Response parameters:

Field nameTypeDescription
codeintegerStatus code
msgstringMessage
successbooleanWhether the request succeeded
dataobjectSend result

data fields:

Field nameTypeDescription
message_listarrayMessage

message_list fields:

Field nameTypeDescription
conv_idint64Conversation ID
msg_idint64Message ID

Example

curl --location --request POST 'https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/telegram/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--data-raw '{
"tg_bot_id":"YOUR_BOT_ID",
"chat_user_id":"RECIPIENT_USER_ID",
"message_list":[
{
    "message_type":"text",
    "content":"Hello!"
}
]
}'

4. Team-member workload

Endpoint:

GET https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/agent_service

Request parameters:

ParameterTypeRequiredExampleDescription
create_time_startstringYes2025-07-10T00:00:00.000ZStart of the conversation-end-time range
create_time_endstringYes2025-07-18T00:00:00.000ZEnd of the conversation-end-time range

Example response:

{
    "code": 1,
    "msg": "",
    "success": true,
    "data": [
        {
            "agent_id": 13,
            "agent_name": "Super Administrator",
            "group_id": 11,
            "group_name": "Default Group",
            "work_num": "",
            "conv_cnt": 0,
            "effective_conv_cnt": 0,
            "effective_conv_rate": 0,
            "missed_conv_cnt": 0,
            "missed_conv_rate": 0,
            "msg_cnt": 0,
            "duration_time": 0,
            "conv_first_response_wait_time": 0,
            "avg_response_wait_time": 0,
            "transfer_in_cnt": 0,
            "transfer_out_cnt": 0,
            "invited_eval_num": 0,
            "good_conv_cnt": 0,
            "medium_conv_cnt": 0,
            "bad_conv_cnt": 0,
            "eval_num": 0,
            "eval_rate": 0,
            "bad_evaluate_rate": 0,
            "medium_evaluate_rate": 0,
            "good_evaluate_rate": 0,
            "avg_evaluate_score": 0,
            "avg_human_duration_time": 0
        },
        {
            "agent_id": 486,
            "agent_name": "yyy",
            "group_id": 11,
            "group_name": "Default Group",
            "work_num": "002",
            "conv_cnt": 0,
            "effective_conv_cnt": 0,
            "effective_conv_rate": 0,
            "missed_conv_cnt": 0,
            "missed_conv_rate": 0,
            "msg_cnt": 0,
            "duration_time": 0,
            "conv_first_response_wait_time": 0,
            "avg_response_wait_time": 0,
            "transfer_in_cnt": 0,
            "transfer_out_cnt": 0,
            "invited_eval_num": 0,
            "good_conv_cnt": 0,
            "medium_conv_cnt": 0,
            "bad_conv_cnt": 0,
            "eval_num": 0,
            "eval_rate": 0,
            "bad_evaluate_rate": 0,
            "medium_evaluate_rate": 0,
            "good_evaluate_rate": 0,
            "avg_evaluate_score": 0,
            "avg_human_duration_time": 0
        }
    ]
}

Parameter descriptions:

FieldParameter
Team member IDagent_id
Team member’s real nameagent_name
Team groupgroup_name
Team group IDgroup_id
Employee IDwork_num
Total conversationsconv_cnt
Total valid conversationseffective_conv_cnt
Valid conversation rateeffective_conv_rate
Missed conversationsmissed_conv_cnt
Missed conversation ratemissed_conv_rate
Total messagesmsg_cnt
Transferred-out conversationstransfer_out_cnt
Transferred-in conversationstransfer_in_cnt
Average conversation duration (seconds)duration_time
Average human-handled conversation durationavg_human_duration_time
Average first response timeconv_first_response_wait_time
Average response timeavg_response_wait_time
Manually sent rating invitationsinvited_eval_num
Rating counteval_num
Rating rateeval_rate
Positive ratingsgood_conv_cnt
Positive rating rategood_evaluate_rate
Neutral ratingsmedium_conv_cnt
Neutral rating ratemedium_evaluate_rate
Negative ratingsbad_conv_cnt
Negative rating ratebad_evaluate_rate
Average rating scoreavg_evaluate_score

Response parameters:

Field nameTypeDescription
codeintegerStatus code
msgstringMessage
successbooleanWhether the request succeeded
dataobjectContact list data

5. Send messages to Facebook

After connecting the channel, find PageID in the Page ID column.

Find the conversation user ID:

1. In the conversation’s right sidebar, use the value of the ID field in channel profile information.

2. Use the value returned by the API or webhook in source_client_info.user_id

5.1 Send-message model

Field nameTypeDescription
page_idstringRequired. PageID.
chat_user_idstringRequired. Conversation user ID.
tagstringWhen the user’s last message was more than 24 hours ago but within seven days, use <HUMAN_AGENT>.
After seven days, use an applicable tag: <ACCOUNT_UPDATE> for account-information, status, or security updates; <CONFIRMED_EVENT_UPDATE> for an accepted event or appointment and related changes; or <POST_PURCHASE_UPDATE> for transaction, shipment, or order updates.
message_listarrayRequired. Messages to send: 1–10 items.
message_list.message_typestringMessage type: text, photo, video, audio, or file
message_list.contentstringMessage text: 1–1,024 characters
message_list.photoobject
message_list.photo.urlstringSupports .jpg, .gif, and .png, up to 5 MB
message_list.videoobject
message_list.video.urlstringUp to 25 MB
message_list.video.file_namestringFile name
message_list.video.sizeintFile size
message_list.audioobject
message_list.audio.urlstringSupports m4a and ogg, up to 10 MB and 60 seconds. m4a is recommended.
message_list.fileobject
message_list.file.urlstringUp to 25 MB. ZIP files are not supported.
message_list.file.file_namestringFile name
message_list.file.sizeintFile size

5.2 Send messages

Endpoint:

POST https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/messenger/send

Content-Type: application/json; charset=utf-8

Request parameters:

Send-message model in JSON format

Response parameters:

Field nameTypeDescription
codeintegerStatus code
msgstringMessage
successbooleanWhether the request succeeded
dataobjectSend result

data fields:

Field nameTypeDescription
message_listarrayMessage

message_list fields:

Field nameTypeDescription
conv_idint64Conversation ID
msg_idint64Message ID

Example

curl --location --request POST 'https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/messenger/send' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
    "page_id": "page_id",
    "chat_user_id": "chat_user_id",
    "tag": "",
    "message_list": [
        {
            "message_type": "text",
            "content": "123"
        },
        {
            "message_type": "photo",
            "photo": {
                "url": "url"
            }
        },
        {
            "message_type": "video",
            "video": {
                "url": "url",
                "file_name": "hello",
                "size":100
            }
        },
        {
            "message_type": "audio",
            "audio": {
                "url": "url"
            }
        },
        {
            "message_type": "file",
            "file": {
                "url": "url",
                "file_name": "image",
                "size": 100
            }
        }
    ]
}'

6. Send messages to WhatsApp App

After connecting the channel, find phone_number in the Phone Number column. Do not include the + sign.

Find the conversation user ID

  1. Use a known user or group ID. User IDs use phone-number@c.us, for example 8618888888888@c.us. Group IDs use digits@g.us, for example 1201111111111111111111@g.us.
  2. Use the value returned by the API or webhook in source_client_info.user_id

6.1 Send-message model

Field nameTypeDescription
phone_numberstringRequired. Phone number of the connected personal account, for example 8618888888888.
chat_user_idstringRequired. Recipient user or group ID
message_listarrayRequired. Messages to send: 1–10 items.
message_list.message_typestringMessage type: text, photo, video, audio, or file
message_list.contentstringMessage text: 1–1,024 characters
message_list.photoobject
message_list.photo.urlstringSupports .jpg, .gif, and .png, up to 5 MB
message_list.videoobject
message_list.video.urlstringUp to 25 MB
message_list.video.file_namestringFile name
message_list.video.sizeintFile size
message_list.audioobject
message_list.audio.urlstringSupports m4a and ogg, up to 10 MB and 60 seconds. m4a is recommended.
message_list.fileobject
message_list.file.urlstringUp to 25 MB. ZIP files are not supported.
message_list.file.file_namestringFile name
message_list.file.sizeintFile size

6.2 Send messages

Endpoint: POST https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/pwa/send

Content-Type: application/json; charset=utf-8

Request parameters:

Send-message model in JSON format

Response parameters:

Field nameTypeDescription
codeintegerStatus code
msgstringMessage
successbooleanWhether the request succeeded
dataobjectSend result

data fields:

Field nameTypeDescription
message_listarrayMessage

message_list fields:

Field nameTypeDescription
conv_idint64Conversation ID
msg_idint64Message ID

Example

curl --location --request POST 'https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/pwa/send' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"phone_number": "phone_number",
"chat_user_id": "chat_user_id",
"message_list": [
{
"message_type": "text",
"content": "123"
},
{
"message_type": "photo",
"photo": {
"url": "url"
}
},
{
"message_type": "video",
"video": {
"url": "url",
"file_name": "hello",
"size":100
}
},
{
"message_type": "audio",
"audio": {
"url": "url"
}
},
{
"message_type": "file",
"file": {
"url": "url",
"file_name": "image",
"size": 100
}
}
]
}'

7. Send messages to the Web channel

A Web visitor must have created a conversation before a track_id is available.

  1. In conversation details, find the Visit Identifier value in the contact information on the right.

7.1 Send-message model

Field nameTypeDescription
track_idstringRequired. Visit identifier.
message_listarrayRequired. Messages to send: 1–10 items.
message_list.message_typestringMessage type: text, photo, video, audio, or file
message_list.contentstringMessage text: 1–1,024 characters
message_list.photoobject
message_list.photo.urlstringSupports .jpg, .gif, and .png, up to 5 MB
message_list.videoobject
message_list.video.urlstringUp to 25 MB
message_list.video.file_namestringFile name
message_list.video.sizeintFile size
message_list.audioobject
message_list.audio.urlstringSupports m4a and ogg, up to 10 MB and 60 seconds. m4a is recommended.
message_list.fileobject
message_list.file.urlstringUp to 25 MB. ZIP files are not supported.
message_list.file.file_namestringFile name
message_list.file.sizeintFile size

7.2 Send text messages

Endpoint: POST https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/web/send

Content-Type: application/json; charset=utf-8

Request parameters:

Send-message model in JSON format

Response parameters:

Field nameTypeDescription
codeintegerStatus code
msgstringMessage
successbooleanWhether the request succeeded
dataobjectSend result

data fields:

Field nameTypeDescription
message_listarrayMessage

message_list fields:

Field nameTypeDescription
conv_idint64Conversation ID
msg_idint64Message ID

Example

curl --location --request POST 'https://api-gateway.mixdesk.com/mixdesk/hikari/open/api/v1/web/send' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"track_id": "track_id",
"message_list": [
{
"message_type": "text",
"content": "123"
},
{
"message_type": "photo",
"photo": {
"url": "url"
}
},
{
"message_type": "video",
"video": {
"url": "url",
"file_name": "hello",
"size":100
}
},
{
"message_type": "audio",
"audio": {
"url": "url"
}
},
{
"message_type": "file",
"file": {
"url": "url",
"file_name": "image",
"size": 100
}
}
]
}'

Status code

CodeDescription
1Request successful
10000Authentication failed; check the Access Token
10010Unavailable on this workspace’s plan
10012Access Token is not enabled
11000Invalid request parameters
20000Internal server error

Related articles

Still need help?

Contact support@mixdesk.com for help with your setup.