> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rydhm.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rydhm.ai/_mcp/server.

# Start a text chat with a published expert

POST https://api.rydhm.ai/v1/public/experts/{slug}/chat
Content-Type: application/json

No key: anyone may call this for a published expert (rate limited per visitor).

Reference: https://docs.rydhm.ai/api-reference/public/start-chat

## Request

### Path parameters

- `slug` (string, required) — The expert’s public link handle.

### Body (application/json)

This endpoint expects an object.

- `variables` (map from string to string, optional)
- `language` (string, optional) — One of the expert’s languages (400 otherwise).

## Response

### 201

OK

- `conversationId` (string, required) — The new conversation.

## Errors

### 429 Too Many Requests Error

Rate limited; wait Retry-After seconds.

- `statusCode` (integer, required)
- `message` (string, required)
- `error` (string, optional) — A stable code such as insufficient_scope, expert_not_allowed, rate_limited, plan_limit, payment_required.
- `code` (string, optional) — The stable code on the refusals that carry it here instead of in `error`: stale_edit (409 on an expert save).
- `requestId` (string, optional) — The X-Request-Id of the call, to quote to support.
- `upgradeHint` (ErrorUpgradeHint, optional) — On 402 payment_required and 403 plan_limit: what fixes it.
- `requiredScopes` (list of string, optional) — On 403 insufficient_scope: what the route needs.
- `missingScopes` (list of string, optional)
- `retryAfterSeconds` (integer, optional) — On 429: how long to wait.

## Types

### ErrorUpgradeHint

On 402 payment_required and 403 plan_limit: what fixes it.

- `action` (enum, optional)
  - Allowed values: `top_up`, `upgrade`, `contact`
- `planCode` (string, optional) — The smallest plan that allows it, when action is upgrade.
- `href` (string, optional) — Where to go in the app.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "conversationId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.rydhm.ai/v1/public/experts/slug/chat"

payload = {}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.rydhm.ai/v1/public/experts/slug/chat';
const options = {method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{}'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```