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

# Errors

> What the management API answers when a request fails.

The management API answers an error with its HTTP status and `{"error": "<message>"}`:

| Status | When |
| - | - |
| 401 | The key is missing or invalid, or does not have the Management scope (every route but [Get API key info](https://docs.weflayr.com/api/management/get-api-key-info.md) needs it). |
| 404 | The project has no such object. |
| 405 | The route does not take this method. The `Allow` header lists the ones it takes. |
| 422 | The payload is invalid. The answer lists every invalid field, and nothing is written. |

```json theme={null}
{"error": "Invalid request payload.", "detail": [{"field": "limit", "error": "Input should be less than or equal to 1000"}]}
```

A well formed request refused for a reason adds a `code` naming it, and `error` says what to change, e.g. `402` `insufficient_credits`, `409` `slug_taken` or `stale_version`, `400` `unknown_user` or `wrong_project_type`. Each route's page lists the codes it answers.

```json theme={null}
{"error": "No member of your organization has the email alex@acme.com. Ask the person for the email they use in Weflayr, and send it again.", "code": "unknown_user"}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.