Skip to main content
MessagesVersion: v3

Export messages by location ID

GET/conversations/messages/export

Export messages for a specific location with cursor-based pagination support.

Channel Filtering Behavior:

  • When channel is omitted: Returns all non-email message types, including messages that don't belong to any specific channel.
  • When channel=Email: Returns email messages only.
  • When channel is specified (SMS, Call, WhatsApp, etc.): Returns messages for that specific channel.

Limitations:

  • Group Chat and SMS Review Request message types are not supported.
  • Activity messages (opportunity updates, appointments, etc.) are not included in the export. Use GET /conversations/{conversationId}/messages (Get messages by conversation id) to fetch them.
  • Cursor validity is 2 minutes from the last request made.

Authorizations

Authorizationstringheaderrequired

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

Scope:conversations/message.readonly
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

API Version

Available optionsv3

Query Parameters

locationIdstringrequired

Location ID to filter messages by

channelstring

Filter by message channel. Optional - when not provided, all non-email message types will be returned, except activity messages (opportunity updates, appointments, etc.), which are not included in the export. To fetch email messages, you must explicitly set channel=Email.

Available optionsCallSMSEmailWhatsAppInstagramFacebook
limitnumber

Number of messages to return per page

Possible values: >= 10 and <= 1000

Default:100
cursorstring

Cursor for pagination. Pass the nextCursor from previous response to get next page.

Example:a748514c-f49e-4fa8-9954-b53afc78d81d
sortBystring

Field to sort by

Available optionscreatedAtupdatedAt
sortOrderstring

Sort order

Available optionsascdesc
conversationIdstring

Filter messages by conversation ID

contactIdstring

Filter messages by contact ID

startDatestring

Start date to filter messages by

endDatestring

End date to filter messages by

Response

List of messages for the location with pagination details.

messagesobject[]required

Array of messages

nextCursorstring

Cursor for fetching next page. Null if no more results.

Example:a748514c-f49e-4fa8-9954-b53afc78d81d
totalnumberrequired

Total number of messages matching the query

Example:1234