Export messages for a specific account with cursor-based pagination support. Response includes messageType (string), source, and subType fields. The channel parameter is optional - if not provided, all non-email message types will be returned including activity messages (opportunity updates, appointments, etc.).

http
GET https://services.leadconnectorhq.com/conversations/messages/export

Authorization

NameTypeRequiredExampleDescription
AuthorizationstringYesBearer token generated from the Leadway portal. See Authentication.
VersionstringYes2021-07-28API version.

Query parameters

NameTypeRequiredExampleDescription
locationIdstringYesAccount ID to filter messages by
limitnumberNoNumber of messages to return per page
cursorstringNoeyJwaXRJZCI6ImFiYy0xMjMiLCJsYXN0U29ydCI6WzE2NDY4NjQ0MDBdLCJsYXN0SWQiOiIxMjMifQ==Cursor for pagination. Pass the nextCursor from previous response to get next page.
sortBystringNoField to sort by
sortOrderstringNoSort order
conversationIdstringNoFilter messages by conversation ID
contactIdstringNoFilter messages by contact ID
channelstringNoFilter by message channel. If not provided, all non-email message types will be returned including activity messages (opportunity updates, appointments, etc.)
startDatestringNoStart date to filter messages by
endDatestringNoEnd date to filter messages by

Responses

200 - List of messages for the account with pagination details.
  • messages (object[], required): Array of messages

    • id (string, required): Example: ve9EPM428h8vShlRW1KT

    • type (number, required): Example: 1

    • messageType (string, required): Type of the message as a string Possible values: 'TYPE_CALL', 'TYPE_SMS', 'TYPE_RCS', 'TYPE_EMAIL', 'TYPE_SMS_REVIEW_REQUEST', 'TYPE_WEBCHAT', 'TYPE_SMS_NO_SHOW_REQUEST', 'TYPE_CAMPAIGN_SMS', 'TYPE_CAMPAIGN_CALL', 'TYPE_CAMPAIGN_EMAIL', 'TYPE_CAMPAIGN_VOICEMAIL', 'TYPE_FACEBOOK', 'TYPE_CAMPAIGN_FACEBOOK', 'TYPE_CAMPAIGN_MANUAL_CALL', 'TYPE_CAMPAIGN_MANUAL_SMS', 'TYPE_GMB', 'TYPE_CAMPAIGN_GMB', 'TYPE_REVIEW', 'TYPE_INSTAGRAM', 'TYPE_WHATSAPP', 'TYPE_CUSTOM_SMS', 'TYPE_CUSTOM_EMAIL', 'TYPE_CUSTOM_PROVIDER_SMS', 'TYPE_CUSTOM_PROVIDER_EMAIL', 'TYPE_IVR_CALL', 'TYPE_ACTIVITY_CONTACT', 'TYPE_ACTIVITY_INVOICE', 'TYPE_ACTIVITY_PAYMENT', 'TYPE_ACTIVITY_OPPORTUNITY', 'TYPE_LIVE_CHAT', 'TYPE_LIVE_CHAT_INFO_MESSAGE', 'TYPE_ACTIVITY_APPOINTMENT', 'TYPE_FACEBOOK_COMMENT', 'TYPE_INSTAGRAM_COMMENT', 'TYPE_CUSTOM_CALL', 'TYPE_INTERNAL_COMMENT', 'TYPE_ACTIVITY_EMPLOYEE_ACTION_LOG', 'TYPE_TIKTOK', 'TYPE_TIKTOK_COMMENT', 'TYPE_ACTIVITY_WHATSAPP', 'TYPE_FORM_SUBMISSION', 'TYPE_SMS_REACTION' Example: SMS

    • locationId (string, required): Example: ve9EPM428h8vShlRW1KT

    • contactId (string, required): Example: ve9EPM428h8vShlRW1KT

    • conversationId (string, required): Example: ve9EPM428h8vShlRW1KT

    • dateAdded (string, required): Example: 2024-03-27T18:13:49.000Z

    • body (string): Example: Hi there

    • direction (string, required): Possible values: 'inbound', 'outbound'

    • status (string): Possible values: 'connected', 'delivered', 'failed', 'opened', 'pending', 'read', 'scheduled', 'sent', 'undelivered', 'clicked', 'opt_out', 'queued'

    • contentType (string, required): Example: text/plain

    • attachments (string[]): An array of attachment URLs. Attachments will be empty for Call and Voicemails, type 1 and 10. Please use get call recording API to fetch call recording and voicemails.

    • meta (object)

      • callDuration (string): Call duration in seconds Example: 120

      • callStatus (string): Call status - can be pending, completed, answered, busy, no-answer, failed, canceled, or voicemail Possible values: 'pending', 'completed', 'answered', 'busy', 'no-answer', 'failed', 'canceled', 'voicemail' Example: completed

      • email (object): meta will contain email, for message type 3 (email). messageIds is list of all email message ids under the message thread

    • source (string): Message source Possible values: 'workflow', 'bulk_actions', 'campaign', 'api', 'app'

    • userId (string): User Id Example: ve9EPM428kjkvShlRW1KT

    • conversationProviderId (string): Conversation Provider Id Example: ve9EPM428kjkvShlRW1KT

    • chatWidgetId (string): Chat Widget Id Example: 67b0cc8cf14b19d85ace7s35

  • nextCursor (string): Cursor for fetching next page. Null if no more results. Example: eyJwaXRJZCI6ImFiYy0xMjMiLCJsYXN0U29ydCI6WzE2NDY4NjQ0MDBdLCJsYXN0SWQiOiIxMjMifQ==

  • total (number, required): Total number of messages matching the query Example: 1234

json
{
  "messages": [
    {
      "id": "ve9EPM428h8vShlRW1KT",
      "type": 1,
      "messageType": "SMS",
      "locationId": "ve9EPM428h8vShlRW1KT",
      "contactId": "ve9EPM428h8vShlRW1KT",
      "conversationId": "ve9EPM428h8vShlRW1KT",
      "dateAdded": "2024-03-27T18:13:49.000Z",
      "body": "Hi there",
      "direction": "inbound",
      "status": "connected",
      "contentType": "text/plain",
      "attachments": [
        "string"
      ],
      "meta": {
        "callDuration": 120,
        "callStatus": "completed",
        "email": {
          "email": {
            "messageIds": [
              "ve9EPM428kjkvShlRW1KT",
              "ve9EPs1028kjkvShlRW1KT"
            ]
          }
        }
      },
      "source": "workflow",
      "userId": "ve9EPM428kjkvShlRW1KT",
      "conversationProviderId": "ve9EPM428kjkvShlRW1KT",
      "chatWidgetId": "67b0cc8cf14b19d85ace7s35"
    }
  ],
  "nextCursor": "eyJwaXRJZCI6ImFiYy0xMjMiLCJsYXN0U29ydCI6WzE2NDY4NjQ0MDBdLCJsYXN0SWQiOiIxMjMifQ==",
  "total": 1234
}
400 - Bad Request
json
{}
401 - Unauthorized
json
{}

Example

curl -X GET 'https://services.leadconnectorhq.com/conversations/messages/export' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28'

Last updated October 26, 2026

Was this page helpful?