Search conversation histories
Performs semantic vector search across conversation history records.
How it works:
- The query text is embedded into a 1024-dimensional vector using the multilingual-e5-large model.
- The vector is compared against indexed record chunks using semantic similarity search.
- When no region is specified, all regions are queried in parallel (fan-out) and results are merged by score.
- Results are ranked by similarity score (descending) and paginated via
page[number]/page[size].
Authentication: Requires a Telnyx API key via Authorization: Bearer <key>. Results are automatically scoped to the caller’s organization — organization_id is injected from the auth token and cannot be overridden.
Chunking: Records are split into chunks of up to 480 tokens with 64-token overlap at ingestion time. Each search result represents a single chunk, with chunk_index and chunk_total indicating its position within the original record.
Filtering: Use filter[field][operator]=value query parameters to narrow results before vector search.
Top-level filterable fields: user_id, region, record_id, record_created_at, ingested_at, retention
Note: retention is filter-only — it can be used to narrow results but is not returned in the response body.
Metadata fields: any field not in the list above is resolved to data.metadata.<field> (e.g., filter[language]=en → data.metadata.language).
Supported filter operators:
eq— exact match (default when no operator specified)in— match any of comma-separated valuesgte,gt,lte,lt— range comparisons (useful for date filtering)contains— wildcard substring match
Examples:
GET /v2/ai/conversation_histories?q=billing+issue&page[size]=10
GET /v2/ai/conversation_histories?q=setup+guide®ion=USA&min_score=0.5
GET /v2/ai/conversation_histories?q=refund&filter[record_created_at][gte]=2026-01-01T00:00:00Z
GET /v2/ai/conversation_histories?q=outage&filter[region][in]=USA,DEU
GET /v2/ai/conversation_histories?q=hold+time&filter[language]=en
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Natural language search query. The text is embedded into a 1024-dimensional vector and compared against indexed record chunks using semantic similarity.
1"customer called about billing issue"
Restrict search to a specific region. When omitted, all regions are queried in parallel (fan-out) and results are merged by similarity score.
USA, DEU, AUS, UAE "USA"
Page number to return (1-based). Defaults to 1.
x >= 11
Number of results per page. Defaults to 20, maximum 100.
1 <= x <= 10010
Minimum cosine similarity score threshold (0.0 to 1.0). Results below this threshold are excluded.
0 <= x <= 10.5
Filter to records owned by a specific user (exact match).
"user-123"
Filter to chunks belonging to a specific parent record (exact match).
"rec-001"
Filter by the region stored on the record. Comma-separated to match multiple regions (USA, DEU, AUS, UAE). Distinct from the region parameter, which selects which cluster(s) are queried.
"USA,DEU"
Only include records whose original creation time is on or after this ISO 8601 timestamp.
"2026-01-01T00:00:00Z"
Only include records whose original creation time is on or before this ISO 8601 timestamp.
"2026-12-31T23:59:59Z"
Only include records ingested (chunked, embedded, and indexed) on or after this ISO 8601 timestamp.
"2026-01-01T00:00:00Z"
Only include records ingested (chunked, embedded, and indexed) on or before this ISO 8601 timestamp.
"2026-12-31T23:59:59Z"
Filter by retention policy (exact match). Filter-only: not returned in the response body.
Response
Successful search response with ranked conversation history chunks.