# API error codes

> Every code with meaning, cause, fix and example response.

Source: https://flow-marketing.org/en/help/api-error-codes · Question: What does this API error code mean?

Every API error comes as `application/problem+json` (RFC 9457) with a stable `code`. This page lists each code with HTTP status, meaning, typical causes, the steps to fix it, whether anything was charged and whether a retry makes sense. The anchor of each entry is the code itself, e.g. #insufficient_balance – that is exactly where `doc_url` in every error response points.

Programs should react to `status` and `code` only, never to the text in `title` or `detail`: texts may change, codes do not. If you contact us, always include the `request_id`.

## Request and input {#gruppe-anfrage}

### `invalid_json` – Invalid JSON (HTTP 400) {#invalid_json}

The request body is not valid JSON. The server did not execute anything.

**Causes:**
- A missing or extra comma, e.g. after the last field.
- Single quotes instead of double quotes.
- The body was encoded twice (a JSON string instead of an object).

**Fix:**
1. Build the body with a JSON library instead of by hand (`JSON.stringify`, `json.dumps`).
2. Check the body with a JSON validator.
3. Send `Content-Type: application/json` and the body again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#invalid_json",
  "title": "Invalid JSON.",
  "status": 400,
  "code": "invalid_json",
  "detail": "Invalid JSON. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#invalid_json"
}
```

### `invalid_parameter` – Idempotency-Key up to 200 characters (HTTP 400) {#invalid_parameter}

A parameter outside the body is invalid. Via `/v1` this currently only concerns the `Idempotency-Key` header.

**Causes:**
- `Idempotency-Key` is longer than 200 characters.
- `Idempotency-Key` contains control characters, e.g. a line break.
- In the developer area of the account: unknown `scopes` or a mode other than `live`/`test` when creating a key (there with status 422).

**Fix:**
1. Generate a new `Idempotency-Key`, ideally a UUID v4 (36 characters).
2. Strip surrounding spaces and line breaks from the header.
3. Send the request again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#invalid_parameter",
  "title": "Idempotency-Key up to 200 characters.",
  "status": 400,
  "code": "invalid_parameter",
  "detail": "Idempotency-Key up to 200 characters. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#invalid_parameter"
}
```

### `not_found` – Not found (HTTP 404) {#not_found}

The resource or path does not exist for this key. For security the server does not say whether the id exists elsewhere.

**Causes:**
- The id belongs to another account or to the other mode (a test key reads a live id or vice versa).
- A typo in the id or path, e.g. `/video/` instead of `/videos/`.
- The resource was deleted.
- The feature is not enabled for your account yet (it then answers 404, e.g. AI media).

**Fix:**
1. Check the path against the base URL `https://flow-marketing.org/api/turbo/v1`.
2. Check that key and id are in the same mode (`fm_test_…` only with test ids).
3. Fetch the id again from the list, e.g. `GET /videos` or `GET /renders`.
4. If a whole area keeps answering 404, write to us with the `request_id`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#not_found",
  "title": "Video not found.",
  "status": 404,
  "code": "not_found",
  "detail": "Not found – the id does not belong to this account or mode (test/live), or it does not exist.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#not_found"
}
```

### `method_not_allowed` – Method not allowed (HTTP 405) {#method_not_allowed}

The path exists, but not with this HTTP method.

**Causes:**
- `PUT` instead of `PATCH` when updating a video.
- `GET` on a path that only knows `POST`, e.g. `/videos/{id}/render`.
- `DELETE` on a list instead of a single id.

**Fix:**
1. Look up the method for the path in the OpenAPI file (`GET /openapi.json`).
2. Change the method and send the request again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#method_not_allowed",
  "title": "Method not allowed.",
  "status": 405,
  "code": "method_not_allowed",
  "detail": "Method not allowed.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#method_not_allowed"
}
```

### `body_timeout` – The request did not arrive completely (timeout). Please send it again (HTTP 408) {#body_timeout}

The body did not arrive completely within 15 seconds. The server closed the connection and executed nothing.

**Causes:**
- A very slow or dropping network connection.
- The client sends the body in chunks and stalls in between.
- A proxy holds the body back.

**Fix:**
1. Send the same request again with the same `Idempotency-Key`.
2. Back off exponentially between retries (1 s, 2 s, 4 s …) with some jitter.
3. Check proxy and network if it keeps happening.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff).

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#body_timeout",
  "title": "The request did not arrive completely (timeout). Please send it again.",
  "status": 408,
  "code": "body_timeout",
  "detail": "The request did not arrive completely (timeout). Please send it again. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#body_timeout"
}
```

### `conflict` – Conflict with the current state (HTTP 409) {#conflict}

The action does not fit the current state of the resource. Comes from voice (`/voices`, `/speech`) and live assistants (`/live/agents`); `detail` gives the reason.

**Causes:**
- The phone number is already connected to another assistant.
- The assistant reached its monthly cap or is not switched on yet.
- The phone connection is missing or was removed.

**Fix:**
1. Read `detail` – it says what is missing.
2. Bring the resource into the right state, e.g. switch the assistant on or raise its cap (`PATCH /live/agents/{id}`).
3. Connections to phone providers are made on the website, not via the API.
4. Send the request again afterwards.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#conflict",
  "title": "This number is already connected to an assistant.",
  "status": 409,
  "code": "conflict",
  "detail": "This number is already connected to an assistant.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#conflict"
}
```

### `idempotency_conflict` – This key was already used for a different request (HTTP 409) {#idempotency_conflict}

AI media only (`POST /media`): the `Idempotency-Key` already belongs to a different order, or the same order is still running.

**Causes:**
- The same `Idempotency-Key` for two different media orders.
- A retry while the first order is still being generated.

**Fix:**
1. Generate a new `Idempotency-Key` for every new media order.
2. If the order is already running, check it with `GET /media` or `GET /media/{id}` instead of sending again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `errors[]`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#idempotency_conflict",
  "title": "This key was already used for a different request.",
  "status": 409,
  "code": "idempotency_conflict",
  "detail": "This key was already used for a different request.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#idempotency_conflict",
  "errors": [
    {
      "path": "/idempotenz",
      "code": "invalid",
      "message": "This key was already used for a different request."
    }
  ]
}
```

### `idempotency_in_progress` – A request with this Idempotency-Key is still running (HTTP 409) {#idempotency_in_progress}

The first request with this key is still being executed. The server does not execute it a second time.

**Causes:**
- The client retried too early after a timeout.
- Two processes send the same request at the same time.
- A long action (e.g. `POST /videos` with `brief`) is not finished yet.

**Fix:**
1. Wait `Retry-After` seconds (usually 2).
2. Retry with the same `Idempotency-Key` and the same body.
3. You then get the stored answer with `Idempotent-Replayed: true`.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Extra fields:** `retry_after_s` · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#idempotency_in_progress",
  "title": "A request with this Idempotency-Key is still running.",
  "status": 409,
  "code": "idempotency_in_progress",
  "detail": "The first request with this Idempotency-Key is still running. Nothing was executed twice – retry with the same key in 2 seconds.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#idempotency_in_progress",
  "retry_after_s": 2
}
```

### `idempotency_key_reused` – This Idempotency-Key was used with a different request (HTTP 409) {#idempotency_key_reused}

In this mode the `Idempotency-Key` is already bound to a different request (other path, method or body). A key is valid for 24 hours.

**Causes:**
- The same key is used for several different calls, e.g. as a fixed constant in code.
- The body changed between two attempts, e.g. because of a timestamp in the body.
- A counter used as key restarted at 1 after a restart.

**Fix:**
1. Generate a new `Idempotency-Key` (UUID v4) for every new action.
2. Reuse a key only for the exact same retry.
3. Send the new request with the new key.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#idempotency_key_reused",
  "title": "This Idempotency-Key was used with a different request.",
  "status": 409,
  "code": "idempotency_key_reused",
  "detail": "This Idempotency-Key was used with a different request. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#idempotency_key_reused"
}
```

### `payload_too_large` – Request too large (at most 64 KB) (HTTP 413) {#payload_too_large}

The JSON body is larger than 64 KB. Files do not belong in the body.

**Causes:**
- An image or logo was put into the body as Base64.
- Very long texts or many `metadata` entries.
- The client accidentally sends a whole list along.

**Fix:**
1. Upload files via `POST /uploads` and pass only the `upl_…` id.
2. Shorten texts and `metadata` (at most 20 keys).
3. Send the smaller request again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#payload_too_large",
  "title": "Request too large (at most 64 KB).",
  "status": 413,
  "code": "payload_too_large",
  "detail": "Request too large (at most 64 KB). Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#payload_too_large"
}
```

### `unsupported_media_type` – Please send JSON (Content-Type: application/json) (HTTP 415) {#unsupported_media_type}

For `POST`, `PATCH` and `PUT` the API only accepts JSON.

**Causes:**
- `Content-Type: application/x-www-form-urlencoded` or `multipart/form-data`.
- `Content-Type: text/plain` from a default setting of the HTTP client.

**Fix:**
1. Set the header `Content-Type: application/json`.
2. Send the body as a JSON object again.
3. Upload files via `POST /uploads` and the upload link.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#unsupported_media_type",
  "title": "Please send JSON (Content-Type: application/json).",
  "status": 415,
  "code": "unsupported_media_type",
  "detail": "Please send JSON (Content-Type: application/json). Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#unsupported_media_type"
}
```

### `validation_failed` – The request is invalid (HTTP 422) {#validation_failed}

One or more fields in the body are wrong. `errors[]` names each field as a JSON pointer with its own code (e.g. `required`, `too_long`, `unknown_field`, `wrong_type`, `not_allowed`); `message` names the limit for lengths. The fields `limit` and `actual` are planned but not sent today.

**Causes:**
- A required field is missing or has the wrong type, e.g. neither or both of `fields` and `brief`.
- A text is longer than allowed, e.g. `brief` over 2,000 characters or a template field over its limit.
- An unknown or not yet available field (e.g. `webhook_url`, `assets`).
- A value is not allowed, e.g. a format other than `16x9`, `9x16`, `1x1`.

**Fix:**
1. Read `errors[]` and fix every field listed.
2. Look up the allowed template fields (`GET /templates/{id}`, field `fields_schema`).
3. Send the corrected request again – the server collects all errors at once.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `errors[]` · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#validation_failed",
  "title": "The request is invalid.",
  "status": 422,
  "code": "validation_failed",
  "detail": "2 value(s) invalid (see errors). Fix them and send again – nothing was created or charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#validation_failed",
  "errors": [
    {
      "path": "/brief",
      "code": "too_long",
      "message": "At most 2,000 characters."
    },
    {
      "path": "/formats",
      "code": "invalid",
      "message": "Formats from 16x9, 9x16, 1x1."
    }
  ]
}
```

### `test_scenario_in_live_mode` – Test scenario in live mode (HTTP 400) {#test_scenario_in_live_mode}

**Reserved – the server does not send this code today.**

Meant for requests that try to trigger a test scenario with a live key.

**Causes:**
- The server does not send this code at the moment; it is reserved for future test scenarios (forced errors in test mode).
- Test scenarios do not exist yet; test mode renders for free with a watermark.

