> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> STT). Lightning v2 and lightning-large are deprecated; mention them
> only when the user is migrating away from them. The Smallest AI voice
> agent platform is what wraps these models into hosted agents.

# Search conversation logs by call IDs

POST https://api.smallest.ai/atoms/v1/conversation/search
Content-Type: application/json

Fetch specific conversation logs by their callIds. This endpoint allows you to retrieve up to 100 specific calls at once.
Only returns calls that belong to agents in your organization (security check enforced).
Unlike the GET /conversation endpoint, this endpoint can also return retry calls (non-root calls).

**Differences from GET /conversation response:** each log item has the same base structure but
the following three fields are **not** included here:
- `dispositionMetrics` — not enriched
- `agentDispositionConfig` — not enriched
- `versionNumber` — not enriched


Reference: https://docs.smallest.ai/voice-agents/api-reference/calls/search

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: atoms
  version: 1.0.0
paths:
  /conversation/search:
    post:
      operationId: search
      summary: Search conversation logs by call IDs
      description: >
        Fetch specific conversation logs by their callIds. This endpoint allows
        you to retrieve up to 100 specific calls at once.

        Only returns calls that belong to agents in your organization (security
        check enforced).

        Unlike the GET /conversation endpoint, this endpoint can also return
        retry calls (non-root calls).


        **Differences from GET /conversation response:** each log item has the
        same base structure but

        the following three fields are **not** included here:

        - `dispositionMetrics` — not enriched

        - `agentDispositionConfig` — not enriched

        - `versionNumber` — not enriched
      tags:
        - calls
      parameters:
        - name: Authorization
          in: header
          description: >-
            API key from the console ApiKey collection, sent as Bearer token.
            Also accepts session cookies for browser-based auth.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/calls_search_Response_200'
        '400':
          description: Invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestErrorResponse'
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                callIds:
                  type: array
                  items:
                    type: string
                  description: >
                    Array of callIds to fetch. Format:
                    `CALL-{13-digit-timestamp}-{6-char-hex}`

                    (e.g. `CALL-1737000000000-abc123`). Minimum 1, maximum 100
                    per request.
              required:
                - callIds
servers:
  - url: https://api.smallest.ai/atoms/v1
    description: Production server
components:
  schemas:
    ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsStatus:
      type: string
      enum:
        - pending
        - in_progress
        - in_queue
        - processing
        - active
        - completed
        - failed
        - no_answer
        - cancelled
      description: The status of the call
      title: >-
        ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsStatus
    ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsType:
      type: string
      enum:
        - telephony_inbound
        - telephony_outbound
        - webcall
      description: The type of call
      title: >-
        ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsType
    ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalyticsDispositionMetricsItems:
      type: object
      properties:
        identifier:
          type: string
        value:
          type: string
        confidence:
          type: number
          format: double
      title: >-
        ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalyticsDispositionMetricsItems
    ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalytics:
      type: object
      properties:
        summary:
          type: string
        dispositionMetrics:
          type: array
          items:
            $ref: >-
              #/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalyticsDispositionMetricsItems
      description: Post-call analytics results evaluated against the call transcript
      title: >-
        ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalytics
    ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetricsTransitionsItems:
      type: object
      properties:
        turn:
          type: number
          format: double
        user_end:
          type: number
          format: double
        bot_start:
          type: number
          format: double
        latency:
          type: number
          format: double
      title: >-
        ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetricsTransitionsItems
    ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetrics:
      type: object
      properties:
        avgLatency:
          type: number
          format: double
        medianLatency:
          type: number
          format: double
        minLatency:
          type: number
          format: double
        maxLatency:
          type: number
          format: double
        turns:
          type: number
          format: double
        latencies:
          type: array
          items:
            type: number
            format: double
        transitions:
          type: array
          items:
            $ref: >-
              #/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetricsTransitionsItems
        processedAt:
          type: string
          format: date-time
      description: Per-turn latency statistics for the call
      title: >-
        ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetrics
    ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItems:
      type: object
      properties:
        _id:
          type: string
          description: The database ID of the call log
        callId:
          type: string
          description: The unique call identifier
        status:
          $ref: >-
            #/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsStatus
          description: The status of the call
        duration:
          type: number
          format: double
          description: The duration of the call in seconds
        from:
          type: string
          description: The phone number the call was made from
        to:
          type: string
          description: The phone number the call was made to
        type:
          $ref: >-
            #/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsType
          description: The type of call
        agentId:
          type: string
          description: The ID of the agent that handled the call
        recordingUrl:
          type: string
          description: URL to the call recording (if available)
        recordingDualUrl:
          type: string
          description: URL to the dual-channel call recording (if available)
        disconnectionReason:
          type: string
          description: The reason the call was disconnected
        retryCount:
          type: integer
          description: Number of retry attempts for this call
        createdAt:
          type: string
          format: date-time
          description: When the call was created
        callFailureReason:
          type: string
          description: Reason the call failed, if applicable
        callCost:
          type: number
          format: double
          description: Discounted total cost of the call
        versionId:
          type: string
          description: ID of the agent version that handled this call
        isTest:
          type: boolean
          description: Whether this was a test call
        retryCallId:
          type: string
          description: ID of the retry call if this call was retried
        retryAttemptNumber:
          type: number
          format: double
          description: Which retry attempt this was (0 = initial)
        postCallAnalytics:
          $ref: >-
            #/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsPostCallAnalytics
          description: Post-call analytics results evaluated against the call transcript
        turnLatencyMetrics:
          $ref: >-
            #/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItemsTurnLatencyMetrics
          description: Per-turn latency statistics for the call
      title: ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItems
    ConversationSearchPostResponsesContentApplicationJsonSchemaData:
      type: object
      properties:
        logs:
          type: array
          items:
            $ref: >-
              #/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaDataLogsItems
        total:
          type: integer
          description: Number of logs returned
        requestedCount:
          type: integer
          description: Number of callIds requested
      title: ConversationSearchPostResponsesContentApplicationJsonSchemaData
    calls_search_Response_200:
      type: object
      properties:
        status:
          type: boolean
        data:
          $ref: >-
            #/components/schemas/ConversationSearchPostResponsesContentApplicationJsonSchemaData
      title: calls_search_Response_200
    BadRequestErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: BadRequestErrorResponse
    UnauthorizedErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: UnauthorizedErrorResponse
    InternalServerErrorResponse:
      type: object
      properties:
        status:
          type: boolean
        errors:
          type: array
          items:
            type: string
      title: InternalServerErrorResponse
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key from the console ApiKey collection, sent as Bearer token. Also
        accepts session cookies for browser-based auth.

