# Vote on a Reddit post or comment

Votes on a Reddit post or comment.

```http
POST https://api.pozy.ai/v1/accounts/{accountId}/reddit-vote
```

- Area: Accounts & connections / Connect
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `accountId` (string, required)

## Request body

Content type: `application/json`

- `thingId`, string, required
- `direction`, integer, required: One of `1`, `0`, `-1`

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/reddit-vote" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "thingId": "63dc570a72d898e8ce39b2ac",
  "direction": 1
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/reddit-vote", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    thingId: "63dc570a72d898e8ce39b2ac",
    direction: 1
  }),
});
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/accounts/696e0b682d0a31188e7a2ba9/reddit-vote",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "thingId": "63dc570a72d898e8ce39b2ac",
        "direction": 1,
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `success`, boolean

```json
{
  "success": true
}
```
