Get conversations
Retrieve a paginated list of conversation sessions with optional filtering.
POST /api/v1/business/{businessId}/conversations
Path parameters
The unique identifier for your business
Request body
Number of conversations to return per page (1-100)
Cursor for the next page of results
Cursor for the previous page of results
Optional filters to narrow results
ISO 8601 timestamp - filter conversations started after this date
ISO 8601 timestamp - filter conversations started before this date
Array of session states to filter by (e.g., Active, Completed, Failed)
Array of initiation types (e.g., Outbound, Inbound, Web)
Array of end types to filter by
Response
Indicates whether the request was successful
Paginated conversation results
Array of conversation objects
Cursor to fetch the next page (null if no more results)
Cursor to fetch the previous page (null if on first page)
Total number of conversations matching the filter
Example request
curl -X POST https://api.iqra.ai/api/v1/business/12345/conversations \
-H "Authorization: Token YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Limit": 20,
"Filter": {
"StartStartedDate": "2024-01-01T00:00:00Z",
"EndStartedDate": "2024-01-31T23:59:59Z",
"SessionStates": ["Completed"]
}
}'
Get conversation
Retrieve a specific conversation with full transcript, messages, and metadata.
GET /api/v1/business/{businessId}/conversations/{sessionId}
Path parameters
The unique identifier for your business
The unique session identifier for the conversation
Response
Indicates whether the request was successful
Conversation detailsShow Conversation properties
Unique session identifier
Queue ID if this was an outbound call
Current conversation state (Active, Completed, Failed, etc.)
ISO 8601 timestamp when conversation started
ISO 8601 timestamp when conversation ended (null if active)
How the conversation ended (Normal, Hangup, Error, etc.)
Array of clients (callers) in the conversation
Type of client (Phone, Web, etc.)
When the client left (null if still connected)
Pre-signed URL to client’s audio recording
Array of AI agents in the conversation
When the agent left (null if still active)
Pre-signed URL to agent’s audio recording
Complete conversation transcript
ID of the sender (client or agent)
Sender role (User, Agent, System)
When the message was sent
Conversation event logs
Log level (Info, Warning, Error)
Example request
curl https://api.iqra.ai/api/v1/business/12345/conversations/session_abc123 \
-H "Authorization: Token YOUR_API_KEY"
Example response
{
"Success": true,
"Data": {
"Id": "session_abc123",
"QueueId": "queue_xyz789",
"Status": "Completed",
"StartTime": "2024-01-15T14:30:00Z",
"EndTime": "2024-01-15T14:35:30Z",
"EndType": "Normal",
"Clients": [
{
"ClientId": "client_123",
"ClientType": "Phone",
"JoinedAt": "2024-01-15T14:30:00Z",
"LeftAt": "2024-01-15T14:35:30Z",
"LeaveReason": "Hangup",
"AudioUrl": "https://s3.amazonaws.com/recordings/client_123.mp3"
}
],
"Agents": [
{
"AgentId": "agent_xyz",
"AgentType": "AI",
"JoinedAt": "2024-01-15T14:30:02Z",
"LeftAt": "2024-01-15T14:35:30Z",
"AudioUrl": "https://s3.amazonaws.com/recordings/agent_xyz.mp3"
}
],
"Messages": [
{
"SenderId": "agent_xyz",
"Role": "Agent",
"Content": "Hello! Thanks for calling. How can I help you today?",
"Timestamp": "2024-01-15T14:30:02Z"
},
{
"SenderId": "client_123",
"Role": "User",
"Content": "I'd like to know more about your pricing.",
"Timestamp": "2024-01-15T14:30:05Z"
}
],
"Logs": [
{
"Level": "Info",
"Message": "Call connected successfully",
"Timestamp": "2024-01-15T14:30:00Z"
}
]
}
}
Get outbound queue
Retrieve outbound call queue metadata and status. See the full Queue Management documentation for comprehensive queue operations.
GET /api/v1/business/{businessId}/queues/outbound/{queueId}
For detailed information about queue operations, filtering, and pagination, refer to the Queues API reference.
Permissions required
These endpoints require:
- Valid API key with access to the specified business
Conversations.ConversationPermissions module permission with Full or Retrieving access
- User and business must not be disabled
- Business must have editing enabled
Notes
- Audio URLs are pre-signed and expire after a period of time
- Conversations are retained according to your data retention policy
- Message timestamps are in UTC
- Active conversations may not have complete message history until they’re finished
- Use pagination cursors for efficient data retrieval of large result sets