```

## Examples



**Request**

```json
{
  "callIds": [
    "CALL-1737000000000-abc123",
    "CALL-1737000000001-def456"
  ]
}
```

**Response**

```json
{
  "status": true,
  "data": {
    "logs": [
      {
        "_id": "60d0fe4f5311236168a109ca",
        "callId": "CALL-1737000000000-abc123",
        "status": "completed",
        "duration": 180,
        "from": "+15551234567",
        "to": "+15559876543",
        "type": "telephony_outbound",
        "agentId": "60d0fe4f5311236168a109cb",
        "recordingUrl": "https://recordings.example.com/call-abc123.mp3",
        "recordingDualUrl": "https://recordings.example.com/call-abc123-dual.mp3",
        "disconnectionReason": "caller hung up",
        "retryCount": 0,
        "createdAt": "2024-04-10T14:22:00Z",
        "callFailureReason": "",
        "callCost": 2.75,
        "versionId": "v1.3.5",
        "isTest": false,
        "retryCallId": "",
        "retryAttemptNumber": 0,
        "postCallAnalytics": {
          "summary": "Call completed successfully with positive customer feedback.",
          "dispositionMetrics": []
        },
        "turnLatencyMetrics": {
          "avgLatency": 1.2,
          "medianLatency": 1.1,
          "minLatency": 0.9,
          "maxLatency": 1.5,
          "turns": 5,
          "latencies": [
            1,
            1.2,
            1.1,
            1.3,
            1.4
          ],
          "transitions": [
            {
              "turn": 1,
              "user_end": 2,
              "bot_start": 3,
              "latency": 1
            },
            {
              "turn": 2,
              "user_end": 4,
              "bot_start": 5,
              "latency": 1.2
            }
          ],
          "processedAt": "2024-04-10T15:00:00Z"
        }
      }
    ],
    "total": 1,
    "requestedCount": 2
  }
}
```

**SDK Code**

```typescript
import { SmallestAIClient } from "smallestai";

async function main() {
    const client = new SmallestAIClient({
        token: "YOUR_TOKEN_HERE",
    });
    await client.atoms.logs.searchConversationLogsByCallIDs({
        callIds: [
            "CALL-1737000000000-abc123",
            "CALL-1737000000001-def456",
        ],
    });
}
main();

```

```python
from smallestai import SmallestAI

client = SmallestAI(
    token="YOUR_TOKEN_HERE",
)

client.atoms.logs.search_conversation_logs_by_call_i_ds(
    call_ids=[
        "CALL-1737000000000-abc123",
        "CALL-1737000000001-def456"
    ],
)

```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.smallest.ai/atoms/v1/conversation/search"

	payload := strings.NewReader("{\n  \"callIds\": [\n    \"CALL-1737000000000-abc123\",\n    \"CALL-1737000000001-def456\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.smallest.ai/atoms/v1/conversation/search")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"callIds\": [\n    \"CALL-1737000000000-abc123\",\n    \"CALL-1737000000001-def456\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.smallest.ai/atoms/v1/conversation/search")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"callIds\": [\n    \"CALL-1737000000000-abc123\",\n    \"CALL-1737000000001-def456\"\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.smallest.ai/atoms/v1/conversation/search', [
  'body' => '{
  "callIds": [
    "CALL-1737000000000-abc123",
    "CALL-1737000000001-def456"
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.smallest.ai/atoms/v1/conversation/search");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"callIds\": [\n    \"CALL-1737000000000-abc123\",\n    \"CALL-1737000000001-def456\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["callIds": ["CALL-1737000000000-abc123", "CALL-1737000000001-def456"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.smallest.ai/atoms/v1/conversation/search")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```