**Fix:**
1. Use a test key (`fm_test_…`) for tests.
2. Handle the code anyway: send the request without test options with the live key.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#test_scenario_in_live_mode",
  "title": "Test scenario in live mode.",
  "status": 400,
  "code": "test_scenario_in_live_mode",
  "detail": "Test scenario in live mode. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#test_scenario_in_live_mode"
}
```

### `unsupported_version` – Version not supported (HTTP 400) {#unsupported_version}

**Reserved – the server does not send this code today.**

Meant for an unknown value in the `Flow-Version` header.

**Causes:**
- The server does not send this code at the moment; it is reserved for choosing an API version by header.
- Today the server does not read `Flow-Version` from the request; it always answers with `Flow-Version: 2026-11-20`.

**Fix:**
1. Leave `Flow-Version` out of the request or set `2026-11-20`.
2. Read the version from the `Flow-Version` response header.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#unsupported_version",
  "title": "Version not supported.",
  "status": 400,
  "code": "unsupported_version",
  "detail": "Version not supported. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#unsupported_version"
}
```

## Access and keys {#gruppe-zugang}

### `invalid_api_key` – Invalid or missing API key (HTTP 401) {#invalid_api_key}

The server could not sign you in. It deliberately does not say whether the key is missing, wrong, revoked or expired.

**Causes:**
- The `Authorization: Bearer fm_…` header is missing or misspelled.
- The key was revoked (locked) or has expired. A rotation with a grace period does not exist yet.
- The key is cut off or contains spaces (form: `fm_live_` or `fm_test_` plus 32 characters).
- Via MCP: the connection in the AI app was removed.

**Fix:**
1. Check the header: `Authorization: Bearer fm_test_…`.
2. Check in your Flow Marketing account under API whether the key is active.
3. Create a new key if needed and swap it in.
4. Via MCP: reconnect Flow Marketing in the AI app.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Headers:** `WWW-Authenticate` · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#invalid_api_key",
  "title": "Invalid or missing API key.",
  "status": 401,
  "code": "invalid_api_key",
  "detail": "Invalid or missing API key.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#invalid_api_key"
}
```

### `account_locked` – This account is locked. Please contact us (HTTP 403) {#account_locked}

The API account is locked. All keys of this account are rejected.

**Causes:**
- We locked the account, e.g. because of open payments or suspected misuse.
- When topping up in the account the same code comes with status 423.

**Fix:**
1. Do not retry automatically.
2. Write to us via the help page and include the `request_id`.

**Charged:** Nothing charged. · **Retry:** Do not retry. · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#account_locked",
  "title": "This account is locked. Please contact us.",
  "status": 403,
  "code": "account_locked",
  "detail": "This account is locked. Please contact us. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#account_locked"
}
```

### `customer_account_required` – Only with a customer account (HTTP 403) {#customer_account_required}

Voice clones, avatars and live assistants belong to a customer account (business or private). This API account has none.

**Causes:**
- The key belongs to an internal test account without a customer account.
- The API account was created without a link to a Flow Marketing account.

**Fix:**
1. Create the key in your Flow Marketing account under API (it is then linked to the customer account).
2. Send the request again with that key.

**Charged:** Nothing charged. · **Retry:** Do not retry.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#customer_account_required",
  "title": "Only with a customer account.",
  "status": 403,
  "code": "customer_account_required",
  "detail": "Voice clones and avatars belong to a customer account (business or private) and need the consent of the person.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#customer_account_required"
}
```

### `forbidden` – You are not allowed to do that (HTTP 403) {#forbidden}

The account may not do this action at all. Comes from voice, live assistants and AI media.

**Causes:**
- The API account belongs to no customer account (e.g. an internal test account) and may not save voices.
- The action is only allowed on the website.

**Fix:**
1. Do not retry the request unchanged.
2. Use a key from an account with a business or private customer.
3. If it persists, write to us with the `request_id`.

**Charged:** Nothing charged. · **Retry:** Do not retry.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#forbidden",
  "title": "You are not allowed to do that.",
  "status": 403,
  "code": "forbidden",
  "detail": "You are not allowed to do that.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#forbidden"
}
```

### `missing_scope` – This key lacks the scope "…" (HTTP 403) {#missing_scope}

The key is valid but may not do this action. The title names the missing scope.

**Causes:**
- The key was created with limited scopes, e.g. only `videos:read`.
- `voices:write` and `avatars:write` are never in the default set; they must be chosen explicitly.
- Via MCP: the key lacks scopes the tool needs.

**Fix:**
1. Read the missing scope in the title, e.g. `videos:write`.
2. Create a key with this scope in your Flow Marketing account under API.
3. Swap the key and send the request again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#missing_scope",
  "title": "This key lacks the scope \"videos:write\".",
  "status": 403,
  "code": "missing_scope",
  "detail": "This key lacks the scope \"videos:write\". Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#missing_scope"
}
```

### `api_key_expired` – API key expired (HTTP 401) {#api_key_expired}

**Reserved – the server does not send this code today.**

Meant for a key whose grace period after a rotation is over.

**Causes:**
- The server does not send this code at the moment; it is reserved for expired keys.
- Today an expired key gets `invalid_api_key` (401).

**Fix:**
1. Use the new key from the rotation.
2. Plan rotations so that all systems are switched within 24 hours.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#api_key_expired",
  "title": "API key expired.",
  "status": 401,
  "code": "api_key_expired",
  "detail": "API key expired.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#api_key_expired"
}
```

### `api_key_exposed` – API key exposed (HTTP 401) {#api_key_exposed}

**Reserved – the server does not send this code today.**

Meant for keys that were found in public and therefore blocked.

**Causes:**
- The server does not send this code at the moment; it is reserved for automatically blocked, publicly exposed keys.
- An automatic search for published keys does not exist yet.

**Fix:**
1. Revoke a key yourself right away if it became public (account → API).
2. Create a new key and keep it on the server only, never in a browser or app.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#api_key_exposed",
  "title": "API key exposed.",
  "status": 401,
  "code": "api_key_exposed",
  "detail": "API key exposed.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#api_key_exposed"
}
```

### `api_key_revoked` – API key revoked (HTTP 401) {#api_key_revoked}

**Reserved – the server does not send this code today.**

Meant for a key that was revoked in the account.

**Causes:**
- The server does not send this code at the moment; it is reserved for revoked keys.
- Today a revoked key gets `invalid_api_key` (401).

**Fix:**
1. Create a new key in your Flow Marketing account under API.
2. Replace the key everywhere it is stored.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#api_key_revoked",
  "title": "API key revoked.",
  "status": 401,
  "code": "api_key_revoked",
  "detail": "API key revoked.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#api_key_revoked"
}
```

### `missing_api_key` – API key missing (HTTP 401) {#missing_api_key}

**Reserved – the server does not send this code today.**

Meant for requests without any key.

**Causes:**
- The server does not send this code at the moment; it is reserved for requests without an `Authorization` header.
- Today a request without a key gets `invalid_api_key` (401).

**Fix:**
1. Send `Authorization: Bearer fm_test_…` or `fm_live_…`.
2. Handle `missing_api_key` and `invalid_api_key` the same way in code.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#missing_api_key",
  "title": "API key missing.",
  "status": 401,
  "code": "missing_api_key",
  "detail": "API key missing.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#missing_api_key"
}
```

### `api_not_enabled` – API not enabled (HTTP 403) {#api_not_enabled}

**Reserved – the server does not send this code today.**

Meant for accounts for which the Flow Marketing API is not enabled.

**Causes:**
- The server does not send this code at the moment; it is reserved for accounts without API access.
- When the API is switched off, the server answers everything with `not_found` (404) today, so it stays invisible from outside.

**Fix:**
1. Check the service status in the help center.
2. Write to us if your account needs access.

**Charged:** Nothing charged. · **Retry:** Do not retry.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#api_not_enabled",
  "title": "API not enabled.",
  "status": 403,
  "code": "api_not_enabled",
  "detail": "API not enabled. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#api_not_enabled"
}
```

### `ip_not_allowed` – IP address not allowed (HTTP 403) {#ip_not_allowed}

**Reserved – the server does not send this code today.**

Meant for keys that only work from certain IP addresses.

**Causes:**
- The server does not send this code at the moment; it is reserved for IP allow lists per key.
- There is no IP allow list yet; every valid key works from anywhere.

**Fix:**
1. Protect keys today with `scopes` and monthly limits.
2. Handle the code like `missing_scope`: do not retry automatically.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#ip_not_allowed",
  "title": "IP address not allowed.",
  "status": 403,
  "code": "ip_not_allowed",
  "detail": "IP address not allowed. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#ip_not_allowed"
}
```

## Balance and price {#gruppe-geld}

### `insufficient_balance` – Insufficient balance (HTTP 402) {#insufficient_balance}

The API balance does not cover the price. Nothing was reserved or started. `missing_cents` says how much is missing (net, cents).

**Causes:**
- The balance is used up or reserved by running renders.
- A longer video costs more than expected (billed per second).
- For voice or live assistants: the call costs more than is available.

**Fix:**
1. Check with `GET /balance` (`available_cents`, `reserved_cents`).
2. Top up at least `missing_cents` in your Flow Marketing account under API: https://flow-marketing.org/konto/api#guthaben.
3. Send the same request again afterwards.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `missing_cents` · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#insufficient_balance",
  "title": "Insufficient balance.",
  "status": 402,
  "code": "insufficient_balance",
  "detail": "This render costs €3.60. Available: €1.20. Nothing was reserved or charged – top up at least €2.40.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#insufficient_balance",
  "missing_cents": 240
}
```

### `insufficient_credits` – Not enough credits (HTTP 402) {#insufficient_credits}

Only for connections billed with credits of the Flow Marketing account (e.g. AI apps without their own API balance). Credits or changes are missing; nothing was started.

**Causes:**
- Too few credits are free in the account.
- There is no change left in the allowance for a correction (`reason: "keine_aenderung"`).
- Via MCP: credits do not cover the points for voice or avatar.

**Fix:**
1. Read `missing_credits` (or `buy_credits_url` via MCP).
2. Buy credits in your Flow Marketing account (10 changes = 1 credit).
3. Start the render again afterwards.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `reason`, `missing_credits`, `buy_credits_url` · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#insufficient_credits",
  "title": "Not enough credits.",
  "status": 402,
  "code": "insufficient_credits",
  "detail": "There are not enough credits in the Flow Marketing account for this video. Nothing was started or charged – buy credits on the website and start again.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#insufficient_credits",
  "reason": "credits",
  "missing_credits": 1
}
```

### `insufficient_tokens` – Not enough tokens (HTTP 402) {#insufficient_tokens}

AI media (`POST /media`) is billed in tokens. The token balance does not cover the confirmed price.

**Causes:**
- The account has no or too little token balance.
- The price rose since the estimate and the balance no longer covers it.

**Fix:**
1. Get the price with `POST /media/estimate` (`cost_tokens`).
2. Top up tokens in your Flow Marketing account.
3. Send `POST /media` with `confirm_tokens` again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#insufficient_tokens",
  "title": "Not enough tokens.",
  "status": 402,
  "code": "insufficient_tokens",
  "detail": "Not enough tokens. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#insufficient_tokens"
}
```

