Search Message logs

This document will go over how to search your message logs.

GET /message

Search message logs will allow you to search for any messages between two set dates.

curl -X GET \
"https://api.mobivatebulksms.com/message?startDate=2023-01-01&endDate=2023-01-02&pageSize=100" \
-H 'Authorization: Bearer [API Key]'

Retrieve 100 Messages between 2023-01-01 00:00:00 (UTC) and 2023-01-02 00:00:00 (UTC):

curl -X GET \
"https://api.mobivatebulksms.com/message?startDate=2023-01-01&endDate=2023-01-02&pageSize=100" \
-H 'Authorization: Bearer [API Key]'

Retrieve Messages between 2023-01-01 12:00:00 (AEST) and 2023-01-02 12:00:00 (AEST):

curl -X GET \
"https://api.mobivatebulksms.com/message?startDate=2023-01-01T12:00:00%2B1200&endDate=2023-01-02T12:00:00%2B1200" \
-H 'Authorization: Bearer [API Key]'

Retrieve Incoming Messages between 2023-01-01 and 2023-01-02:

curl -X GET \
"https://api.mobivatebulksms.com/message?startDate=2023-01-01&endDate=2023-01-02&direction=MO" \
-H 'Authorization: Bearer [API Key]'

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer [API Key]

Body

Name
Type
Required?
Description

startDate

string

Yes

Start Date Format(s):

  • YYYY-MM-DD

  • YYYY-MM-DDTHH:MM:SS+TZ

Examples:

  • 2023-01-01

  • 2023-01-01T00:00:00+0000

  • 2023-01-01T00:09:00+0900.

endDate

string

Yes

End Date.

Examples: See startDate.

page

integer

No

Page number. Default: 1.

pageSize

integer

No

Number of message records to return. Default: 10 Max: 1000.

direction

string

No

By default we'll retrieve both Mobile Originated (MO / Incoming) and Mobile Terminated (MT / Outgoing) messages. Optional Values: MO or MT.

Response

Upon a successful send request, our server will respond with a 200 (success) HTTP response code, and respond with an array of messages.

We use conventional HTTP response codes to indicate the success or failure of an API request. In general:

2xx indicate success 4xx indicate an error that failed given the information provided (e.g., a required parameter was omitted) 5xx errors indicate an error with ours servers (these are rare).

To see a full list of our Response codes, please click here.

Last updated

Was this helpful?