Skip to main content
GET
Get filtered chat history (messages only) of a WABA chat

Authorizations

Authorization
string
header
required

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

Path Parameters

chat_id
integer
required

an id of the chat as appears in TimelinesAI (can be found in the URL of the chat page, or in the payload of outbound webhook). Supports sending messages to a group.

Query Parameters

from_me
boolean

specify true to filter messages sent from the WABA account, false to filter messages received from the contact.

after
string

can specify date or datetime in ISO format to filter out messages created AFTER the specified date (inclusive)

before
string

can specify date or datetime in ISO format to filter out messages created BEFORE the specified date (inclusive)

after_message
string

can specify message uid to filter out messages created after the specified message (excluding the specified message itself)

before_message
string

can specify message uid to filter out messages created before the specified message (excluding the specified message itself)

sorting_order
enum<string>

order messages by timestamp, according to possible values: asc, desc

Available options:
asc,
desc
page
integer

specify the page of results, starting with 1. Check "has more page" response value to see if more pages are available.

size
integer

override the default page size (50).

Response

Success

status
enum<string>
required
Available options:
ok,
error
Example:

"ok"

data
object
required