### `price_above_max` – Price above max_price_cents (HTTP 402) {#price_above_max}

The render would cost more than the cap `max_price_cents` you sent. Nothing was started.

**Causes:**
- The video is longer than expected (billed per second).
- The price list changed.
- `max_price_cents` is set too tight.

**Fix:**
1. Read the price in `detail`, or beforehand in the video's `estimate` (`GET /videos/{id}`).
2. Raise `max_price_cents` or shorten the video.
3. Start the render again with `POST /videos/{id}/render`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#price_above_max",
  "title": "Price above max_price_cents.",
  "status": 402,
  "code": "price_above_max",
  "detail": "This render costs €3.60; max_price_cents allows €3.00. Nothing was started or charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#price_above_max"
}
```

### `spending_limit_reached` – Monthly spending limit reached (HTTP 402) {#spending_limit_reached}

The monthly limit of the account or of this key would be exceeded. Nothing was reserved or charged.

**Causes:**
- The account's monthly limit is almost used up.
- The key has its own, smaller monthly limit ("This key’s monthly limit is reached.").
- Via MCP: the monthly cap of the AI app connection is reached.

**Fix:**
1. Check `monthly_limit_left_cents` with `GET /balance`.
2. Raise the limit in your Flow Marketing account under API (account or key), or use another key.
3. Or wait for the next month and send again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#spending_limit_reached",
  "title": "Monthly spending limit reached.",
  "status": 402,
  "code": "spending_limit_reached",
  "detail": "This render costs €3.60; €1.00 of your monthly limit of €100.00 is left. Nothing was reserved or charged – raise the limit or wait for the next month.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#spending_limit_reached"
}
```

### `consent_required` – Please tick both boxes before switching on (immediate start and compensation on withdrawal) (HTTP 409) {#consent_required}

A required consent is missing. For live assistants: switching on needs consent to the immediate start and to compensation on withdrawal.

**Causes:**
- `consumer_consent` is missing when switching on a live assistant.
- In the account when topping up: the two boxes about immediate performance and withdrawal are missing (status 422 there).

**Fix:**
1. Let the person give the consent themselves (never set it automatically).
2. Send the request again with `consumer_consent` (`PATCH /live/agents/{id}`).

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `errors[]`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#consent_required",
  "title": "Please tick both boxes before switching on (immediate start and compensation on withdrawal).",
  "status": 409,
  "code": "consent_required",
  "detail": "Please tick both boxes before switching on (immediate start and compensation on withdrawal).",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#consent_required",
  "errors": [
    {
      "path": "/consumer_consent",
      "code": "invalid",
      "message": "Please tick both boxes before switching on (immediate start and compensation on withdrawal)."
    }
  ]
}
```

### `price_changed` – The price changed: now … tokens. Please confirm again (HTTP 409) {#price_changed}

AI media only: the price in `confirm_tokens` no longer matches the current price. Nothing was started.

**Causes:**
- The price changed between `POST /media/estimate` and `POST /media`.
- `confirm_tokens` was copied wrongly.

**Fix:**
1. Get the price again with `POST /media/estimate`.
2. Show the new price and send `POST /media` with the new `confirm_tokens`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `errors[]`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#price_changed",
  "title": "The price changed: now 120 tokens. Please confirm again.",
  "status": 409,
  "code": "price_changed",
  "detail": "The price changed: now 120 tokens. Please confirm again.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#price_changed",
  "errors": [
    {
      "path": "/token",
      "code": "invalid",
      "message": "The price changed: now 120 tokens. Please confirm again."
    }
  ]
}
```

### `pricing_not_set` – Live renders are not bookable yet (HTTP 409) {#pricing_not_set}

No price is set yet for live renders (or another service). Nothing was started.

**Causes:**
- We have not set the price for live renders yet.
- For voice or live assistants: there is no tariff for this service yet ("No price is set for this service yet.").

**Fix:**
1. Until then, render with a test key (`fm_test_…`).
2. Check `pricing_available` with `GET /balance`.
3. Try again later or write to us.

**Charged:** Nothing charged. · **Retry:** Try again later.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#pricing_not_set",
  "title": "Live renders are not bookable yet.",
  "status": 409,
  "code": "pricing_not_set",
  "detail": "No price is set for live renders yet. Nothing was started or charged – until then, render with a test key (fm_test_…).",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#pricing_not_set"
}
```

### `payment_method_required` – Payment method required (HTTP 402) {#payment_method_required}

**Reserved – the server does not send this code today.**

Meant for actions that need a stored payment method.

**Causes:**
- The server does not send this code at the moment; it is reserved for billing via a stored payment method.
- Today the API bills against the balance; if money is missing you get `insufficient_balance`.

**Fix:**
1. Check `GET /balance`.
2. Top up the balance in your Flow Marketing account under API.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#payment_method_required",
  "title": "Payment method required.",
  "status": 402,
  "code": "payment_method_required",
  "detail": "Payment method required. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#payment_method_required"
}
```

## Limits and rate {#gruppe-grenzen}

### `limit_reached` – At most 5 per company (HTTP 409) {#limit_reached}

A fixed limit is reached. With 409 for voice clones and avatars; with 429 for limits of voice, AI media and live connections (with `Retry-After` for voice and AI media).

**Causes:**
- Already 5 voice clones or 5 avatars per company (draft, submitted or approved).
- More than 20 files on one voice clone or avatar.
- Daily limit for AI media or voice reached (429).

**Fix:**
1. Read `detail`: it states the limit.
2. Delete old ones (`DELETE /voices/clones/{id}` or `/avatars/{id}`) before creating new ones.
3. On 429: wait `Retry-After` seconds (if present, otherwise until tomorrow) and try again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#limit_reached",
  "title": "At most 5 per company.",
  "status": 409,
  "code": "limit_reached",
  "detail": "At most 5 per company. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#limit_reached"
}
```

### `daily_ai_limit` – Daily limit for AI fills (brief) reached (HTTP 429) {#daily_ai_limit}

At most 300 videos per 24 hours may be filled by the AI from a `brief`. Videos with `fields` still work.

**Causes:**
- Very many `POST /videos` with `brief` in a short time.
- A client bug creates the same video over and over.

**Fix:**
1. Send `fields` directly instead of `brief` (works right away).
2. Or wait `Retry-After` seconds (3600) and try again.

**Charged:** Nothing charged. · **Retry:** Try again later. · **Extra fields:** `retry_after_s` · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#daily_ai_limit",
  "title": "Daily limit for AI fills (brief) reached.",
  "status": 429,
  "code": "daily_ai_limit",
  "detail": "At most 300 AI fills per 24 hours. Nothing was created or charged – send `fields` directly (still works) or retry later.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#daily_ai_limit",
  "retry_after_s": 3600
}
```

### `daily_preview_limit` – At most 500 new videos per day (HTTP 429) {#daily_preview_limit}

Each account can create at most 500 new videos (drafts with preview) per 24 hours.

**Causes:**
- Mass creation of drafts that are never rendered.
- A client creates a new video on every retry instead of using `Idempotency-Key`.

**Fix:**
1. Always send the same `Idempotency-Key` on retries.
2. Update existing drafts with `PATCH /videos/{id}` instead of creating new ones.
3. Wait `Retry-After` seconds (3600) and try again.

**Charged:** Nothing charged. · **Retry:** Try again later. · **Extra fields:** `retry_after_s` · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#daily_preview_limit",
  "title": "At most 500 new videos per day.",
  "status": 429,
  "code": "daily_preview_limit",
  "detail": "At most 500 new videos per day. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#daily_preview_limit",
  "retry_after_s": 3600
}
```

### `daily_test_limit` – At most 25 test renders per day (HTTP 429) {#daily_test_limit}

Test mode allows at most 25 renders per 24 hours (the included correction does not count).

**Causes:**
- Automated tests render again on every run.
- Several developers share one account.

**Fix:**
1. Test with drafts and previews (`POST /videos`, free) instead of full renders.
2. Wait `Retry-After` seconds (3600) and try again.
3. For more renders, use a live key.

**Charged:** Nothing charged. · **Retry:** Try again later. · **Extra fields:** `retry_after_s` · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#daily_test_limit",
  "title": "At most 25 test renders per day.",
  "status": 429,
  "code": "daily_test_limit",
  "detail": "At most 25 test renders per day. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#daily_test_limit",
  "retry_after_s": 3600
}
```

### `daily_upload_limit` – At most 200 uploads per day (HTTP 429) {#daily_upload_limit}

Each account can make at most 200 uploads per UTC day. Deleting does not free any.

**Causes:**
- The same logo is uploaded again for every video.
- A client uploads again on every retry.

**Fix:**
1. Upload recurring files once and reuse the `upl_…` id.
2. Wait until midnight UTC (`Retry-After`) and continue then.

**Charged:** Nothing charged. · **Retry:** Try again later. · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#daily_upload_limit",
  "title": "At most 200 uploads per day.",
  "status": 429,
  "code": "daily_upload_limit",
  "detail": "At most 200 uploads per day (UTC) – deleting does not free any. Continue tomorrow. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#daily_upload_limit"
}
```

### `rate_limited` – Too many requests (HTTP 429) {#rate_limited}

The one-minute window for this kind of request is full. Limits per account and mode: test 120 read / 30 write / 20 expensive, live 600 / 120 / 60 per minute. Nothing was executed.

**Causes:**
- Too many polls in a loop, e.g. `GET /renders/{id}` without a pause.
- Many parallel processes using the same account.
- For AI media: more than 5 orders per minute.
- Via MCP: more than 120 messages per minute from one IP.

**Fix:**
1. Wait `Retry-After` seconds (also in `retry_after_s`).
2. Then retry with the same `Idempotency-Key`; on further 429 back off exponentially with jitter.
3. Read `RateLimit-Remaining` and `RateLimit-Reset` and throttle in advance.
4. Instead of polling loops, use `?wait=30` on `GET /renders/{id}` or webhooks.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Extra fields:** `retry_after_s` · **Headers:** `Retry-After`, `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#rate_limited",
  "title": "Too many requests.",
  "status": 429,
  "code": "rate_limited",
  "detail": "Limit of 30 requests per minute reached. Nothing was executed or charged – retry after 17 s.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#rate_limited",
  "retry_after_s": 17
}
```

### `upload_concurrency` – At most 3 checks at the same time (HTTP 429) {#upload_concurrency}

We check at most 3 uploads per account at the same time. The file stays in quarantine.

**Causes:**
- Many `POST /uploads/{id}/complete` in parallel.
- Large documents take longer to check.

**Fix:**
1. Wait `Retry-After` seconds (5).
2. Call `POST /uploads/{id}/complete` again.
3. Complete uploads one after another, at most 3 at a time.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_concurrency",
  "title": "At most 3 checks at the same time.",
  "status": 429,
  "code": "upload_concurrency",
  "detail": "We check at most 3 uploads per account at the same time. Complete again in a few seconds – the file stays in quarantine. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_concurrency"
}
```

### `concurrency_limit` – Too many renders at once (HTTP 429) {#concurrency_limit}

**Reserved – the server does not send this code today.**

Meant for too many renders running at the same time per account.

**Causes:**
- The server does not send this code at the moment; it is reserved for a limit of concurrent renders per account.
- Today the server only limits per video: if a render is already running there, you get `video_busy`.

