> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# By user

Send the `x-user-id` header on [`POST /v1/search`](/docs/api-reference/v1/search) and other catalog requests to tie clicks and sales back to a specific user.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST https://api.trychannel3.com/v1/search \
  -H "x-api-key: $CHANNEL3_API_KEY" \
  -H "x-user-id: ABCD" \
  -H "Content-Type: application/json" \
  -d '{"query": "running shoes"}'
```

```typescript theme={"theme":{"light":"github-light","dark":"github-dark"}}
await client.products.search({
  query: "running shoes",
  "x-user-id": "ABCD",
});
```

```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
client.products.search(query="running shoes", user_id="ABCD")
```

Use a stable identifier from your system (UUID, Clerk ID, and so on). Values may contain letters, numbers, and `.` `_` `@` `-`, up to 128 characters.

When a shopper clicks one of those buy URLs, Channel3 records `user_id` with the click. If the click converts to a sale, the same value appears on the transaction.

Pass `user_id` as a query parameter on [clicks](/docs/guides/reporting/clicks.md) and [sales](/docs/guides/reporting/sales.md) to filter the list to one user.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://api.trychannel3.com/v1/reporting/clicks?user_id=ABCD" \
  -H "x-api-key: $CHANNEL3_API_KEY"

curl "https://api.trychannel3.com/v1/reporting/transactions?user_id=ABCD" \
  -H "x-api-key: $CHANNEL3_API_KEY"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.