πŸ“Š Analytics

Use the Analytics End Points to retrieve performance and engagement data such as contact lists, pending responses, and agent response times. Useful for building dashboards or improving support workflows.

πŸ”½ GET /api/public/analytics/contacts – Get Contacts Info

Retrieves contact information filtered by channel and ordered by field.

Click to expand full details

πŸ”Ή URL

GET /api/public/analytics/contacts

πŸ”Ή Query Parameters

NameTypeRequiredDescription
channelstringβœ…The channel to retrieve contacts from (e.g., whatsapp)
orderBystringβœ…Field to sort by (contact_created_at)
pagenumberβœ…Page number to retrieve

πŸ”Ή Headers

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

πŸ”Ή Example Request

curl --request GET \
  'https://iris-backend-production.up.railway.app/api/public/analytics/contacts?channel=whatsapp&orderBy=contact_created_at&page=1' \
  --header 'x-api-key: YOUR_API_KEY'


πŸ”½ GET /api/public/analytics/contacts/pending-responses – Get Contacts with Pending Responses

Returns contacts with unanswered messages, sorted by waiting time (descending).

Click to expand full details

πŸ”Ή URL

GET /api/public/analytics/contacts/pending-responses

πŸ”Ή Query Parameters

NameTypeRequiredDescription
channelstringβœ…Channel (e.g., whatsapp)
pipelineIdstringβœ…ID of the pipeline to filter by
pagenumberβœ…Page number

πŸ”Ή Headers

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

πŸ”Ή Example Request

curl --request GET \
  'https://iris-backend-production.up.railway.app/api/public/analytics/contacts/pending-responses?channel=whatsapp&pipelineId=pipeline_123&page=1' \
  --header 'x-api-key: YOUR_API_KEY'


πŸ”½ GET /api/public/analytics/agents/response-time – Get Average Response Time by Agent

Returns average response times (in seconds) for each agent in a specified channel.

Click to expand full details

πŸ”Ή URL

GET /api/public/analytics/agents/response-time

πŸ”Ή Query Parameters

NameTypeRequiredDescription
channelstringβœ…Channel to filter (e.g., whatsapp)
pagenumberβœ…Page number

πŸ”Ή Headers

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

πŸ”Ή Example Request

curl --request GET \
  'https://iris-backend-production.up.railway.app/api/public/analytics/agents/response-time?channel=whatsapp&page=1' \
  --header 'x-api-key: YOUR_API_KEY'