**Fix:**
1. Handle the code like `rate_limited`: wait, then retry with the same `Idempotency-Key`.
2. Spread many renders over time.

**Charged:** Nothing charged. · **Retry:** Try again later.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#concurrency_limit",
  "title": "Too many renders at once.",
  "status": 429,
  "code": "concurrency_limit",
  "detail": "Too many renders at once. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#concurrency_limit"
}
```

## Content and checks {#gruppe-inhalt}

### `consent_missing` – The person has not consented yet (HTTP 409) {#consent_missing}

A voice clone or avatar can only be submitted once the person has consented and recorded the sentence with the code.

**Causes:**
- The person has not opened the `consent_url` yet.
- Consent is given, but the voice check with the code is missing.

**Fix:**
1. Give the person the `consent_url` from the response of `POST /voices/clones` or `POST /avatars`.
2. Wait until `consent.given` and `consent.voice_check_recorded` are true (`GET …/{id}`).
3. Then call `POST …/{id}/submit` again. You cannot do this on the person's behalf.

**Charged:** Nothing charged. · **Retry:** Try again later.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#consent_missing",
  "title": "The person has not consented yet.",
  "status": 409,
  "code": "consent_missing",
  "detail": "The person must open the consent_url, agree and record the sentence with the code. The API customer cannot do this on their behalf.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#consent_missing"
}
```

### `not_editable` – Stylefilm videos cannot be changed yet (HTTP 409) {#not_editable}

The resource can no longer be changed in this state. Nothing was changed.

**Causes:**
- `PATCH /videos/{id}` on a video with a stylefilm template (`sf-…`).
- The voice clone or avatar was already submitted for review ("Already submitted for review.").

**Fix:**
1. For stylefilm videos: create a new video with the same template and the changed fields (`POST /videos`).
2. For a voice clone or avatar: wait for the review or create a new one.

**Charged:** Nothing charged. · **Retry:** Do not retry.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#not_editable",
  "title": "Stylefilm videos cannot be changed yet.",
  "status": 409,
  "code": "not_editable",
  "detail": "For changed fields please create a new video with the same template (POST /videos). Nothing was changed or charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#not_editable"
}
```

### `not_enough_material` – Not enough material (HTTP 409) {#not_enough_material}

A voice clone or avatar still lacks material. `min_material_seconds` gives the length needed (60 s).

**Causes:**
- Less than 60 seconds of recording uploaded.
- Uploads were created but not completed.

**Fix:**
1. Upload more recordings (`POST …/{id}/uploads`, then `…/uploads/{file_id}/complete`).
2. Check `material_seconds` and send `POST …/{id}/submit` again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `min_material_seconds`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#not_enough_material",
  "title": "Not enough material.",
  "status": 409,
  "code": "not_enough_material",
  "detail": "Not enough material. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#not_enough_material",
  "min_material_seconds": 60
}
```

### `content_rejected` – We do not build videos for this content (HTTP 422) {#content_rejected}

The content breaks the usage rules. Comes from videos, voice and AI media.

**Causes:**
- Political advertising, hate or deception in `brief` or `fields`.
- Intimate or sexual content.
- For AI media or voice: the `prompt` or text falls into a blocked category (`errors[]` with code `rejected`).

**Fix:**
1. Do not retry unchanged.
2. Rephrase the content so it follows the usage rules.
3. If you think the rejection is wrong, write to us with the `request_id`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#content_rejected",
  "title": "We do not build videos for this content.",
  "status": 422,
  "code": "content_rejected",
  "detail": "The content breaks the usage rules (e.g. politics, hate, deception). Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#content_rejected"
}
```

### `pre_render_check_red` – The pre-render check is red (HTTP 422) {#pre_render_check_red}

The quality check of the draft has red items. The render only starts when everything is at least yellow. `failed_checks` lists every red check.

**Causes:**
- Text too long for the reading time (`reading_time`) or overflowing (`text_overflow`).
- Too little contrast (`contrast`) or font too small (`font_size`).
- Text in the safe zone (`safe_zone`) or overlapping (`overlap`).
- An advertising law note (`ad_law`).

**Fix:**
1. Read `failed_checks`: `id`, `scene`, `format`, `value`, `limit` and `fix_hint`.
2. Change the affected fields with `PATCH /videos/{id}`.
3. Check `quality.overall` on the video and start the render again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `failed_checks[]`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#pre_render_check_red",
  "title": "The pre-render check is red.",
  "status": 422,
  "code": "pre_render_check_red",
  "detail": "These checks are red: reading_time. Nothing was started or charged – change the flagged fields (PATCH) and render again.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#pre_render_check_red",
  "failed_checks": [
    {
      "id": "reading_time",
      "status": "red",
      "format": "9x16",
      "scene": "hook",
      "value": 4.1,
      "limit": 3.2,
      "unit": "words_per_s",
      "message": "Too much text for the time on screen.",
      "fix_hint": "Too much text for the time on screen."
    }
  ]
}
```

### `too_long` – Too long in total (HTTP 422) {#too_long}

The material of a voice clone or avatar would be longer in total than allowed: voice at most 1,800 s, avatar at most 600 s.

**Causes:**
- Too many or too long recordings uploaded.
- `seconds` set too high when completing.

**Fix:**
1. Check `material_seconds` with `GET /voices/clones/{id}` or `GET /avatars/{id}`.
2. Upload only as much material as fits the limit.
3. Complete the upload again with the correct `seconds`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#too_long",
  "title": "Too long in total.",
  "status": 422,
  "code": "too_long",
  "detail": "Too long in total. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#too_long"
}
```

### `fill_failed` – The AI could not fill the fields cleanly (HTTP 502) {#fill_failed}

No valid template fields could be built from the `brief`. No video was created.

**Causes:**
- The `brief` is too vague or does not fit the template.
- The `brief` asks for more content than the template fields hold.

**Fix:**
1. Make the `brief` more specific: offer, audience, tone, call to action.
2. Or send `fields` directly (see `GET /templates/{id}`).
3. Send the request again with a new `Idempotency-Key`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#fill_failed",
  "title": "The AI could not fill the fields cleanly.",
  "status": 502,
  "code": "fill_failed",
  "detail": "The AI could not build valid fields from the brief. Nothing was charged – make the brief more specific or send `fields` directly.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#fill_failed"
}
```

### `ai_unavailable` – The AI is temporarily unavailable (HTTP 503) {#ai_unavailable}

The AI that fills the `brief` is briefly unavailable. No video was created.

**Causes:**
- A short disruption of the AI service.
- High load.

**Fix:**
1. Wait `Retry-After` seconds (30).
2. Retry with the same `Idempotency-Key`; on further errors back off exponentially with jitter.
3. Or send `fields` directly – that needs no AI.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Extra fields:** `retry_after_s` · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#ai_unavailable",
  "title": "The AI is temporarily unavailable.",
  "status": 503,
  "code": "ai_unavailable",
  "detail": "The AI that fills the brief is briefly unavailable. Nothing was charged – retry in 30 seconds or send `fields` directly.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#ai_unavailable",
  "retry_after_s": 30
}
```

### `asset_rejected` – Asset rejected (HTTP 422) {#asset_rejected}

**Reserved – the server does not send this code today.**

Meant for embedded files (`assets`) that get rejected.

**Causes:**
- The server does not send this code at the moment; it is reserved for the future `assets` field.
- Today `assets` is not available yet; uploads are checked with `upload_*` and `image_*` codes.

**Fix:**
1. Upload images and logos via `POST /uploads`.
2. Use the `upl_…` id in the `brand.logo` field.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#asset_rejected",
  "title": "Asset rejected.",
  "status": 422,
  "code": "asset_rejected",
  "detail": "Asset rejected. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#asset_rejected"
}
```

### `foreign_brand` – Third-party brand without permission (HTTP 422) {#foreign_brand}

**Reserved – the server does not send this code today.**

Meant for content with a third-party brand without proven permission.

**Causes:**
- The server does not send this code at the moment; it is reserved for detecting third-party brands.
- Today the pre-render check reports advertising law items as `ad_law` in `pre_render_check_red`.

**Fix:**
1. Remove third-party brands and logos from `fields`, `brief` and `brand`.
2. Only use brands you have permission for.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#foreign_brand",
  "title": "Third-party brand without permission.",
  "status": 422,
  "code": "foreign_brand",
  "detail": "Third-party brand without permission. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#foreign_brand"
}
```

### `voice_unavailable` – Voice unavailable (HTTP 422) {#voice_unavailable}

**Reserved – the server does not send this code today.**

Meant for a voice that no longer exists.

**Causes:**
- The server does not send this code at the moment; it is reserved for voices that are no longer available.
- Today an unknown voice in `voice` comes as `validation_failed` with path `/voice`.

**Fix:**
1. Read the allowed values in `errors[].message` (path `/voice`).
2. Set `voice` to one of these values or to `null` (no narrator).

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#voice_unavailable",
  "title": "Voice unavailable.",
  "status": 422,
  "code": "voice_unavailable",
  "detail": "Voice unavailable. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#voice_unavailable"
}
```

### `website_unreachable` – Website unreachable (HTTP 422) {#website_unreachable}

**Reserved – the server does not send this code today.**

Meant for a website in `brand.website` that cannot be read.

**Causes:**
- The server does not send this code at the moment; it is reserved for reading the website in `brand.website`.
- Today the server only checks the form of the address; a wrong form comes as `validation_failed`.

**Fix:**
1. Give the address like `example.com` or `https://example.com`.
2. Prefer sending name, colours and logo directly in `brand`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#website_unreachable",
  "title": "Website unreachable.",
  "status": 422,
  "code": "website_unreachable",
  "detail": "Website unreachable. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#website_unreachable"
}
```

## Uploads and documents {#gruppe-upload}

### `document_nicht_gefunden` – Document not found (HTTP 404) {#document_nicht_gefunden}

The document id is wrong, belongs to another account, or the document was deleted. Unlike elsewhere, the code here is not `not_found`.

**Causes:**
- A typo in the id (form `dok_` plus 20 characters).
- The document was deleted with `DELETE /documents/{id}`.
- The id comes from another account.

**Fix:**
1. Check the id from the response of `POST /documents`.
2. Create the document again if needed.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_nicht_gefunden",
  "title": "Document not found.",
  "status": 404,
  "code": "document_nicht_gefunden",
  "detail": "Document not found. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_nicht_gefunden"
}
```

### `document_nicht_gelesen` – The document has not been read yet (HTTP 409) {#document_nicht_gelesen}

`POST /videos/from-document` arrived before the document was fully read.

**Causes:**
- The video was created right after `POST /documents/{id}/complete`.
- Reading large documents takes a few seconds.

**Fix:**
1. Poll `GET /documents/{id}` until the document is read.
2. Then send `POST /videos/from-document` again.

