# Reply to comment

Replies to comment.

```http
POST https://api.pozy.ai/v1/inbox/comments/{postId}
```

- Area: Inbox / Comments
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `postId` (string, required)

## Header parameters

- `Idempotency-Key` (string)

## Request body

Content type: `application/json`

- `accountId`, string, required
- `message`, string, required
- `attachmentUrl`, string (URL)
- `commentId`, string
- `parentCid`, string
- `rootUri`, string
- `rootCid`, string

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/inbox/comments/6108a2cc742cb4e991051e0c" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "accountId": "696e0b682d0a31188e7a2ba9",
  "message": "Hello from Pozy"
}'
```

```ts
import { randomUUID } from "node:crypto";

const res = await fetch("https://api.pozy.ai/v1/inbox/comments/6108a2cc742cb4e991051e0c", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Idempotency-Key": randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    accountId: "696e0b682d0a31188e7a2ba9",
    message: "Hello from Pozy"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.post(
    "https://api.pozy.ai/v1/inbox/comments/6108a2cc742cb4e991051e0c",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "accountId": "696e0b682d0a31188e7a2ba9",
        "message": "Hello from Pozy",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean
- `data`, object
  - `commentId`, string
  - `isReply`, boolean
  - `cid`, string: Can be null

```json
{
  "success": true,
  "data": {
    "commentId": "6cc7605fa43607e4ad43b1d4",
    "isReply": true,
    "cid": "60cc682239f4a5a15c99a784"
  }
}
```
