Skip to main content

Get a dialogue's messages

Goal: read a conversation.

# 1) Find the dialogue (filter by lead, contact, agent, or product)
curl -s "https://api.sance.ai/v1/dialogues/?lead_id=1001" \
-H "Authorization: Bearer $TOKEN"

# 2) List its messages, paginated
curl -s "https://api.sance.ai/v1/messages/?dialogue_id=9001&limit=100" \
-H "Authorization: Bearer $TOKEN"

Each message carries side (bot/user), a derived status (read, delivered, sent-confirmed, failed, cancelled), timestamps, and — if files are attached — source_file_ids and file_caption. The GET /v1/messages/ list requires at least one of product_id, dialogue_id, or contact_id, and can also filter by side and status.

See: GET /v1/dialogues/, GET /v1/messages/, GET /v1/dialogues/{dialogue_id}/lead.