Skip to main content
GET
/
{instance}
/
messages
Index Messages
curl --request GET \
  --url https://app.hypersender.com/api/sms/v1/{instance}/messages \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "9e01dbc1-1428-46de-b847-c5edd6d4c6f6",
      "request_id": "9e01dbc1-14a0-49a7-b22e-248d49b19b37",
      "phone": {
        "id": "9dedf71e-97bf-47eb-8df5-3088a7865603",
        "user_id": "9cbff1d0-6c37-4612-a8bb-6db042991761",
        "phone_number": "+20154244114",
        "name": "Ahmed Nagi SMS",
        "sim": "SIM1",
        "max_send_attempts": 10,
        "message_expiration_seconds": 259200,
        "missed_call_auto_reply_message": null,
        "is_online": false,
        "last_online_at": "2025-01-19 17:36:30",
        "last_offline_at": "2025-01-19 22:48:02",
        "last_message_at": "2025-01-17 20:05:00",
        "last_missed_call_at": "2025-01-17 20:05:00",
        "last_heartbeat_at": "2025-01-19 21:43:43",
        "heartbeat_enabled_at": null,
        "timezone": "GMT+2",
        "created_at": "2025-01-09 20:16:27",
        "updated_at": "2025-01-19 23:48:01"
      },
      "message_thread": {
        "id": "9deeebfa-9925-45d1-8b8d-a7004dda411c",
        "phone_id": "9dedf71e-8f16-439c-9220-489cd2144e0c",
        "last_message_id": "9e01dbc1-1428-46de-b847-c5edd6d4c6f6",
        "from_phone_number": "Vodafone",
        "to_phone_number": "+20154244114",
        "is_archived": false,
        "last_message_content": "2جيجا هدية.ليك منهم 200 ميجا فيسبوك ليومين عشان انت 4G. كلم#221*",
        "last_message_at": "2025-01-19 10:58:44",
        "created_at": "2025-01-10 07:41:08",
        "updated_at": "2025-01-19 17:36:30"
      },
      "message_thread_id": "9deeebfa-9925-45d1-8b8d-a7004dda411c",
      "phone_id": "9dedf71e-97bf-47eb-8df5-3088a7865603",
      "from_phone_number": "Vodafone",
      "to_phone_number": "+20154244114",
      "content": "2جيجا هدية.ليك منهم 200 ميجا فيسبوك ليومين عشان انت 4G. كلم#221*",
      "send_duration": null,
      "schedule_on_phone_at": null,
      "sent_at": null,
      "last_attempted_at": null,
      "delivered_at": null,
      "received_at": "2025-01-19 10:58:44",
      "expired_at": null,
      "schedule_send_at": null,
      "failed_at": null,
      "send_attempt_count": 0,
      "max_send_attempts": 10,
      "failure_reason": null,
      "message_expiration_seconds": 259200,
      "timezone": "GMT+2",
      "sim": "SIM1",
      "status": "received",
      "type": "received_from_mobile",
      "created_at": "2025-01-19 17:36:30",
      "updated_at": "2025-01-19 17:36:30"
    }
  ],
  "links": {
    "first": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=1",
    "last": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=74",
    "prev": null,
    "next": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=2"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 74,
    "links": [
      {
        "url": null,
        "label": "&laquo; Previous",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=1",
        "label": "1",
        "active": true
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=2",
        "label": "2",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=3",
        "label": "3",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=4",
        "label": "4",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=5",
        "label": "5",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=6",
        "label": "6",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=7",
        "label": "7",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=8",
        "label": "8",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=9",
        "label": "9",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=10",
        "label": "10",
        "active": false
      },
      {
        "url": null,
        "label": "...",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=73",
        "label": "73",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=74",
        "label": "74",
        "active": false
      },
      {
        "url": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages?per_page=1&include=phone%2CmessageThread&page=2",
        "label": "Next &raquo;",
        "active": false
      }
    ],
    "path": "https://beta.hypersender.com/api/sms/v1/9dedf71e-97bf-47eb-8df5-3088a7865603/messages",
    "per_page": 1,
    "to": 1,
    "total": 74
  }
}
This endpoint will index all of the messages sent and received based on various criteria, including searching with request id and messages attributes, with paging limited to 50 messages per response. Default sort is by last_updated_at.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

instance
string
required

Instance UUID copied from hypersender dashboard

Example:

"{{ instance_id }}"

Query Parameters

per_page
string

number of messages per page, max: 50

filter[request_id]
string

user defined string that can retrive message by it

filter[message_thread_id]
string

the thread id of the message

filter[from_phone_number]
string

message that was sent/recived from phone specified number

filter[to_phone_number]
string

message that was sent/recivied from phone specified number

filter[content]
string

search by parts of the message

filter[status]
string

pending, scheduled, sending, sent, failed, received, delivered, expired, deleted

filter[type]
string

sent, received, call_missed

filter[delivered_at]
string

filter by delivery date range down to the minute, comma seprated, example: 2025-01-01 00:00:00,2025-01-01 00:20:00

filter[received_at]
string

filter by received date range down to the minute, comma seprated, example: 2025-01-01 00:00:00,2025-01-01 00:20:00

filter[expired_at]
string

filter by expired date range down to the minute, comma seprated, example: 2025-01-01 00:00:00,2025-01-01 00:20:00

filter[failed_at]
string

filter by failed date range down to the minute, comma seprated, example: 2025-01-01 00:00:00,2025-01-01 00:20:00

filter[schedule_send_at]
string

filter by when the message will be sent date range down to the minute, comma seprated, example: 2025-01-01 00:00:00,2025-01-01 00:20:00

filter[created_at]
string

filter by when the message was created on the system. Note: this is not the date of message sent or received.

filter[updated_at]
string

filter by when the message was last updated.

sort
string

default: -updated_at, you can sort by any date: 'created_at', 'updated_at', 'delivered_at', 'received_at', 'expired_at', 'failed_at', 'schedule_send_at'

include
string

include the phone or messageThread object with the message, possible values: phone,messageThread

page
string

when paginating use this property to navigate through pages, example: page=2, page=1 and so on..

Response

Successful response

data
object[]
meta
object
I