Query Message Channel List

Query the message channel list.

Request URL

GET {base_url}/{api_path}/message_channel/list?access_token={access_token}

Request parameters

Parameter Required Type Description
page Yes Integer Define which page is displayed.
page_size Yes Integer Define how many records per page.
time_range Yes String Specify the time period for counting or filtering messages of the message channels.

Valid value:

  • today
  • yesterday
  • last_7_days
  • last_30_days
  • this_month
  • all

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
total_number Integer The total number of message channels.
list Array<Msg_Channel> The information of message channels.
Msg_Channel
Parameter Type Description
id Integer The unique ID of the message channel.
status String The connection status of the message channel.
  • status_connect_succ: Successfully connected.
  • status_connect_fail: Connection failed.
  • status_sub_invalid: PBX subscription is invalid.
reason String The reason why the message channel connection fails.
name String Name of the message channel.
channel String The service provider of the message channel.
  • general
  • apidaze
  • athena
  • bandwidth
  • flowroute
  • ixica
  • siptrunk
  • skyetel
  • telnyx
  • twilio
  • vetta
  • voicemeup
  • whatsapp
  • facebook
  • livechat
type String Type of the message channel.
  • sms
  • whatsapp
  • facebook
  • livechat
number Array<String> DID number(s) associated with the message channel.
sent Integer The number of sent messages.
delivered Integer The number of messages sent successfully.
failed Integer The number of messages that failed to send.
received Integer The number of received messages.

Examples

Request example

GET /openapi/v1.0/message_channel/list?access_token=bapS7zH2cDjmUiOz8h4Kyb88UqZsHPKD&page=1&page_size=5&time_range=today HTTP/1.1
Host: 192.168.5.150:8088

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "total_number": 47,
    "list": [
        {
            "id": 2,
            "status": "status_connect_succ",
            "reason": "",
            "name": "Customer Support Line",
            "channel": "flowroute",
            "type": "sms",
            "number": [
                "+12345678101",
                "+12345678102",
                "+12345678103"
            ],
            "sent": 0,
            "delivered": 0,
            "failed": 0,
            "received": 0
        },
        {
            "id": 3,
            "status": "status_connect_succ",
            "reason": "",
            "name": "Sales Hotline",
            "channel": "whatsapp",
            "type": "whatsapp",
            "number": [
                "+12025550123"
            ],
            "sent": 0,
            "delivered": 0,
            "failed": 0,
            "received": 0
        },
        {
            "id": 6,
            "status": "status_connect_succ",
            "reason": "",
            "name": "Technical Assistance Channel",
            "channel": "livechat",
            "type": "livechat",
            "number": [
                 "LC00000"
            ],
            "sent": 0,
            "delivered": 0,
            "failed": 0,
            "received": 0
        },
        {
            "id": 7,
            "status": "status_connect_fail",
            "reason": "reason_unauthorized",
            "name": "General Inquiry Line",
            "channel": "facebook",
            "type": "facebook",
            "number": [
                 "10234567890123456"
            ],
            "sent": 0,
            "delivered": 0,
            "failed": 0,
            "received": 0
        },
        {
            "id": 14,
            "status": "status_connect_succ",
            "reason": "",
            "name": "VIP Service Channel",
            "channel": "telnyx",
            "type": "sms",
            "number": [
                "+12345678601",
                "+12345678602"
            ],
            "sent": 0,
            "delivered": 0,
            "failed": 0,
            "received": 0
        }
    ]
}