**Charged:** Nothing charged. · **Retry:** Try again later.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_nicht_gelesen",
  "title": "The document has not been read yet.",
  "status": 409,
  "code": "document_nicht_gelesen",
  "detail": "The document has not been read yet. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_nicht_gelesen"
}
```

### `document_nicht_hochgeladen` – The file has not been uploaded yet (HTTP 409) {#document_nicht_hochgeladen}

`POST /documents/{id}/complete` arrived before the file was at the upload link.

**Causes:**
- The `PUT` to the upload link is missing or failed.
- Complete was called in parallel to the upload.

**Fix:**
1. Upload the file with `PUT` to the upload link.
2. Then call `POST /documents/{id}/complete`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_nicht_hochgeladen",
  "title": "The file has not been uploaded yet.",
  "status": 409,
  "code": "document_nicht_hochgeladen",
  "detail": "The file has not been uploaded yet. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_nicht_hochgeladen"
}
```

### `document_zustand` – This document can no longer be processed (HTTP 409) {#document_zustand}

The document is already completed or deleted, or the file is gone.

**Causes:**
- `POST /documents/{id}/complete` was called a second time.
- The file was removed after expiry ("The file is gone. Please upload again.").

**Fix:**
1. Check with `GET /documents/{id}`.
2. Create the document again and upload it if needed.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_zustand",
  "title": "This document can no longer be processed.",
  "status": 409,
  "code": "document_zustand",
  "detail": "This document can no longer be processed. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_zustand"
}
```

### `upload_busy` – This upload is being checked right now (HTTP 409) {#upload_busy}

A check is already running for this upload. Completing again does not start a second one.

**Causes:**
- `POST /uploads/{id}/complete` was called twice.
- Checking large files takes a few seconds.

**Fix:**
1. Wait `Retry-After` seconds (5).
2. Check with `GET /uploads/{id}` instead of completing again.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_busy",
  "title": "This upload is being checked right now.",
  "status": 409,
  "code": "upload_busy",
  "detail": "This upload is being checked right now. Look again with GET /uploads/{id} in a few seconds. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_busy"
}
```

### `upload_missing` – The file has not been uploaded yet (HTTP 409) {#upload_missing}

`POST /uploads/{id}/complete` arrived before the file was at the upload link.

**Causes:**
- The `PUT` to `upload_url` is missing or failed.
- Complete was called in parallel to the upload.

**Fix:**
1. Upload the file with `PUT` to `upload_url` and check that the response is 200.
2. Then call `POST /uploads/{id}/complete`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_missing",
  "title": "The file has not been uploaded yet.",
  "status": 409,
  "code": "upload_missing",
  "detail": "The file has not been uploaded yet. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_missing"
}
```

### `upload_state` – This upload can no longer be completed (HTTP 409) {#upload_state}

The upload is already completed, rejected or expired.

**Causes:**
- The upload was already completed successfully.
- The file was rejected in the check and deleted.
- The upload link expired.

**Fix:**
1. Check with `GET /uploads/{id}`.
2. If it is done, just keep using the `upl_…` id.
3. Otherwise create a new upload (`POST /uploads`).

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_state",
  "title": "This upload can no longer be completed.",
  "status": 409,
  "code": "upload_state",
  "detail": "This upload can no longer be completed. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_state"
}
```

### `document_zu_gross` – The file is too large (at most 50 MB) (HTTP 413) {#document_zu_gross}

The document is larger than 50 MB, or empty when completing.

**Causes:**
- A presentation with many large images or videos.
- The uploaded file differs from `size_bytes`.

**Fix:**
1. Make the document smaller (compress images, remove videos).
2. Create the document again with the exact `size_bytes` and upload it again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_zu_gross",
  "title": "The file is too large (at most 50 MB).",
  "status": 413,
  "code": "document_zu_gross",
  "detail": "The file is too large (at most 50 MB). Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_zu_gross"
}
```

### `document_felder` – Fields from the document do not fit the template (HTTP 422) {#document_felder}

No valid template fields could be built from the document content. The title names the affected fields.

**Causes:**
- The texts in the document are longer than the template allows.
- The chosen template does not fit the content.

**Fix:**
1. Choose a different `template` for `POST /videos/from-document`.
2. Or create the video with shortened `fields` (`POST /videos`).

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_felder",
  "title": "Headline: at most 40 characters.",
  "status": 422,
  "code": "document_felder",
  "detail": "Headline: at most 40 characters. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_felder"
}
```

### `document_leer` – The file is empty (HTTP 422) {#document_leer}

The document is empty, or it contains nothing a video can be built from.

**Causes:**
- `size_bytes` below 100.
- The document only contains images without text, or is empty.

**Fix:**
1. Check the file and its content.
2. Upload a document with readable text, or create the video with `fields` (`POST /videos`).

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_leer",
  "title": "The file is empty.",
  "status": 422,
  "code": "document_leer",
  "detail": "The file is empty. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_leer"
}
```

### `document_typ` – File name missing (HTTP 422) {#document_typ}

For documents: the file name is missing, the extension is not allowed or the content does not match it. Allowed are PPTX, PDF and DOCX.

**Causes:**
- `filename` is missing or has an extension other than `.pptx`, `.pdf`, `.docx`.
- When completing: the content does not match the extension (e.g. a renamed file).

**Fix:**
1. Send `filename` with the correct extension.
2. Upload the original file, not a renamed one.
3. Create the document again (`POST /documents`).

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_typ",
  "title": "File name missing.",
  "status": 422,
  "code": "document_typ",
  "detail": "File name missing. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_typ"
}
```

### `document_virus` – The virus scanner found something in the file. We deleted it (HTTP 422) {#document_virus}

The virus scanner rejected the document. It was deleted.

**Causes:**
- The document contains malicious code or active content (e.g. macros).
- The file was altered on the way.

**Fix:**
1. Check the file with an up-to-date virus scanner.
2. Export the document again cleanly (e.g. as PDF).
3. Create the document again and upload it.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_virus",
  "title": "The virus scanner found something in the file. We deleted it.",
  "status": 422,
  "code": "document_virus",
  "detail": "The virus scanner found something in the file. We deleted it. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_virus"
}
```

### `image_not_allowed` – We cannot use this image: nudity, sexual or intimate content is not allowed in Flow Marketing. We deleted it (HTTP 422) {#image_not_allowed}

The image check blocked the image. It was deleted and cannot be used.

**Causes:**
- The image shows nudity or sexual or intimate content.
- A borderline case was classed as blocked by the check.

**Fix:**
1. Use a different image.
2. If you think the block is wrong, write to us with the `request_id`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#image_not_allowed",
  "title": "We cannot use this image: nudity, sexual or intimate content is not allowed in Flow Marketing. We deleted it.",
  "status": 422,
  "code": "image_not_allowed",
  "detail": "We cannot use this image: nudity, sexual or intimate content is not allowed in Flow Marketing. We deleted it. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#image_not_allowed"
}
```

### `invalid_file` – File empty or too large (HTTP 422) {#invalid_file}

A recording for a voice clone or avatar is empty, too large or not a recognised audio or video file. It was deleted.

**Causes:**
- The file is smaller than 1 KB or larger than the limit.
- The content does not match the given `content_type` ("File type not recognised.").

**Fix:**
1. Record voice as WAV, MP3, M4A, WebM or OGG and avatars as MP4, MOV or WebM.
2. Get a new upload link (`POST …/{id}/uploads`) and upload the file again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#invalid_file",
  "title": "File empty or too large.",
  "status": 422,
  "code": "invalid_file",
  "detail": "File empty or too large. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#invalid_file"
}
```

### `upload_image_invalid` – The image cannot be read or is too large. Please save it as a normal PNG, JPEG or WebP (HTTP 422) {#upload_image_invalid}

The image could not be read during re-encoding. Every image is re-encoded so only real pixels get through.

**Causes:**
- The file is damaged or cut off.
- An unusual variant of the format (e.g. animated WebP).

**Fix:**
1. Open the image in an image editor and save it as a normal PNG, JPEG or WebP.
2. Create a new upload and upload it again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_image_invalid",
  "title": "The image cannot be read or is too large. Please save it as a normal PNG, JPEG or WebP.",
  "status": 422,
  "code": "upload_image_invalid",
  "detail": "The image cannot be read or is too large. Please save it as a normal PNG, JPEG or WebP. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_image_invalid"
}
```

### `upload_image_too_large` – The image has too many pixels (at most 50 megapixels) (HTTP 422) {#upload_image_too_large}

Width times height of the image is above 50 megapixels.

**Causes:**
- A photo straight from a high-resolution camera.
- A very large logo in print resolution.

**Fix:**
1. Scale the image down, e.g. to at most 4000 × 4000 pixels.
2. Create a new upload and upload the smaller image.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_image_too_large",
  "title": "The image has too many pixels (at most 50 megapixels).",
  "status": 422,
  "code": "upload_image_too_large",
  "detail": "The image has too many pixels (at most 50 megapixels). Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_image_too_large"
}
```

### `upload_size` – size_bytes between 100 and 15728640 (HTTP 422) {#upload_size}

The file is empty or too large: images and logos up to 15 MB, documents up to 50 MB. Two statuses: when creating (`POST /uploads`) you get 422 with the field `size_bytes` in `errors[]`; when completing (`POST /uploads/{id}/complete`) you get 413 if the uploaded file is too large or empty.

**Causes:**
- When creating (422): `size_bytes` is missing, below 100 or above the limit.
- When completing (413): the uploaded file is larger than announced or empty.
- When completing (413): after re-encoding the image is larger than 15 MB.

**Fix:**
1. Make the file smaller than the limit.
2. Put the exact size in bytes into `size_bytes`.
3. Create the upload again and upload the file again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `errors[]`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_size",
  "title": "size_bytes between 100 and 15728640.",
  "status": 422,
  "code": "upload_size",
  "detail": "size_bytes between 100 and 15728640. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_size",
  "errors": [
    {
      "path": "/size_bytes",
      "code": "upload_size",
      "message": "size_bytes between 100 and 15728640."
    }
  ]
}
```

### `upload_type` – Images and logos as .png, .jpg or .webp (no SVG) (HTTP 422) {#upload_type}

The file type is not allowed or the content does not match the extension. Allowed: images and logos as PNG, JPEG, WebP; documents as PPTX, PDF, DOCX.

**Causes:**
- SVG, GIF or HEIC as an image or logo.
- A wrong extension in `filename`, e.g. `.jpg` for a PNG file.
- When completing: the content is not a real PNG, JPEG or WebP.

**Fix:**
1. Save images as PNG, JPEG or WebP and documents as PPTX, PDF or DOCX.
2. Use the correct extension in `filename`.
3. Create the upload again (`POST /uploads`) and upload the original file.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `errors[]`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_type",
  "title": "Images and logos as .png, .jpg or .webp (no SVG).",
  "status": 422,
  "code": "upload_type",
  "detail": "Images and logos as .png, .jpg or .webp (no SVG). Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_type",
  "errors": [
    {
      "path": "/filename",
      "code": "upload_type",
      "message": "Images and logos as .png, .jpg or .webp (no SVG)."
    }
  ]
}
```

### `upload_virus` – The virus scanner found something in the file. We deleted it (HTTP 422) {#upload_virus}

The virus scanner rejected the file. It was deleted and cannot be used.

**Causes:**
- The file contains malicious code.
- A document contains active content that the scanner flags.

**Fix:**
1. Check the file on your system with an up-to-date virus scanner.
2. Create the file again cleanly (e.g. export it again).
3. Create a new upload and upload the clean file.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_virus",
  "title": "The virus scanner found something in the file. We deleted it.",
  "status": 422,
  "code": "upload_virus",
  "detail": "The virus scanner found something in the file. We deleted it. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_virus"
}
```

