Skip to main content
GET
/
conversations
Get Conversation Messages
curl --request GET \
  --url https://api.flowiq.live/conversations \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "messages": [
    {
      "message": "Hello! How can I help you today?",
      "sender_type": "bot-whatsapp",
      "created_at": "2025-01-10T14:30:00Z",
      "message_status": "read",
      "media_type": null,
      "media_url": null,
      "assignee": null,
      "voice_note_transcription": null,
      "reactions": []
    }
  ],
  "pagination": {
    "currentPage": 1,
    "totalPages": 5,
    "totalMessages": 48,
    "messagesPerPage": 10,
    "hasNextPage": true,
    "hasPrevPage": false
  },
  "count": 1,
  "searchTerms": null,
  "filtered": false,
  "stored": false
}
This single endpoint handles multiple operations via the action query parameter.

Available Actions

ActionDescriptionRequired Parameters
conversation-messagesGet messages from a conversation (default)tenantId, whatsappNumber or contactId
contactsList all contactstenantId
find-by-phoneFind a contact by phone numbertenantId, whatsappNumber

Action: Get Conversation Messages

Fetch messages from a specific conversation. This is the default action.

Basic Usage

curl -X GET "https://api.flowiq.live/conversations?tenantId=YOUR_TENANT_ID&whatsappNumber=27123456789" \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN"

Paginated Results

curl -X GET "https://api.flowiq.live/conversations?tenantId=YOUR_TENANT_ID&whatsappNumber=27123456789&page=2&limit=20" \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN"

Search Messages by Text

curl -X GET "https://api.flowiq.live/conversations?tenantId=YOUR_TENANT_ID&whatsappNumber=27123456789&query=urgent,help" \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN"

Search by Shopify Order ID

curl -X GET "https://api.flowiq.live/conversations?tenantId=YOUR_TENANT_ID&whatsappNumber=27123456789&orderId=1234567890" \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN"

Action: List Contacts

Retrieve a paginated list of all contacts for your organization.

Get All Contacts

curl -X GET "https://api.flowiq.live/conversations?action=contacts&tenantId=YOUR_TENANT_ID" \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN"

Paginated Contacts

curl -X GET "https://api.flowiq.live/conversations?action=contacts&tenantId=YOUR_TENANT_ID&page=2&limit=25" \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN"

Search Contacts by Name/Phone

curl -X GET "https://api.flowiq.live/conversations?action=contacts&tenantId=YOUR_TENANT_ID&search=john" \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN"

Action: Find Contact by Phone

Look up a specific contact using their phone number.
curl -X GET "https://api.flowiq.live/conversations?action=find-by-phone&tenantId=YOUR_TENANT_ID&whatsappNumber=27123456789" \
  -H "Authorization: Bearer YOUR_BEARER_TOKEN"
Phone numbers are automatically normalized, so +27 12 345 6789 and 27123456789 will find the same contact.

Reference Tables

Message Sender Types

Sender TypeDescription
user-whatsappMessage sent by the customer via WhatsApp
bot-whatsappAutomated bot response
human-whatsappMessage sent by a human agent
systemSystem-generated message

Message Status

StatusDescription
sentMessage has been sent
deliveredMessage has been delivered to recipient
readMessage has been read by recipient
failedMessage delivery failed

Media Types

Media TypeDescription
imageImage attachment (JPEG, PNG, etc.)
videoVideo attachment
audioAudio message or voice note
documentDocument (PDF, DOCX, etc.)
interactiveInteractive message (buttons, lists)

Bot Status Values

StatusDescription
activeBot is actively responding to this contact
pausedBot responses are paused (human takeover)
nullNo bot configured for this contact

Authorizations

Authorization
string
header
required

Bearer token for authentication. Format: Bearer YOUR_BEARER_TOKEN

Query Parameters

tenantId
string
required

Organization tenant identifier

action
enum<string>
default:conversation-messages

API action to perform

Available options:
conversation-messages,
contacts,
find-by-phone
whatsappNumber
string

WhatsApp phone number (required for message and find-by-phone actions)

contactId
string<uuid>

Contact UUID (alternative to whatsappNumber)

limit
integer
default:10

Number of items per page (messages: default 10, contacts: default 50)

Required range: 1 <= x <= 100
page
integer
default:1

Page number for pagination

Required range: x >= 1
query
string

Search terms (comma-separated for multiple terms)

orderId
string

Shopify order ID to search for (fetches order number from Shopify)

ascending
boolean
default:false

Message order (false = newest first, true = oldest first)

Search contacts by name/phone (for contacts action)

Response

Successful response

success
boolean
required

Whether the request was successful

Example:

true

messages
object[]
required

Array of conversation messages

count
integer
required

Number of messages returned in this response

Required range: x >= 0
Example:

10

filtered
boolean
required

Whether search filtering was applied

Example:

true

pagination
object
searchTerms
string[] | null

Search terms that were applied (if any)

Example:
["#4275", "urgent"]
stored
boolean

Whether messages were stored in contact record

Example:

false