# Validate character count

Validates a character count without changing anything.

```http
POST https://api.pozy.ai/v1/tools/validate/post-length
```

- Area: Publishing / Validate
- Auth: Authorization: Bearer pz_live_...

## Request body

Content type: `application/json`

- `text`, string, required

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/tools/validate/post-length" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Hello from Pozy"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/tools/validate/post-length", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    text: "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/tools/validate/post-length",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "text": "Hello from Pozy",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200

- `text`, string
- `platforms`, map of object: Keys are free-form; each value has these fields
  - `count`, integer
  - `limit`, integer
  - `valid`, boolean

```json
{
  "text": "Hello from Pozy",
  "platforms": {
    "key": {
      "count": 42,
      "limit": 1,
      "valid": true
    }
  }
}
```
