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

# Response Returns as Bad Request

If you receive HTML as a response of "Bad Request" instead of JSON, it is possible the POST body parameter is not valid JSON.

For example, if you send this invalid JSON:

```javascript theme={"system"}
{
    "post": "A "great" post"
    "platforms: ["twitter"]
}
```

A response of "Bad Request" will be returned. The code above has three issues: a missing comma on `post`, the post text has a double set of " quotes without escaping, and a missing end quote on `platform`. The valid JSON should be:

```javascript theme={"system"}
{
    "post": "A \"great\" post",
    "platforms": ["twitter"]
}
```

You can test your JSON by POSTing to the following URL to validate your JSON. Be sure to set the Content-Type to `text/plain`.

We recommend trying the call in [Postman](/testing/postman), which can help correct JSON formatting. Please see the next section for more information.

## Validate JSON

You can validate your JSON by using either an online linter, such as [https://jsonlint.com/](https://jsonlint.com/) or using [Postman](/testing/postman).

You may also use our `/validate/json` endpoint:

<Card title="validate" icon="link" href="/apis/validate/overview" horizontal />