### `document_grenze` – At most 30 documents per day. Please try again tomorrow (HTTP 429) {#document_grenze}

Each account can create at most 30 documents per day. This response has no `Retry-After` header.

**Causes:**
- Many documents in a short time.
- A client creates a new document on every retry.

**Fix:**
1. Reuse an already read document (`POST /videos/from-document`).
2. Try again the next day.

**Charged:** Nothing charged. · **Retry:** Try again later.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_grenze",
  "title": "At most 30 documents per day. Please try again tomorrow.",
  "status": 429,
  "code": "document_grenze",
  "detail": "At most 30 documents per day. Please try again tomorrow. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_grenze"
}
```

### `document_bildpruefung` – The image check is not possible right now. Please try again in a minute (HTTP 503) {#document_bildpruefung}

The check of the images in the document is briefly unavailable.

**Causes:**
- A short disruption of the checking service.
- High load.

**Fix:**
1. Wait `Retry-After` seconds (60).
2. Call `POST /documents/{id}/complete` again.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_bildpruefung",
  "title": "The image check is not possible right now. Please try again in a minute.",
  "status": 503,
  "code": "document_bildpruefung",
  "detail": "The image check is not possible right now. Please try again in a minute. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_bildpruefung"
}
```

### `document_scan` – The virus check is not possible right now. Please try again in a minute (HTTP 503) {#document_scan}

The virus scanner for documents is briefly unavailable.

**Causes:**
- A short disruption of the virus scanner.
- Maintenance.

**Fix:**
1. Wait `Retry-After` seconds (60).
2. Call `POST /documents/{id}/complete` again.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#document_scan",
  "title": "The virus check is not possible right now. Please try again in a minute.",
  "status": 503,
  "code": "document_scan",
  "detail": "The virus check is not possible right now. Please try again in a minute. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#document_scan"
}
```

### `image_check_unavailable` – The image check is not possible right now. Please try again in a minute (HTTP 503) {#image_check_unavailable}

The content check for images (nudity, intimate content) is briefly unavailable. The file stays in quarantine.

**Causes:**
- A short disruption of the checking service.
- High load.

**Fix:**
1. Wait `Retry-After` seconds (60).
2. Call `POST /uploads/{id}/complete` again.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Headers:** `Retry-After` · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#image_check_unavailable",
  "title": "The image check is not possible right now. Please try again in a minute.",
  "status": 503,
  "code": "image_check_unavailable",
  "detail": "The image check is not possible right now. The file stays in quarantine – complete again in a minute.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#image_check_unavailable"
}
```

### `upload_image_check_unavailable` – The image check is not possible right now (HTTP 503) {#upload_image_check_unavailable}

The tool that re-encodes images is briefly unavailable. The file stays in quarantine.

**Causes:**
- A short disruption or restart on our side.
- Maintenance.

**Fix:**
1. Wait `Retry-After` seconds (60).
2. Call `POST /uploads/{id}/complete` again.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_image_check_unavailable",
  "title": "The image check is not possible right now.",
  "status": 503,
  "code": "upload_image_check_unavailable",
  "detail": "The image check is not possible right now. The file stays in quarantine – complete again in a minute.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_image_check_unavailable"
}
```

### `upload_scan_unavailable` – The virus check is not possible right now (HTTP 503) {#upload_scan_unavailable}

The virus scanner is briefly unavailable. The file stays in quarantine and is not used.

**Causes:**
- A short disruption of the virus scanner.
- Maintenance.

**Fix:**
1. Wait `Retry-After` seconds (60).
2. Call `POST /uploads/{id}/complete` again – no new upload needed.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#upload_scan_unavailable",
  "title": "The virus check is not possible right now.",
  "status": 503,
  "code": "upload_scan_unavailable",
  "detail": "The virus check is not possible right now. The file stays in quarantine – complete again in a minute.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#upload_scan_unavailable"
}
```

## Render and rebuild {#gruppe-render}

### `canceled` – Render canceled (HTTP 200) {#canceled}

Appears in `error.code` of a canceled render (not an HTTP error response). Before the start the reservation is released; after the start it may stay charged, depending on the billing setting – `error.charged` shows it.

**Causes:**
- `POST /renders/{id}/cancel` or `POST /videos/{id}/cancel` was called.
- The render was canceled via MCP.

**Fix:**
1. Read `error.charged`: false means nothing was charged.
2. If you want the video after all, start a new render (`POST /videos/{id}/render`).

**Charged:** Reservation released – nothing charged. · **Retry:** Do not retry.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#canceled",
  "title": "Render canceled.",
  "status": 200,
  "code": "canceled",
  "detail": "The render was canceled before it started. The reserved amount was refunded.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#canceled",
  "error": {
    "code": "canceled",
    "message": "The render was canceled before it started. The reserved amount was refunded.",
    "charged": false,
    "retryable": false
  }
}
```

### `no_correction_left` – The included correction is used (HTTP 409) {#no_correction_left}

Every finished video has exactly one included correction. It is used; nothing was changed.

**Causes:**
- A second `PATCH /videos/{id}` after status `ready`.
- `corrections_left` is 0.

**Fix:**
1. Check `corrections_left` on the video before changing it.
2. For further changes: create a new video (`POST /videos`).

**Charged:** Nothing charged. · **Retry:** Do not retry.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#no_correction_left",
  "title": "The included correction is used.",
  "status": 409,
  "code": "no_correction_left",
  "detail": "The one included correction of this video is used. Nothing was changed – create a new video for further changes.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#no_correction_left"
}
```

### `no_free_rebuild` – No free rebuild available (HTTP 409) {#no_free_rebuild}

`free_rebuild: true` only works once after a paid render stayed red in our checks. Nothing was started.

**Causes:**
- The last render was not red.
- The free rebuild of this round is already used.
- The video was changed or rendered and paid again since.

**Fix:**
1. Check `free_rebuild_available` with `GET /videos/{id}`.
2. If it is false, start a normal render without `free_rebuild`.

**Charged:** Nothing charged. · **Retry:** Do not retry.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#no_free_rebuild",
  "title": "No free rebuild available.",
  "status": 409,
  "code": "no_free_rebuild",
  "detail": "A free rebuild is available once when a paid render stayed red in our checks (`free_rebuild_available`). Nothing was started or charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#no_free_rebuild"
}
```

### `not_renderable` – The video is in state "ready" (HTTP 409) {#not_renderable}

The video is already finished. A new render via `/render` is not possible; the included correction starts via `PATCH`.

**Causes:**
- `POST /videos/{id}/render` on a finished video.
- The client missed the end of the render and starts again.

**Fix:**
1. Download the files from the finished render (`GET /renders/{id}`, field `files`).
2. For the one included correction: change the fields with `PATCH /videos/{id}` – that starts the render itself.
3. For further changes: create a new video.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#not_renderable",
  "title": "The video is in state \"ready\".",
  "status": 409,
  "code": "not_renderable",
  "detail": "The video is already ready. For the included correction, PATCH it first – that starts the render itself.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#not_renderable"
}
```

### `nothing_to_cancel` – No render is running for this video (HTTP 409) {#nothing_to_cancel}

There is no running render that could be cancelled. Nothing was changed.

**Causes:**
- The render already finished, failed or was cancelled.
- No render was ever started for the video.

**Fix:**
1. Check with `GET /renders/{id}` or `GET /videos/{id}`.
2. Nothing else to do.

**Charged:** Nothing charged. · **Retry:** Do not retry. · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#nothing_to_cancel",
  "title": "No render is running for this video.",
  "status": 409,
  "code": "nothing_to_cancel",
  "detail": "No render is running. Nothing was changed.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#nothing_to_cancel"
}
```

### `video_busy` – The video is being built (HTTP 409) {#video_busy}

A render or render start is running for this video. Updating, deleting or a second start are not possible now.

**Causes:**
- `PATCH` or `DELETE` during a render.
- Two `POST /videos/{id}/render` at the same time.
- Cancelling when the video is already built and being checked ("The video is almost done.").

**Fix:**
1. Wait for the end (`GET /renders/{id}?wait=30` or the `video.ready` / `video.failed` webhook).
2. Or cancel while still possible (`POST /renders/{id}/cancel`).
3. Send the request again afterwards.

**Charged:** Nothing charged. · **Retry:** Try again later.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#video_busy",
  "title": "The video is being built.",
  "status": 409,
  "code": "video_busy",
  "detail": "The video cannot be changed while a render is running. Nothing was changed – wait for the render or cancel it (POST /renders/{id}/cancel).",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#video_busy"
}
```

### `render_failed` – Render failed (HTTP 503) {#render_failed}

Two cases: as an HTTP response (503) the render could not start – the reservation is released, nothing charged. As `error.code` of a finished render the video did not pass our checks after automatic repairs (red) – it stays charged, and you get one free rebuild. The status and charge mark of this entry refer to the HTTP response.

**Causes:**
- A disruption when starting the render (HTTP 503).
- The video stays red after the repairs, e.g. too much text for the length.
- The free rebuild stayed red as well.

**Fix:**
1. On HTTP 503: start again later with the same `Idempotency-Key`.
2. On a red render: check `free_rebuild_available` and call `POST /videos/{id}/render` with `{"free_rebuild": true}` (free, no price).
3. If the rebuild stays red too, the amount of this round is credited back to your balance; then change the flagged fields or write to us.
4. Read `error.charged` and `error.message` on the render.

**Charged:** Reservation released – nothing charged. · **Retry:** Try again later.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#render_failed",
  "title": "The video is being processed.",
  "status": 503,
  "code": "render_failed",
  "detail": "The video is being processed. Nothing was charged – please retry later.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#render_failed"
}
```

### `stylefilm_render_unavailable` – Stylefilm renders start shortly (HTTP 503) {#stylefilm_render_unavailable}

The video with a stylefilm template (`sf-…`) is created and checked, but the stylefilm renderer is not connected yet. A reservation was released.

**Causes:**
- The stylefilm renderer is not connected yet.
- The stylefilm renderer is briefly unavailable.

**Fix:**
1. Start the render again later (`POST /videos/{id}/render`).
2. Or use a template without `sf-` until then (`GET /templates`).

**Charged:** Reservation released – nothing charged. · **Retry:** Try again later.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#stylefilm_render_unavailable",
  "title": "Stylefilm renders start shortly.",
  "status": 503,
  "code": "stylefilm_render_unavailable",
  "detail": "The video is created and checked, but the stylefilm renderer is not connected yet. Nothing was charged – render again later.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#stylefilm_render_unavailable"
}
```

### `render_timeout` – Render took too long (HTTP 200) {#render_timeout}

**Reserved – the server does not send this code today.**

Meant as `error.code` of a render that took too long.

**Causes:**
- The server does not send this code at the moment; it is reserved for renders that time out.
- Today a render that does not succeed ends with `render_failed`.

