Get Conversation Logs
curl --request POST \
--url https://api.inya.ai/platform/v1/conversations/logs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pageNo": 1,
"pageSize": 10
}
'import requests
url = "https://api.inya.ai/platform/v1/conversations/logs"
payload = {
"pageNo": 1,
"pageSize": 10
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pageNo: 1, pageSize: 10})
};
fetch('https://api.inya.ai/platform/v1/conversations/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "<string>",
"message": "Conversations retrieved successfully",
"response": {
"pageNo": 123,
"pageSize": 123,
"totalCount": 123,
"totalPages": 123,
"data": [
{
"conversationId": "conv_123",
"userId": "user_123",
"botId": "fb79920229d144608ebf665a10e50275",
"botName": "Support Agent",
"startTime": 123,
"endTime": 123,
"name": "Jane Doe",
"transcript": [
{
"role": "user",
"content": "how much is my due amount",
"timestamp": 1786433699.931499,
"detectedLanguage": "english",
"totalResults": {
"en-IN": "how much is my due amount",
"hi-IN": "हाउ मच इज़ माइ ड्यू अमाउंट"
},
"userInterruptionFlag": false
}
]
}
]
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}Conversations API
Get Conversation Logs
List past calls and find conversationId values for Stats and Audio
POST
/
v1
/
conversations
/
logs
Get Conversation Logs
curl --request POST \
--url https://api.inya.ai/platform/v1/conversations/logs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pageNo": 1,
"pageSize": 10
}
'import requests
url = "https://api.inya.ai/platform/v1/conversations/logs"
payload = {
"pageNo": 1,
"pageSize": 10
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pageNo: 1, pageSize: 10})
};
fetch('https://api.inya.ai/platform/v1/conversations/logs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "<string>",
"message": "Conversations retrieved successfully",
"response": {
"pageNo": 123,
"pageSize": 123,
"totalCount": 123,
"totalPages": 123,
"data": [
{
"conversationId": "conv_123",
"userId": "user_123",
"botId": "fb79920229d144608ebf665a10e50275",
"botName": "Support Agent",
"startTime": 123,
"endTime": 123,
"name": "Jane Doe",
"transcript": [
{
"role": "user",
"content": "how much is my due amount",
"timestamp": 1786433699.931499,
"detectedLanguage": "english",
"totalResults": {
"en-IN": "how much is my due amount",
"hi-IN": "हाउ मच इज़ माइ ड्यू अमाउंट"
},
"userInterruptionFlag": false
}
]
}
]
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}What it does: Returns a paginated list of past calls. Use it to find
Pick
conversationId values, then call Get Conversation Statistics for outcomes and full transcripts.
Need call IDs? → POST /v1/conversations/logs (this page)
Need outcome + transcript? → GET /v1/conversations/{id}/stats
Need the recording? → GET /v1/conversations/{id}/audio
Why POST and not GET? This endpoint searches conversations using filters — date range, call status, search term, pagination — that belong in the request body, not the URL. A GET request cannot carry a JSON filter payload, so we use
POST /v1/conversations/logs with filters in the body and only botId + environment on the query string. Think of it as search conversations with filters, not a simple list fetch.Required Permission
conversations
Minimum working example
Copy this first. Add?environment=development unless your API key has production access.
curl -X POST "https://api.inya.ai/platform/v1/conversations/logs?environment=development" \
-H "x-api-key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"pageNo": 1,
"pageSize": 10
}'
conversationId from response.data[], then call Stats:
curl "https://api.inya.ai/platform/v1/conversations/<conversationId>/stats" \
-H "x-api-key: <your_api_key>"
Logs vs Stats — which one do I need?
| Question | Use Logs | Use Stats |
|---|---|---|
| List all calls from last week | Yes | No |
Get conversationId for one call | Yes | No |
Get overallCallDisposition (PTP, RNR, …) | No | Yes |
| Get full turn-by-turn transcript | Partial / may be empty | Yes — utteranceAnalytics |
| Download MP3 recording | No | No — use Audio |
Parameters
Query string
| Name | Required | Description |
|---|---|---|
environment | Often yes | development, staging, or production. Omitting this may return 403 for some API keys. |
botId | No | Limit results to one agent. |
Request body
| Field | Required | Description |
|---|---|---|
pageNo | Yes | Page number. Start at 1. Sending 0 returns empty data (not an error). |
pageSize | Yes | Results per page. Max recommended: 100. |
searchTerm | No | Search by caller name, keyword, or conversationId. |
filter.startDate | No | ISO 8601 start — e.g. "2026-08-01T00:00:00.000Z". Use with filter.endDate. |
filter.endDate | No | ISO 8601 end. |
filter.callStatus | No | Telephony filter — e.g. "ANSWERED", "NO ANSWER". |
filter.botId | No | Same as query botId; can be set in either place. |
Additional examples
Search by conversation ID
curl -X POST "https://api.inya.ai/platform/v1/conversations/logs?environment=development" \
-H "x-api-key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"searchTerm": "1786433682702486082",
"pageNo": 1,
"pageSize": 10
}'
Filter by agent and date range
curl -X POST "https://api.inya.ai/platform/v1/conversations/logs?botId=fbec81f5c97c4a62b0103e87f53c0d56&environment=development" \
-H "x-api-key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"filter": {
"startDate": "2026-08-01T00:00:00.000Z",
"endDate": "2026-08-11T23:59:59.999Z"
},
"pageNo": 1,
"pageSize": 10
}'
Response
Success (200)
{
"status": "success",
"message": "Conversations retrieved successfully",
"response": {
"pageNo": 1,
"pageSize": 10,
"totalCount": 26,
"totalPages": 3,
"data": [
{
"conversationId": "1786433682702486082",
"botId": "fbec81f5c97c4a62b0103e87f53c0d56",
"botName": "Muthoot-sanity_outbound_",
"startTime": 1786433683.0,
"endTime": 1786433770.0,
"name": "shyam.r@gnani.ai",
"transcript": []
}
]
},
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
What each field means
| Field | What it is |
|---|---|
conversationId | Copy this. Use it in Stats and Audio endpoints. |
botId / botName | Which agent handled the call. |
startTime / endTime | Unix timestamp (seconds) for call start and end. |
name | Caller label or session name from trigger data — not transcript text. |
transcript | Preview of what was said. Often empty or partial in the list view. Always use Stats for the full record. |
Empty results (200)
{
"status": "success",
"message": "Conversations retrieved successfully",
"response": {
"pageNo": 1,
"pageSize": 10,
"totalCount": 0,
"totalPages": 0,
"data": []
}
}
Edge cases
| Scenario | What happens |
|---|---|
pageNo: 0 | HTTP 200, empty data — not an error |
Missing environment | May return 403 |
| No matching calls | totalCount: 0, data: [] |
transcript is empty | Normal — call Get Conversation Statistics for utteranceAnalytics |
| Large date ranges | Set pageSize: 100 and loop pageNo until it exceeds totalPages |
Errors
403 Forbidden{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "User does not have access to conversation logs"
}
Save the
requestId from every response. You will need it if you contact Gnani support to trace a specific request.Authorizations
API key with 'conversations' permission
Query Parameters
Filter logs to a specific agent.
Filter by environment.
Available options:
development, staging, production Body
application/json
Was this page helpful?