---
title: "Run a natural-language AI search. Returns the assistant reply plus the first 25 matching leads or companies when a search was produced."
method: POST
path: "/v1/leads/ai-chat"
tags: ["enrichment"]
---

# Run a natural-language AI search. Returns the assistant reply plus the first 25 matching leads or companies when a search was produced.

`POST /v1/leads/ai-chat`

## Request

- Base URL: `https://developer.saleshandy.com` (the document declares no server; this is the origin it was published from)
- URL: `https://developer.saleshandy.com/v1/leads/ai-chat`
- Auth: API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/saleshandy/apis/develop-with-saleshandy/docs/v1/leads/ai-chat/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- AiChatDto
  - `query` string, required: Natural-language query describing the leads or companies to find
  - `conversationId` string: Existing conversation id to continue a previous AI chat session
  - `limit` number: Maximum number of results to return (1-200). Defaults to 25. Larger values are fetched by paginating the underlying search.

## Response `200`

AI chat processed successfully

- object
  - `message` string
  - `payload` object
    - `conversationId` string
    - `type` 'people' | 'company', nullable
    - `agentMessage` string
    - `resultUrl` string, nullable
    - `results` object[]

## Other responses

- `400`: 4000: Failed to process AI chat request<br><br>

---

[API](https://skmtc.dev/saleshandy/apis/develop-with-saleshandy.md) - [All operations](https://skmtc.dev/saleshandy/apis/develop-with-saleshandy/llms.txt) - [OpenAPI document](https://skmtc.dev/saleshandy/apis/develop-with-saleshandy/revisions/e7a29c931aa7?raw)
