Skip to main content

Get conversations

Retrieve a paginated list of conversation sessions with optional filtering.
POST /api/v1/business/{businessId}/conversations

Path parameters

businessId
integer
required
The unique identifier for your business

Request body

Limit
integer
default:"10"
Number of conversations to return per page (1-100)
NextCursor
string
Cursor for the next page of results
PreviousCursor
string
Cursor for the previous page of results
Filter
object
Optional filters to narrow results

Response

Success
boolean
Indicates whether the request was successful
Data
object
Paginated conversation results

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

businessId
integer
required
The unique identifier for your business
sessionId
string
required
The unique session identifier for the conversation

Response

Success
boolean
Indicates whether the request was successful
Data
object
Conversation details

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

Build docs developers (and LLMs) love