> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.minikai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.minikai.com/_mcp/server.

# Errors

The API uses standard HTTP status codes. A `2xx` means the request succeeded, a `4xx` means something about the request
needs to change, and a `5xx` means the problem is on our side. Knowing the shape of each response ahead of time means
your integration can handle failures rather than discover them.

## Status codes

| Status | Meaning                         | What to do                                                         |
| ------ | ------------------------------- | ------------------------------------------------------------------ |
| `400`  | Validation failed               | Read the `errors` object and correct the offending fields.         |
| `401`  | Missing or invalid API key      | Check the `Authorization` header and that the key is still active. |
| `404`  | The resource does not exist     | Confirm the id, and that the key is scoped to the right workspace. |
| `409`  | Conflict with the current state | Re-read the resource and retry once the conflict is resolved.      |
| `422`  | Part of a batch failed          | Inspect the per-item result and retry only the failed items.       |

## Validation errors

A `400` returns a problem-details body with an `errors` map keyed by field name:

```json
{
  "title": "One or more validation errors occurred.",
  "status": 400,
  "errors": {
    "miniId": ["The miniId field is required."]
  }
}
```

## Partial batch failures

Batch endpoints such as `POST /api/v1/Records/batch` can succeed for some items and fail for others. When that happens
the response is `422` with a summary of what went through and what did not, so you can retry just the failures:

```json
{
  "successCount": 1,
  "failureCount": 1,
  "successfulIds": { "0": "7b3d9a14-..." },
  "failed": [{ "index": 1, "error": "Mini not found" }]
}
```

Each entry in `failed` carries the `index` of the item in your request, the `item` you submitted, and an `error`
describing why it was rejected.