Get message list

Note:

  • For APIs used for Shop, the API key is: <api_key>. The base_url information of the Shop.

  • For APIs used for Partner, the API key is: <shop_key>. The base_url information of the Partner.

ListMessages

post
Body
Responses
200
A successful response
application/json
post
POST /ListMessages HTTP/1.1
Host: $BASE_URL.Zalo
Content-Type: application/json
Accept: */*
Content-Length: 419

{
  "filter": {
    "campaign_id": "text",
    "date_from": "2025-08-03T03:41:25.035Z",
    "date_to": "2025-08-03T03:41:25.035Z",
    "delivery_status": "unknown",
    "is_charged": true,
    "is_development": true,
    "journey_id": "text",
    "msg_id": "text",
    "msg_type": "unknown",
    "oa_id": "text",
    "phone": "text",
    "status": "Z",
    "template_id": 1,
    "time_type": "unknown",
    "tracking_id": "text",
    "user_id": "text"
  },
  "paging": {
    "after": "text",
    "before": "text",
    "limit": 1,
    "sort": "text"
  }
}
200

A successful response

{
  "messages": [
    {
      "campaign_id": "text",
      "created_at": "2025-08-03T03:41:25.035Z",
      "delivery_status": "unknown",
      "delivery_time": "2025-08-03T03:41:25.035Z",
      "error_code": 1,
      "error_message": "text",
      "fee_main": 1,
      "fee_token": 1,
      "feedback": [
        "text"
      ],
      "id": "text",
      "is_charged": true,
      "is_development": true,
      "journey_id": "text",
      "msg_id": "text",
      "note": "text",
      "oa_id": "text",
      "phone": "text",
      "rate": 1,
      "request_time": "2025-08-03T03:41:25.035Z",
      "sent_time": "2025-08-03T03:41:25.035Z",
      "shop_id": "text",
      "status": "Z",
      "submit_time": "2025-08-03T03:41:25.035Z",
      "template_data": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "template_id": 1,
      "timeout": 1,
      "tracking_id": "text",
      "type": "unknown",
      "updated_at": "2025-08-03T03:41:25.035Z",
      "user_id": "text",
      "zl_user_id": "text"
    }
  ],
  "paging": {
    "after": "text",
    "before": "text",
    "limit": 1,
    "next": "text",
    "prev": "text",
    "sort": "text"
  }
}

Request:

curl --location '$BASE_URL.Zalo/ListMessages' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API_KEY' \
--data '{
  "filter": {
   "date_from": "2023-08-02T14:15:22Z",
    "date_to": "2023-08-03T14:15:22Z"
      },
  "paging": {
    "limit": 50
  }
}'

Response:

{
  "messages": [
    {
      "campaign_id": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "delivery_status": "unknown",
      "delivery_time": "2019-08-24T14:15:22Z",
      "error_code": 0,
      "error_message": "string",
      "fee_main": 0,
      "fee_token": 0,
      "feedback": [
        "string"
      ],
      "id": "string",
      "is_charged": true,
      "is_development": true,
      "journey_id": "string",
      "msg_id": "string",
      "note": "string",
      "oa_id": "string",
      "phone": "string",
      "rate": 0,
      "sent_time": "2019-08-24T14:15:22Z",
      "shop_id": "string",
      "status": "Z",
      "submit_time": "2019-08-24T14:15:22Z",
      "template_data": {
        "property1": "string",
        "property2": "string"
      },
      "template_id": 0,
      "timeout": 0,
      "tracking_id": "string",
      "type": "unknown",
      "updated_at": "2019-08-24T14:15:22Z",
      "user_id": "string"
    }
  ],
  "paging": {
    "after": "string",
    "before": "string",
    "limit": 0,
    "next": "string",
    "prev": "string",
    "sort": "string"
  }
}

Request body structure

Parameters
Data type
Describe

campaign_id

int64

Campaign ID

id

string

OA ID

template_id

integer

ID of the message

journey_id

int64

Journey ID

msg_id

string

ZNS message ID

msg_type

string

Enum: "unknown" "template" "journey" "uid"

is_charged

bool

Charge or not

is_development

boolean

True: ZNS message in experimental development mode

False: ZNS message is not in beta development mode

delivery_status

string

Enum: "unknown" "received" "seen"

phone

string

Recipient phone number

status

string

Status Z: Newly created P: Enable N: Disable

date_from

string<date-time>

Start date

date_to

string<date-time>

End date

time_type

string (otTimeFilter)

request_time: Time to send message

updated_time: Time of news update

submit_time: Update time of the review news

Note : If the parameter time_typeis not passed, default time_type =updated_time

tracking_id

string

Your API call tracking number, defined by you. You can use tracking_id for reconciliation without depending on the message_id provided by eTelecom.

Return data attribute structure

Parameters
Data type
Describe

id

int64

Message ID on eTelecom system

shop_id

int64

Store ID on eTelecom system

user_id

int64

Sender ID on eTelecom system

campaign_id

int64

Campaign ID

delivery_status

string

Unkown: Unknown

Received: Received

Seen: Viewed

delivery_time

string<date-time>

Time the user's device receives the ZNS notification

error_code

int

Error code

error_message

string

Error message

fee_main

int

Main fee

fee_token

int

Token Creation Fee

is_charged

boolean

True: ZNS message is charged

False: ZNS message is free of charge

is_development

boolean

True: ZNS message in experimental development mode

False: ZNS message is not in beta development mode

journey_id

string

Journey ID

msg_id

string

ZNS message ID

type

string

template: ZNS usually

journey: ZNS journey

status

string

Status

Z: Newly created

P: Enable

N: Disable

rate

integer

Number of stars rated by customers

note

string

Additional customer notes

feedback

array

Customer reviews section

submit_time

string<date-time>

When customers submit reviews

template_data

object

Message parameters

phone

string

Recipient phone number

sent_time

string<date-time>

ZNS notification sending time

template_id

integer

ID of the message

timeout

integer

Maximum time required by the system to process the request

tracking_id

string

Your API call tracking number, defined by you. You can use tracking_id for reconciliation without depending on the message_id provided by eTelecom.

updated_at

string<date-time>

Update date

created_at

string<date-time>

Date created

Last updated