# searchMyChats

Search the key owner's own Ask Goliath chats by words or meaning ("refin" finds the refinance chat, "exact phrases", -excluded words), archived ones included: best match first, each chat with the matching passage (`snippet`). Open one with readMyChat.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "searchMyChats", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: yes
- Result cap: `limit` is clamped to 50, without an error

## Variables

- `query`: `String!` (required)
- `limit`: `Int` (default `20`)

## Response (data, an example)

```json
{
  "agentChatQuery": {
    "searchMyChats": [
      {
        "snippet": "…",
        "chat": {
          "id": "<ID>",
          "title": "…",
          "lastActivityAt": "2026-01-01T00:00:00.000Z",
          "archived": true
        }
      }
    ]
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "searchMyChats",
    "variables": {
      "query": "<String>"
    }
  }'
```
