Understanding "sentAt" param in list messages API

According to the documentation, sentAt query params works like:

sentAt
Fetches the messages list after a particular sentAt timestamp.

In my testing however, sentAt will define the time until the message has been sent.

For example /v2.0/messages?sentAt=1500000000 will return all messages that have been sent until 1500000000, not after.

Which is the correct definition of that param?

Hi @erbanv,

The sentAt property contains the unix timestamp at which the message was sent.
If you pass sentAt in query parameter in List Messages API
i.e /v2.0/messages?sentAt=1500000000 then
It will return all the messages sent after this 1500000000 timestamp including the message that matches this sentAt timestamp.

Hope this helps.
Thanks

1 Like

Hi @erbanv,

We do have a query parameter affix which can be used if you wish to fetch messages either after a specific timestamp or until a specific timestamp.

sentAt=1500000000&affix=prepend - this would fetch all the messages sent until the timestamp value including the passed value(1500000000) in the response.
sentAt=1500000000&affix=append - this would fetch all the messages sent after the timestamp value including the passed value(1500000000) in the response.

Note: By default if affix is not passed along with timestamp property then query string affix=append would be applied.

Hope this helps!
Thanks

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.