# invalid_request

> 400 Invalid request. Something in the request doesn’t fit: a missing or malformed field, a bad id, or a combination the endpoint refuses.

| Status              | Code              | Retry?          |
| ------------------- | ----------------- | --------------- |
| 400 Invalid request | `invalid_request` | After fixing it |

## What it means

Something in the request doesn’t fit: a missing or malformed field, a bad id, or a combination the endpoint refuses. `details` names each field.

## Common causes

- A required field is missing, such as `to` on a send.
- A field has the wrong type or is outside its range, such as `pace_seconds: 2`.
- An id has the wrong prefix for the field, such as a `ct_` id where a `chat_` id goes.
- The phone number can’t be read as a number BlueBot can text.
- The body isn’t valid JSON.

## What to do

Check the fields named in the message and send it again.

## Can I retry it?

Only after you fix what the message names. Until then the same request gets the same answer.

## What the answer looks like

The answer, `400`:

```json
{
  "error": {
    "code": "invalid_request",
    "message": "Send `to` or `chat_id`.",
    "hint": "Check the fields named in the message and send it again.",
    "doc_url": "https://usebluebot.com/docs/errors/invalid_request",
    "details": [
      {
        "field": "text",
        "message": "Too long: at most 2,000 characters."
      }
    ],
    "request_id": "req_1Hq2LxW9cVbN3mKpRtYs0a"
  }
}
```

Branch on `code`, which never changes. `message` and `hint` are written for people and may be reworded. Quote `request_id` when you write to support.

## Related

- [Errors](https://usebluebot.com/docs/errors): the envelope and every code
- [Idempotency](https://usebluebot.com/docs/concepts/idempotency): retrying without sending twice
- [Limits](https://usebluebot.com/docs/limits): every cap and what happens when you reach it