**Fix:**
1. Handle the code like `render_failed`.
2. Check `error.charged` and `free_rebuild_available`.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#render_timeout",
  "title": "Render took too long.",
  "status": 200,
  "code": "render_timeout",
  "detail": "Render took too long. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#render_timeout"
}
```

### `files_expired` – Files expired (HTTP 410) {#files_expired}

**Reserved – the server does not send this code today.**

Meant for download links that are no longer valid.

**Causes:**
- The server does not send this code at the moment; it is reserved for expired files.
- Download links are valid for 24 hours (`expires_at`); after that the storage itself answers with an error.

**Fix:**
1. Get new links with `GET /renders/{id}` – every call creates fresh links.
2. Download files soon and store them on your side.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#files_expired",
  "title": "Files expired.",
  "status": 410,
  "code": "files_expired",
  "detail": "Files expired. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#files_expired"
}
```

## Webhooks {#gruppe-webhook}

### `too_many_webhooks` – At most 10 webhooks per account (HTTP 409) {#too_many_webhooks}

Each account can have at most 10 webhooks.

**Causes:**
- A new webhook was created for every environment or test.
- Old webhooks were never deleted.

**Fix:**
1. List the webhooks with `GET /webhooks`.
2. Delete old ones with `DELETE /webhooks/{id}`, or subscribe to several events in one webhook (`events`).
3. Then create the new webhook.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#too_many_webhooks",
  "title": "At most 10 webhooks per account.",
  "status": 409,
  "code": "too_many_webhooks",
  "detail": "At most 10 webhooks per account. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#too_many_webhooks"
}
```

### `webhook_url_not_allowed` – Only https:// is allowed (HTTP 422) {#webhook_url_not_allowed}

The webhook target address is not allowed. Only public `https://` addresses on port 443 are allowed. The title gives the reason.

**Causes:**
- `http://` instead of `https://`, or a port other than 443.
- Internal names (`localhost`, `.local`, `.internal`) or private IP ranges.
- Credentials in the URL, or a URL longer than 500 characters.

**Fix:**
1. Use a public `https://` address without port and credentials.
2. For local testing, use a public https tunnel.
3. Create the webhook again (`POST /webhooks`).

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `errors[]`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#webhook_url_not_allowed",
  "title": "Only https:// is allowed.",
  "status": 422,
  "code": "webhook_url_not_allowed",
  "detail": "Only https:// is allowed. Nothing was created – use a public https address.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#webhook_url_not_allowed",
  "errors": [
    {
      "path": "/url",
      "code": "not_allowed",
      "message": "Only https:// is allowed."
    }
  ]
}
```

## MCP (AI apps) {#gruppe-mcp}

### `confirmation_required` – Confirmation required (HTTP 402) {#confirmation_required}

Via MCP: the tool costs money (live mode) or changes the account. Instead of running it, you get a price card (`object: "price_confirmation"` or `"change_confirmation"`). It is not an error for the AI (`isError: false`); nothing was started.

**Causes:**
- The first call of a paid tool in live mode, e.g. `render_video`.
- Tools that change or delete always ask – also in test mode.

**Fix:**
1. Show the person `what` and `cost.text` (for consumers also `consumer_note`).
2. The person confirms themselves: the button in the card, the app's question (only up to €2.00 and never for deleting, keys, team) or the `confirm_url` with login. A "yes" in the chat does not count.
3. Then call the tool again with the same arguments plus `confirmation_id` – within 900 seconds (`expires_in_s`).

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `confirmation_id`, `confirm_url`, `cost`, `expires_in_s`, `next_step` · MCP

Example response:

```json
{
  "code": "confirmation_required",
  "title": "Confirmation required.",
  "detail": "Nothing was started or charged yet.",
  "object": "price_confirmation",
  "tool": "render_video",
  "what": "Render of video „Sunday delivery“",
  "cost": {
    "cents": 360,
    "gross_cents": 429,
    "currency": "eur",
    "text": "3,60 € netto zzgl. 19 % MwSt.",
    "tax_note": "Net price; VAT is added on the invoice (reverse charge for EU businesses with VAT ID)."
  },
  "confirmation_id": "cfm_…",
  "confirm_url": "https://flow-marketing.org/bestaetigen?b=cfm_…",
  "expires_in_s": 900
}
```

### `insufficient_scope` – This connection lacks a permission (HTTP 403) {#insufficient_scope}

Via MCP with OAuth sign-in: the connection lacks a permission for this tool. Note: the value is in the `error` field, not in `code`. `missing_scopes` lists the missing permissions.

**Causes:**
- The AI app was connected with the basic set of permissions only.
- The tool needs an account permission, e.g. to manage keys.

**Fix:**
1. Ask the person to reconnect Flow Marketing in the AI app and allow the permission.
2. For this the app gets the `mcp/www_authenticate` entry in `_meta`.
3. Then call the tool again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `error`, `missing_scopes`, `next_step` · MCP

Example response:

```json
{
  "code": "insufficient_scope",
  "title": "This connection lacks a permission.",
  "detail": "This connection lacks: keys:manage. Nothing was done.",
  "error": "insufficient_scope",
  "missing_scopes": [
    "keys:manage"
  ],
  "next_step": "This connection lacks a permission. Ask the user to reconnect Flow Marketing in the AI app and allow it."
}
```

### `awaiting_user_confirmation` – The user has not confirmed yet (HTTP 409) {#awaiting_user_confirmation}

Via MCP: the AI sent `confirmation_id`, but the person has not confirmed the price card yet. Nothing was started.

**Causes:**
- The AI calls the tool again right after the price card.
- The person typed "yes" in the chat instead of using the button or `confirm_url`.

**Fix:**
1. Ask the person to click the button in the card or open `confirm_url`.
2. Then call the tool again with the same `confirmation_id`.
3. Never confirm yourself – it is not technically possible either.

**Charged:** Nothing charged. · **Retry:** Try again later. · **Extra fields:** `confirmation_id`, `confirm_url`, `next_step` · MCP

Example response:

```json
{
  "code": "awaiting_user_confirmation",
  "title": "The user has not confirmed yet.",
  "detail": "The user has not confirmed this yet. Nothing was started or charged.",
  "confirmation_id": "cfm_…",
  "confirm_url": "https://flow-marketing.org/bestaetigen?b=cfm_…"
}
```

### `confirmation_invalid` – Confirmation invalid (HTTP 409) {#confirmation_invalid}

Via MCP: the confirmation no longer fits. It expired, was already used, belongs to other arguments, or price or video changed since the yes. Nothing was started.

**Causes:**
- More than 900 seconds since the price card.
- Different arguments than in the first call.
- The video was changed or the price differs (even if cheaper).
- `confirm_action` without a card UI in the app.

**Fix:**
1. Call the tool without `confirmation_id` to get a new price card.
2. Let the person confirm the new card.
3. Then call with the new `confirmation_id` and unchanged arguments.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `next_step` · MCP

Example response:

```json
{
  "code": "confirmation_invalid",
  "title": "Confirmation invalid.",
  "detail": "This confirmation is expired, already used or belongs to other arguments. Nothing was started or charged."
}
```

### `declined_by_user` – The user declined (HTTP 409) {#declined_by_user}

Via MCP: the person declined the price card or change. Nothing was started. If the decline comes via the in-chat question, the status is 200.

**Causes:**
- The person clicked "decline".
- The person said no to the app's question.

**Fix:**
1. Do nothing more.
2. Only ask again if the person explicitly wants it.

**Charged:** Nothing charged. · **Retry:** Do not retry. · **Extra fields:** `next_step` · MCP

Example response:

```json
{
  "code": "declined_by_user",
  "title": "The user declined.",
  "detail": "The user declined. Nothing was started or charged."
}
```

### `live_mode_required` – Live mode only (HTTP 409) {#live_mode_required}

Via MCP: avatar videos cost studio points and are only made in live mode. Test connections cannot create them.

**Causes:**
- `create_avatar_video` via a test connection.
- The AI app is connected in test mode.

**Fix:**
1. Tell the person they can reconnect Flow Marketing in live mode.
2. Or they use the Studio on the website.

**Charged:** Nothing charged. · **Retry:** Do not retry. · **Extra fields:** `next_step` · MCP

Example response:

```json
{
  "code": "live_mode_required",
  "title": "Live mode only.",
  "detail": "Avatar videos cost studio points and are only made in live mode (test connections cannot make them). Nothing was created or charged.",
  "next_step": "Tell the user; they can reconnect Flow Marketing in live mode or use the Studio on our website."
}
```

### `pricing_unavailable` – No price for this video yet (HTTP 409) {#pricing_unavailable}

Via MCP: there is no binding price for the price card yet because the video has no estimate. Nothing was started.

**Causes:**
- No price is set for live renders yet.
- The video has no length yet (e.g. still a draft).

**Fix:**
1. Check the video with `get_video` (field `estimate`).
2. Try again later or render in test mode.

**Charged:** Nothing charged. · **Retry:** Try again later. · MCP

Example response:

```json
{
  "code": "pricing_unavailable",
  "title": "No price for this video yet.",
  "detail": "No price is available for this video yet."
}
```

### `tokens_required` – AI media needs tokens (HTTP 409) {#tokens_required}

Via MCP: AI images, clips and print photos are billed in tokens only. This connection still bills in credits; nothing was created.

**Causes:**
- The AI app is connected via an account with credits, not tokens.
- An AI media tool was called in live mode.

**Fix:**
1. Tell the person that AI media comes with the switch to tokens.
2. Until then it works in the tool on the website: https://flow-marketing.org/ki-medien.

**Charged:** Nothing charged. · **Retry:** Do not retry. · **Extra fields:** `next_step` · MCP

Example response:

```json
{
  "code": "tokens_required",
  "title": "AI media needs tokens.",
  "detail": "AI media is billed in tokens only. This connection still uses credits, so nothing was created or charged."
}
```

### `not_available` – Not available yet (HTTP 503) {#not_available}

Via MCP: the tool is not available yet. Today this concerns creating API keys from inside the AI app.

**Causes:**
- `create_api_key` was called before the feature is enabled.
- The feature is switched off for a moment.

**Fix:**
1. Give the person the link to the account: https://flow-marketing.org/konto/api.
2. They create the key there themselves; never let them paste the key into the chat.

**Charged:** Nothing charged. · **Retry:** Do not retry. · **Extra fields:** `next_step` · MCP

Example response:

```json
{
  "code": "not_available",
  "title": "Not available yet.",
  "detail": "Not available yet. Create keys in the Flow Marketing account (API).",
  "next_step": "Give the user https://flow-marketing.org/konto/api"
}
```

## Account, top-up, key management {#gruppe-konto}

### `business_check_required` – For live keys we need your full billing address with country (street, postcode, city, country) (HTTP 403) {#business_check_required}

A live key (or a live connection of an AI app) only works once address and tax case fit. Test keys always work. In the developer area of the account the code is in capital letters in `error.code` (`BUSINESS_CHECK_REQUIRED`).

**Causes:**
- The billing address is incomplete: street, postcode, city or country is missing.
- A business in another EU country without a verified VAT ID.
- Seat outside the EU (not bookable at the moment).

**Fix:**
1. Complete the billing address with country in your Flow Marketing account.
2. Businesses in other EU countries: add the VAT ID.
3. Then create the live key again; test with `fm_test_…` until then.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#business_check_required",
  "title": "For live keys we need your full billing address with country (street, postcode, city, country).",
  "status": 403,
  "code": "business_check_required",
  "detail": "For live keys we need your full billing address with country (street, postcode, city, country). Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#business_check_required"
}
```

