πŸ“¬ Get Messages

Use these endpoints to retrieve historical messages either by contact or grouped by conversation.

πŸ”½ GET /api/public/ai-message/contact/{aiContactId} – Get Messages by Contact

Returns all messages (inbound/outbound) associated with a specific contact.

Click to expand full details

πŸ”Ή URL

GET /api/public/ai-message/contact/{aiContactId}

πŸ”Ή Path Parameters

NameTypeRequiredDescription
aiContactIdstringβœ…The contact’s unique ID

πŸ”Ή Headers

NameTypeRequiredDescription
x-api-keystringβœ…Your API key for authorization

πŸ”Ή Example Request

curl --request GET \
  'https://iris-backend-production.up.railway.app/api/public/ai-message/contact/contact_123' \
  --header 'x-api-key: YOUR_API_KEY'


πŸ”½ GET /api/public/ai-message/contact/{aiContactId}/by-conversation – Get Messages by Conversation

Fetches messages grouped by conversation for a specific contact. Each conversation includes a thread of related messages.

Click to expand full details

πŸ”Ή URL

GET /api/public/ai-message/contact/{aiContactId}/by-conversation

πŸ”Ή Path Parameters

NameTypeRequiredDescription
aiContactIdstringβœ…The contact’s unique ID

πŸ”Ή Headers

NameTypeRequiredDescription
x-api-keystringβœ…Your API key for authorization

πŸ”Ή Example Request

curl --request GET \
  'https://iris-backend-production.up.railway.app/api/public/ai-message/contact/contact_123/by-conversation' \
  --header 'x-api-key: YOUR_API_KEY'