Skip to main content
GET
/
get_contact_conversation_messages
Get Messages for Contact
curl --request GET \
  --url https://vevdoh3hve.execute-api.us-east-1.amazonaws.com/prod/get_contact_conversation_messages \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "data": {
      "contact": {
        "contact_id": "<string>",
        "user_email_id": "<string>",
        "first_name": "<string>",
        "last_name": "<string>",
        "phone_number": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "last_interacted_at": "2023-11-07T05:31:56Z",
        "contact_queries": 123,
        "is_blacklisted": true,
        "is_frozen": true,
        "frozen_until": "2023-11-07T05:31:56Z"
      },
      "conversations": [
        {
          "conversation_id": "<string>",
          "conversation_status": "<string>",
          "conversation_type": "<string>",
          "assigned_to": "<string>",
          "chatbot_id": "<string>",
          "messages": [
            {
              "message_id": "<string>",
              "content": "<string>",
              "role": "<string>",
              "created_at": "2023-11-07T05:31:56Z",
              "message_order": 123,
              "wa_messages": [
                {
                  "status": "<string>",
                  "created_at": "2023-11-07T05:31:56Z",
                  "data": {}
                }
              ],
              "instagram_messages": [
                "<unknown>"
              ],
              "messenger_messages": [
                "<unknown>"
              ]
            }
          ]
        }
      ]
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.chatzy.ai/llms.txt

Use this file to discover all available pages before exploring further.

Returns all conversations and messages for a given contact_id.

Authorizations

Authorization
string
header
required

Use the idToken retrieved from /get_id_token as the Bearer token.

Query Parameters

contact_id
string
required

The unique ID of the contact to fetch messages for.

Example:

"096662f6-5acc-4699-923c-f7326936b39f"

channel
enum<string>

Filter messages by communication channel.

Available options:
whatsapp,
instagram,
messenger,
website
Example:

"whatsapp"

limit
integer
default:50

Maximum number of messages to return.

Required range: 1 <= x <= 100
Example:

50

offset
integer
default:0

Number of messages to skip before starting to collect the result set.

Required range: x >= 0
Example:

0

grouped_conversations
boolean
default:true

Whether to group messages by conversation, when set to false, the response will contain a flat list of messages.

Example:

true

Response

200 - application/json

Contact with all conversations and messages.

data
object