### `internal_account` – This account has no company for credits (HTTP 409) {#internal_account}

The action does not work with internal accounts or connections without a Flow Marketing account (top-up, starting credit, credits).

**Causes:**
- An internal test account tries to top up ("Internal accounts do not top up.").
- A connection bills in credits but belongs to no company.

**Fix:**
1. Use a regular account with a customer account.
2. For AI app connections: reconnect Flow Marketing with your own account.

**Charged:** Nothing charged. · **Retry:** Do not retry. · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#internal_account",
  "title": "This account has no company for credits.",
  "status": 409,
  "code": "internal_account",
  "detail": "This account has no company for credits. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#internal_account"
}
```

### `no_payment_method` – For auto top-up, first top up once and choose “save payment method” (HTTP 409) {#no_payment_method}

Auto top-up needs a saved payment method. Comes from the developer area of the Flow Marketing account, not from `/v1`; there the code is in capital letters in `error.code` (e.g. `NO_PAYMENT_METHOD`).

**Causes:**
- There was no top-up with "save payment method" yet.
- The saved payment method was deleted.

**Fix:**
1. Top up once and choose "save payment method".
2. Then switch auto top-up on.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#no_payment_method",
  "title": "For auto top-up, first top up once and choose “save payment method”.",
  "status": 409,
  "code": "no_payment_method",
  "detail": "For auto top-up, first top up once and choose “save payment method”. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#no_payment_method"
}
```

### `tax_case_blocked` – As a private person you can top up with residence in the EU (HTTP 409) {#tax_case_blocked}

Top-up is not possible for this tax case. `reason` gives the reason. Comes from the developer area of the Flow Marketing account, not from `/v1`; there the code is in capital letters in `error.code` (e.g. `TAX_CASE_BLOCKED`).

**Causes:**
- A private person living outside the EU (`privat_ausserhalb_eu`).
- A business in another EU country without a valid VAT ID (`eu_ohne_ustid`).
- A business outside the EU (`drittland`).

**Fix:**
1. Check country and address in your Flow Marketing account.
2. Businesses in other EU countries: add a valid VAT ID.
3. Start the top-up again afterwards.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again. · **Extra fields:** `reason`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#tax_case_blocked",
  "title": "As a private person you can top up with residence in the EU.",
  "status": 409,
  "code": "tax_case_blocked",
  "detail": "As a private person you can top up with residence in the EU. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#tax_case_blocked",
  "reason": "privat_ausserhalb_eu"
}
```

### `too_many_keys` – At most 25 active keys per account (HTTP 409) {#too_many_keys}

Each account can have at most 25 active keys. Comes from the developer area of the Flow Marketing account, not from `/v1`; there the code is in capital letters in `error.code` (e.g. `TOO_MANY_KEYS`).

**Causes:**
- A separate key was created for every environment or person.
- Old keys were never revoked.

**Fix:**
1. Revoke unused keys in your Flow Marketing account under API.
2. Then create the new key.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#too_many_keys",
  "title": "At most 25 active keys per account.",
  "status": 409,
  "code": "too_many_keys",
  "detail": "At most 25 active keys per account. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#too_many_keys"
}
```

### `invalid_amount` – Please top up between €20.00 and €5,000.00 net (HTTP 422) {#invalid_amount}

The amount for top-up or auto top-up is outside the range. Comes from the developer area of the Flow Marketing account, not from `/v1`; there the code is in capital letters in `error.code` (e.g. `INVALID_AMOUNT`).

**Causes:**
- A top-up below the minimum (default €20 net) or above €5,000 net.
- An auto top-up amount not between €10 and €1,000 net.

**Fix:**
1. Choose an amount within the range the title gives.
2. Send the form again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#invalid_amount",
  "title": "Please top up between €20.00 and €5,000.00 net.",
  "status": 422,
  "code": "invalid_amount",
  "detail": "Please top up between €20.00 and €5,000.00 net. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#invalid_amount"
}
```

### `invalid_cap` – The monthly cap must be at least one top-up amount (HTTP 422) {#invalid_cap}

The monthly cap for auto top-up is smaller than one top-up amount. Comes from the developer area of the Flow Marketing account, not from `/v1`; there the code is in capital letters in `error.code` (e.g. `INVALID_CAP`).

**Causes:**
- The cap is smaller than the top-up amount.
- The cap is above €10,000 net.

**Fix:**
1. Set the cap to at least the top-up amount.
2. Save the setting again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#invalid_cap",
  "title": "The monthly cap must be at least one top-up amount.",
  "status": 422,
  "code": "invalid_cap",
  "detail": "The monthly cap must be at least one top-up amount. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#invalid_cap"
}
```

### `invalid_limit` – Limit between €0 and €1,000,000 (HTTP 422) {#invalid_limit}

The monthly limit of the API account is outside the range. Comes from the developer area of the Flow Marketing account, not from `/v1`; there the code is in capital letters in `error.code` (e.g. `INVALID_LIMIT`).

**Causes:**
- A limit above €1,000,000.
- A negative value or not a whole number of cents.

**Fix:**
1. Choose a limit between €0 and €1,000,000.
2. Save the budget again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#invalid_limit",
  "title": "Limit between €0 and €1,000,000.",
  "status": 422,
  "code": "invalid_limit",
  "detail": "Limit between €0 and €1,000,000. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#invalid_limit"
}
```

### `invalid_month` – Give the month as YYYY-MM (HTTP 422) {#invalid_month}

The month for the monthly overview is not in the form `YYYY-MM`. Comes from the developer area of the Flow Marketing account, not from `/v1`; there the code is in capital letters in `error.code` (e.g. `INVALID_MONTH`).

**Causes:**
- The month given as `11/2026` or `2026-11-01`.
- A month outside 01 to 12.

**Fix:**
1. Give the month as `2026-11`.
2. Load the overview again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#invalid_month",
  "title": "Give the month as YYYY-MM.",
  "status": 422,
  "code": "invalid_month",
  "detail": "Give the month as YYYY-MM. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#invalid_month"
}
```

### `invalid_threshold` – Threshold between €0 and €1,000.00 (HTTP 422) {#invalid_threshold}

The auto top-up threshold is outside the range. Comes from the developer area of the Flow Marketing account, not from `/v1`; there the code is in capital letters in `error.code` (e.g. `INVALID_THRESHOLD`).

**Causes:**
- A threshold above €1,000.
- A negative or empty value.

**Fix:**
1. Choose a threshold between €0 and €1,000.
2. Save the setting again.

**Charged:** Nothing charged. · **Retry:** Fix first, then send again.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#invalid_threshold",
  "title": "Threshold between €0 and €1,000.00.",
  "status": 422,
  "code": "invalid_threshold",
  "detail": "Threshold between €0 and €1,000.00. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#invalid_threshold"
}
```

### `checkout_unavailable` – The payment page could not be opened (HTTP 502) {#checkout_unavailable}

The payment service did not return a payment page. Comes from the developer area of the Flow Marketing account, not from `/v1`; there the code is in capital letters in `error.code` (e.g. `CHECKOUT_UNAVAILABLE`).

**Causes:**
- A short disruption at the payment service.
- A timeout while opening the payment page.

**Fix:**
1. Try again after a few seconds.
2. If it keeps failing, write to us.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff).

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#checkout_unavailable",
  "title": "The payment page could not be opened.",
  "status": 502,
  "code": "checkout_unavailable",
  "detail": "The payment page could not be opened. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#checkout_unavailable"
}
```

### `payments_not_open` – Top-ups start shortly (HTTP 503) {#payments_not_open}

Top-ups by card or direct debit are not enabled yet. The starting credit can already be used. Comes from the developer area of the Flow Marketing account, not from `/v1`; there the code is in capital letters in `error.code` (e.g. `PAYMENTS_NOT_OPEN`).

**Causes:**
- Payments are not switched on yet on our side.
- Payments are switched off for a moment.

**Fix:**
1. Use the starting credit or test mode until then.
2. Try again later.

**Charged:** Nothing charged. · **Retry:** Try again later.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#payments_not_open",
  "title": "Top-ups start shortly.",
  "status": 503,
  "code": "payments_not_open",
  "detail": "Top-ups by card or direct debit start shortly. Nothing was charged. You can already use your starting credit.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#payments_not_open"
}
```

### `business_only` – The Flow Marketing API is for businesses only (HTTP 403) {#business_only}

**Reserved – the server does not send this code today.**

Private accounts used to get no API account. Since 21 Nov 2026 Flow Marketing including the API is open to businesses and private persons.

**Causes:**
- The server no longer sends this code; the check no longer knows the reason "private" and allows private accounts.
- Only old clients or texts still mention it.

**Fix:**
1. Handle the code like `business_check_required`: check the billing address with country in the account.
2. If it shows up anyway, write to us with the `request_id`.

**Charged:** Nothing charged. · **Retry:** Do not retry.

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#business_only",
  "title": "The Flow Marketing API is for businesses only.",
  "status": 403,
  "code": "business_only",
  "detail": "The Flow Marketing API is for businesses only. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#business_only"
}
```

## System {#gruppe-system}

### `internal_error` – Internal error. Please retry later (HTTP 500) {#internal_error}

An unexpected error happened on our side. Errors are not stored under the `Idempotency-Key`; retrying with the same key is safe.

**Causes:**
- A bug in our code.
- A partner service is disrupted (e.g. for AI media) and reports an error of 500 or above.
- A short database outage.

**Fix:**
1. Retry once with the same `Idempotency-Key` after a few seconds.
2. Then back off exponentially (e.g. 2 s, 4 s, 8 s) with jitter, only a few attempts.
3. If it persists, write to us with the `request_id`.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · MCP

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#internal_error",
  "title": "Internal error. Please retry later.",
  "status": 500,
  "code": "internal_error",
  "detail": "Internal error. Please retry later. Nothing was charged.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#internal_error"
}
```

### `maintenance` – Service temporarily unavailable (HTTP 503) {#maintenance}

The API is briefly unavailable, e.g. because the database does not answer. This response has no `request_id` and no `doc_url`.

**Causes:**
- Maintenance or restart.
- The database is briefly unreachable.

**Fix:**
1. Wait `Retry-After` seconds (60).
2. Retry with the same `Idempotency-Key`; on further errors back off exponentially with jitter.
3. Check the service status in the help center.

**Charged:** Nothing charged. · **Retry:** Retry with growing pauses (backoff). · **Headers:** `Retry-After`

Example response:

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#maintenance",
  "title": "Service temporarily unavailable.",
  "status": 503,
  "code": "maintenance",
  "detail": "The API is briefly unavailable. Nothing was charged – please retry in a minute.",
  "request_id": "req_9fK2mQ1xZp7LmN0pQrS3",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#maintenance"
}
```

## See also

- [Troubleshooting step by step](https://flow-marketing.org/en/help/api-troubleshooting)
- [Decision tree for AI agents](https://flow-marketing.org/en/help/guide-for-ai-agents)
- [Report a problem](https://flow-marketing.org/en/contact)
