{
    "openapi": "3.1.0",
    "info": {
        "title": "FlowCRM API",
        "version": "v1",
        "description": "REST API for managing customer data, leads, Kanban boards and timeline entries. Suited to CRM integrations, lead ingest pipelines, automations and custom customer management applications."
    },
    "servers": [
        {
            "url": "https://api.flowsuite.one",
            "description": "FlowSuite API"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "customers",
            "description": "Customer management"
        },
        {
            "name": "timeline",
            "description": "Timeline management"
        },
        {
            "name": "contacts",
            "description": "Contact management"
        },
        {
            "name": "projects",
            "description": "Project management"
        },
        {
            "name": "project-timeline",
            "description": "Project timeline"
        },
        {
            "name": "record-extras",
            "description": "To-dos, metadata and files"
        },
        {
            "name": "tags",
            "description": "Tags"
        },
        {
            "name": "leads",
            "description": "Lead management"
        },
        {
            "name": "lead-relations",
            "description": "Lead relations"
        },
        {
            "name": "lead-status",
            "description": "Lead status"
        },
        {
            "name": "lead-timeline",
            "description": "Lead timeline"
        },
        {
            "name": "lead-convert",
            "description": "Lead conversion"
        },
        {
            "name": "lead-reports",
            "description": "Lead reports"
        },
        {
            "name": "lead-boards",
            "description": "Lead boards"
        },
        {
            "name": "flowdoc",
            "description": "FlowDocs"
        }
    ],
    "paths": {
        "/clients": {
            "get": {
                "operationId": "customers-list",
                "summary": "List customers",
                "description": "Retrieves your team's customers, by default only the active ones. With status=archived you get the archived customers, with status=all both. Each customer includes its tags and sources. To address individual customers, use only the uuid field.",
                "tags": [
                    "customers"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Which customers are returned: <code>active</code> (default), <code>archived</code> or <code>all</code> for both. Any other value results in 422",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 500, default 500). The response also contains a <code>meta</code> block with <code>current_page</code>, <code>per_page</code>, <code>total</code> and <code>last_page</code>.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "count": 1,
                                    "data": [
                                        {
                                            "uuid": "123e4567-e89b-12d3-a456-426614174000",
                                            "name": "Doe GmbH",
                                            "email": "info@example.com",
                                            "phone": "+49 123 456789",
                                            "contact_person": null,
                                            "source": null,
                                            "whmcs_client_id": null,
                                            "external_id": null,
                                            "stripe_customer_id": null,
                                            "website": "https://example.com",
                                            "address_line_1": null,
                                            "address_line_2": null,
                                            "postal_code": "10115",
                                            "city": "Berlin",
                                            "state": null,
                                            "country": "DE",
                                            "currency": "EUR",
                                            "tax_id": null,
                                            "notes": null,
                                            "status": "active",
                                            "tags": [],
                                            "sources": [],
                                            "created_at": "2026-07-21T10:00:00+00:00",
                                            "updated_at": "2026-07-21T10:00:00+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "customers-create",
                "summary": "Create customer (find-or-create)",
                "description": "Creates a customer in the token's team. Idempotent through find-or-create: it first looks up a given external_id, then the email address (team-wide, case-insensitive). If an existing customer is found, including an archived one, the response returns it with created: false and only syncs the tag_uuids and sources that were sent. Only a genuinely new customer returns created: true (HTTP 201). If the email or external_id collides with a customer in the trash, the endpoint responds with HTTP 409.",
                "tags": [
                    "customers"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "8c1a5d2e-0f4b-4a9c-9d3e-2b7f0a6c1e44",
                                        "name": "Doe GmbH",
                                        "email": "info@example.com",
                                        "phone": "+49 30 123456",
                                        "contact_person": "Erika Musterfrau",
                                        "source": "messe-2026",
                                        "whmcs_client_id": null,
                                        "external_id": "MSG-4711",
                                        "stripe_customer_id": null,
                                        "website": null,
                                        "address_line_1": "Hauptstrasse 1",
                                        "address_line_2": null,
                                        "postal_code": "10115",
                                        "city": "Berlin",
                                        "state": null,
                                        "country": "DE",
                                        "currency": "EUR",
                                        "tax_id": null,
                                        "notes": null,
                                        "status": "active",
                                        "tags": [
                                            {
                                                "uuid": "b2c1a7a6-1249-4827-b533-ef1c65c1e273",
                                                "title": "VIP",
                                                "slug": "vip",
                                                "source": "api"
                                            }
                                        ],
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T10:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Customer name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address (used as the find-or-create key)"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Single source as free text"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Machine identifier for upsert matching (takes precedence over the email)"
                                    },
                                    "match_by_email": {
                                        "type": "boolean",
                                        "description": "Default <code>true</code>. Together with <code>external_id</code>, <code>false</code> skips matching by email and creates a separate customer"
                                    },
                                    "whmcs_client_id": {
                                        "type": "integer",
                                        "description": "Optional WHMCS client ID"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Address line 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Address line 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postal code"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country (ISO code or name)"
                                    },
                                    "contact_person": {
                                        "type": "string",
                                        "description": "Contact person"
                                    },
                                    "tax_id": {
                                        "type": "string",
                                        "description": "Tax number"
                                    },
                                    "vat_id": {
                                        "type": "string",
                                        "description": "Customer's VAT ID (max. 32 characters). Required for e-invoices with reverse charge"
                                    },
                                    "tax_treatment": {
                                        "type": "string",
                                        "description": "Tax treatment: standard (with VAT, default) | reverse_charge (EU, tax liability shifts to the recipient) | reverse_charge_domestic (§ 13b UStG, domestic) | intra_community_supply (tax-free intra-community supply) | export (tax-free export) | non_taxable_abroad (not taxable in Germany) | tax_exempt (tax-exempt under § 4 UStG). All values except standard produce documents without VAT. reverse_charge, reverse_charge_domestic and intra_community_supply are for business customers (B2B) only. reverse_charge_domestic and tax_exempt exist only under German law: a team whose tax profile does not apply German law cannot newly set them (422); a value that is already stored remains allowed."
                                    },
                                    "billing_language": {
                                        "type": "string",
                                        "description": "Customer's billing language: de (default) | en | pt. Used as the document language of new invoices that do not specify one"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of the team's own tag UUIDs from <code>GET /tags</code> to assign to the customer. An unknown, deleted or other team's UUID leads to HTTP 422, and nothing is created"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of sources as free text"
                                    },
                                    "stripe_customer_id": {
                                        "type": "string",
                                        "description": "Optional Stripe customer ID (prefix cus_), written to the payment mapping"
                                    }
                                },
                                "required": [
                                    "name",
                                    "email"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/search": {
            "get": {
                "operationId": "customers-search",
                "summary": "Search customers",
                "description": "Searches your team's customers by name, email address, phone number or website. By default only active customers are found; status includes archived ones.",
                "tags": [
                    "customers"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "description": "Search term for the customer search",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Which customers are returned: <code>active</code> (default), <code>archived</code> or <code>all</code> for both. Any other value results in 422",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 500, default 500). The response also contains a <code>meta</code> block with <code>current_page</code>, <code>per_page</code>, <code>total</code> and <code>last_page</code>.",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}": {
            "patch": {
                "operationId": "customers-update",
                "summary": "Update customer",
                "description": "Updates one of the team's customers by its UUID. Only fields that are explicitly sent are written; omitted fields stay unchanged, and a field with the value null counts as not sent. Archiving and reactivating: in FlowSuite, an inactive customer is called archived. status: archived archives the customer and its projects, status: active reactivates it; the projects stay archived and are reactivated individually. A customer deleted under the GDPR cannot be reactivated (422). Breaking change: the former numeric path /clients/{id} has been removed without replacement (HTTP 404); only the UUID path applies.",
                "tags": [
                    "customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8c1a5d2e-0f4b-4a9c-9d3e-2b7f0a6c1e44",
                                        "name": "Doe GmbH",
                                        "email": "info@example.com",
                                        "phone": "+49 30 999888",
                                        "contact_person": "Erika Musterfrau",
                                        "source": "messe-2026",
                                        "whmcs_client_id": null,
                                        "external_id": "MSG-4711",
                                        "stripe_customer_id": null,
                                        "website": null,
                                        "address_line_1": "Hauptstrasse 1",
                                        "address_line_2": null,
                                        "postal_code": "10115",
                                        "city": "Berlin",
                                        "state": null,
                                        "country": "DE",
                                        "currency": "EUR",
                                        "tax_id": null,
                                        "notes": null,
                                        "status": "active",
                                        "tags": [],
                                        "sources": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T11:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Customer name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "contact_person": {
                                        "type": "string",
                                        "description": "Contact person"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Website"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes about the customer"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "active | archived. Archives or reactivates the customer, see the description"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tag UUIDs to assign to the customer in addition. Existing tags are kept; to remove tags, use <code>PATCH /clients/{uuid}/metadata</code> with <code>remove_tag_uuids</code>"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources as free text to assign to the customer in addition"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Address line 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Address line 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postal code"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "State / region"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country"
                                    },
                                    "tax_id": {
                                        "type": "string",
                                        "description": "Tax number"
                                    },
                                    "vat_id": {
                                        "type": "string",
                                        "description": "Customer's VAT ID (max. 32 characters). Required for e-invoices with reverse charge"
                                    },
                                    "tax_treatment": {
                                        "type": "string",
                                        "description": "Tax treatment: standard | reverse_charge | reverse_charge_domestic | intra_community_supply | export | non_taxable_abroad | tax_exempt. reverse_charge, reverse_charge_domestic and intra_community_supply are for business customers (B2B) only. reverse_charge_domestic and tax_exempt exist only under German law: a team whose tax profile does not apply German law cannot newly set them (422); a value that is already stored remains allowed."
                                    },
                                    "billing_language": {
                                        "type": "string",
                                        "description": "Customer's billing language: de | en | pt"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "get": {
                "operationId": "customers-show",
                "summary": "Get customer",
                "description": "Retrieves a single customer of your team by its uuid. Unknown customers or customers of other teams result in 404.",
                "tags": [
                    "customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "customers-delete",
                "summary": "Delete customer (GDPR)",
                "description": "Deletes the customer in line with the GDPR. Accounting documents subject to retention requirements are kept. A customer deleted this way cannot be restored. If a customer should only disappear from your active records, archive it instead with PATCH /clients/{uuid} and status: archived.",
                "tags": [
                    "customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include_export",
                        "in": "query",
                        "required": false,
                        "description": "With <code>true</code>, the response also contains the customer's GDPR data export",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/lookup": {
            "get": {
                "operationId": "customers-lookup",
                "summary": "Look up customer",
                "description": "Exact search for exactly one customer, without ever creating one. By default only active customers are found; status includes archived ones. At least one of the parameters is required. If several are given, the fixed order is external_id, then customer_number, then custom field (custom_field_uuid with custom_field_value), then email (case-insensitive). duplicate_count gives the number of matches, data contains the oldest one.",
                "tags": [
                    "customers"
                ],
                "parameters": [
                    {
                        "name": "external_id",
                        "in": "query",
                        "required": false,
                        "description": "External identifier of the customer (max. 255)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "customer_number",
                        "in": "query",
                        "required": false,
                        "description": "Customer number (max. 255)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "custom_field_uuid",
                        "in": "query",
                        "required": false,
                        "description": "UUID of a custom field of this team. Only together with <code>custom_field_value</code>. Another team's UUID behaves like an unknown one (422). Reference and multi-select fields are not supported",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "custom_field_value",
                        "in": "query",
                        "required": false,
                        "description": "Exact value of the custom field, exactly as it is written (dates as YYYY-MM-DD, select fields as the option value). Only together with <code>custom_field_uuid</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "required": false,
                        "description": "Email address (max. 255)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Which customers are returned: <code>active</code> (default), <code>archived</code> or <code>all</code> for both. Any other value results in 422",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/restore": {
            "post": {
                "operationId": "customers-restore",
                "summary": "Restore customer",
                "description": "Brings a customer back from the trash. This endpoint is not meant for archived customers; they are reactivated with PATCH /clients/{uuid} and status: active. A customer that is not deleted is returned unchanged; the response states whether a restore took place. Customers deleted under the GDPR are excluded.",
                "tags": [
                    "customers"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline": {
            "get": {
                "operationId": "timeline-list",
                "summary": "List timeline entries",
                "description": "Retrieves all timeline entries for a given customer in chronological order. Each entry includes its uuid for updating and deleting.",
                "tags": [
                    "timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "client": {
                                        "uuid": "5b1c8a52-7f0e-4d0b-b5a4-2f6f0e7d9c10",
                                        "name": "Muster GmbH"
                                    },
                                    "timeline": [
                                        {
                                            "uuid": "0d6f5b0e-3c1a-4a52-9a53-0c8c1f1f2a11",
                                            "type": "note",
                                            "title": "",
                                            "content": "Angebot per E-Mail verschickt.",
                                            "event_date": "2026-10-07T09:30:00.000000Z",
                                            "formatted_date": "07.10.2026 09:30",
                                            "relative_date": "vor 2 Stunden",
                                            "user": "John Doe",
                                            "automatic": false,
                                            "editable": true,
                                            "created_at": "2026-10-07T09:31:12.000000Z"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "timeline-create",
                "summary": "Create timeline entry",
                "description": "Creates a new timeline entry for the given customer. Like every timeline change, this requires FlowCRM write access, otherwise HTTP 403. If one of your own entries with identical content and an identical event_date already exists, no second one is created: the response is then HTTP 200 with duplicate: true and the existing entry. Without event_date, a new entry is always created.",
                "tags": [
                    "timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Timeline entry created successfully",
                                    "duplicate": false,
                                    "timeline_entry": {
                                        "uuid": "0d6f5b0e-3c1a-4a52-9a53-0c8c1f1f2a11",
                                        "type": "note",
                                        "title": "",
                                        "content": "Angebot per E-Mail verschickt.",
                                        "event_date": "2026-10-07T09:30:00.000000Z",
                                        "formatted_date": "07.10.2026 09:30",
                                        "relative_date": "vor 2 Stunden",
                                        "user": "John Doe",
                                        "automatic": false,
                                        "editable": true,
                                        "created_at": "2026-10-07T09:31:12.000000Z"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Text of the entry. Older clients that send only title remain valid: the title is then stored as the text."
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Event date (ISO 8601, default: now)"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Deprecated. Discarded when sent alongside content; sent on its own, it is stored as content."
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline/{entry_uuid}": {
            "patch": {
                "operationId": "timeline-update",
                "summary": "Update timeline entry",
                "description": "Corrects one of your own manually written entries. Entries by other people and automatically generated entries, for example from a meeting assignment, respond with HTTP 403 and keep their source.",
                "tags": [
                    "timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "entry_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "New content"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Deprecated. Accepted but not stored."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "note, meeting, email, call, text, coffee, food, networking, party or other"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "New point in time"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "timeline-delete",
                "summary": "Delete timeline entry",
                "description": "Removes one of your own manually written entries.",
                "tags": [
                    "timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "entry_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline/bulk-delete": {
            "post": {
                "operationId": "timeline-bulk-delete",
                "summary": "Delete multiple timeline entries",
                "description": "Removes up to 200 of your own manually written entries for a customer in one call. Each entry follows the same rule as a single delete. Other people's, automatically generated and unknown entries do not abort the call; they appear in results with their outcome.",
                "tags": [
                    "timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "deleted": 1,
                                    "skipped": 1,
                                    "results": [
                                        {
                                            "uuid": "0d6f5b0e-3c1a-4a52-9a53-0c8c1f1f2a11",
                                            "status": "deleted"
                                        },
                                        {
                                            "uuid": "7a2e4c90-91d3-4f6b-8e0a-5b3c2d1e0f99",
                                            "status": "forbidden",
                                            "message": "Nur eigene Timeline-Einträge können bearbeitet werden."
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "entry_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of entry UUIDs to delete (1 to 200, each only once)"
                                    }
                                },
                                "required": [
                                    "entry_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/timeline/search": {
            "get": {
                "operationId": "timeline-search",
                "summary": "Search timeline",
                "description": "Searches a customer's timeline entries by content. For older entries, the former title is searched as well. Matches have the same shape as in the list.",
                "tags": [
                    "timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": true,
                        "description": "Search term",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts": {
            "get": {
                "operationId": "contacts-list",
                "summary": "List contacts",
                "description": "Lists the contacts the key in use is allowed to see: shared team contacts and your own private contacts.",
                "tags": [
                    "contacts"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Searches first name, last name, company and stored email addresses and phone numbers",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only contacts of the given customer",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "<code>active</code> (default), <code>archived</code> or <code>all</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "visibility",
                        "in": "query",
                        "required": false,
                        "description": "<code>team</code> or <code>private</code>; both if omitted",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "custom_field_uuid",
                        "in": "query",
                        "required": false,
                        "description": "UUID of a custom field of this team. Only together with <code>custom_field_value</code>. Another team's UUID behaves like an unknown one (422). Reference and multi-select fields are not supported",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "custom_field_value",
                        "in": "query",
                        "required": false,
                        "description": "Exact value of the custom field (dates as YYYY-MM-DD, select fields as the option value). Only together with <code>custom_field_uuid</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "123e4567-e89b-12d3-a456-426614174000",
                                            "first_name": "Anna",
                                            "last_name": "Beispiel",
                                            "company": "Doe GmbH",
                                            "visibility": "team",
                                            "status": "active",
                                            "external_source": null,
                                            "external_id": null,
                                            "emails": [
                                                {
                                                    "uuid": "7a3f1c44-1b2d-4e8a-9c11-5d6e7f8a9b0c",
                                                    "label": "Geschäftlich",
                                                    "email": "anna@example.com",
                                                    "is_primary": true
                                                }
                                            ]
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "contacts-create",
                "summary": "Create contact",
                "description": "Creates a contact. At least a first or last name is required. If client_uuid is set, the contact is created directly as a team contact of the given customer. Email, sources, custom fields and external identifier are written in the same step. With external_source and external_id, the call can be repeated safely: a contact that is already known is returned unchanged with created: false and HTTP 200, even if it is archived (status shows this); new contacts respond with 201. Identifiers belonging to a deleted contact lead to 409, and the contact is neither restored nor created again. External identifiers apply only to team contacts; for private contacts they lead to 422.",
                "tags": [
                    "contacts"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "salutation": {
                                        "type": "string",
                                        "description": "Herr, Frau, Divers, Firma or keine (Mr, Ms, diverse, company or none)"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Title, such as Dr. or Prof."
                                    },
                                    "job_title": {
                                        "type": "string",
                                        "description": "Position in the company"
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Company name"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Free text about the person"
                                    },
                                    "birth_day": {
                                        "type": "integer",
                                        "description": "Day of birth, 1 to 31"
                                    },
                                    "birth_month": {
                                        "type": "integer",
                                        "description": "Month of birth, 1 to 12"
                                    },
                                    "birth_year": {
                                        "type": "integer",
                                        "description": "Year of birth"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Customer the contact belongs to"
                                    },
                                    "visibility": {
                                        "type": "string",
                                        "description": "<code>team</code> (default) or <code>private</code>"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address, stored as the primary address"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources as free text (max. 20)"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Custom fields as for leads: entries with <code>definition_uuid</code> or <code>name</code> and <code>value</code>"
                                    },
                                    "external_source": {
                                        "type": "string",
                                        "description": "Source system of the external identifier. Only together with <code>external_id</code>"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Identifier in the source system, unique per team and <code>external_source</code>. Only together with <code>external_source</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}": {
            "get": {
                "operationId": "contacts-show",
                "summary": "Get contact",
                "description": "Returns a contact with all value collections: email addresses, phone numbers, addresses, links, profiles, dates and free fields.",
                "tags": [
                    "contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "contacts-update",
                "summary": "Update contact",
                "description": "Changes only the fields that are sent. status lets you archive a contact and reactivate it. First and last name must not both become empty.",
                "tags": [
                    "contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "salutation": {
                                        "type": "string",
                                        "description": "Herr, Frau, Divers, Firma or keine (Mr, Ms, diverse, company or none)"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Title"
                                    },
                                    "job_title": {
                                        "type": "string",
                                        "description": "Position in the company"
                                    },
                                    "company": {
                                        "type": "string",
                                        "description": "Company name"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Free text about the person"
                                    },
                                    "birth_day": {
                                        "type": "integer",
                                        "description": "Day of birth"
                                    },
                                    "birth_month": {
                                        "type": "integer",
                                        "description": "Month of birth"
                                    },
                                    "birth_year": {
                                        "type": "integer",
                                        "description": "Year of birth"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "<code>active</code> or <code>archived</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "contacts-delete",
                "summary": "Delete contact",
                "description": "Moves the contact to the trash, just like the contact list in the app. If you only want to hide the contact temporarily, set status: archived instead.",
                "tags": [
                    "contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/client": {
            "put": {
                "operationId": "contacts-assign-client",
                "summary": "Assign contact to a customer",
                "description": "Assigns the contact to a customer, or removes the assignment with client_uuid: null. A previously private contact is deliberately shared with the team in the process. If the customer has no contact person yet, it takes over this contact's name.",
                "tags": [
                    "contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Customer, or <code>null</code> to remove the assignment"
                                    }
                                },
                                "required": [
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/values/{collection}": {
            "post": {
                "operationId": "contacts-value-create",
                "summary": "Add contact value",
                "description": "Adds exactly one value to a collection. Available collections: emails, phones, addresses, links, socials, dates, customs. At most one value per collection can be is_primary; a new primary value replaces the previous one.",
                "tags": [
                    "contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "collection",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Label, such as work or home. For <code>socials</code>, use <code>platform</code> instead"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Only for <code>emails</code>"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Only for <code>phones</code>"
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Only for <code>links</code> and <code>socials</code>"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Only for <code>dates</code>, in the format YYYY-MM-DD"
                                    },
                                    "value": {
                                        "type": "string",
                                        "description": "Only for <code>customs</code>"
                                    },
                                    "is_primary": {
                                        "type": "boolean",
                                        "description": "Only for <code>emails</code>, <code>phones</code> and <code>addresses</code>"
                                    }
                                },
                                "required": [
                                    "label"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/values/{collection}/{value_uuid}": {
            "patch": {
                "operationId": "contacts-value-update",
                "summary": "Update contact value",
                "description": "Changes exactly one value. Only the fields that actually changed need to be sent. For addresses, stored coordinates are discarded as soon as an address field changes.",
                "tags": [
                    "contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "collection",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "value_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Label of the value"
                                    },
                                    "is_primary": {
                                        "type": "boolean",
                                        "description": "Makes the value the primary value of the collection"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "contacts-value-delete",
                "summary": "Remove contact value",
                "description": "Removes exactly one value from the given collection.",
                "tags": [
                    "contacts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "collection",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "value_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects": {
            "get": {
                "operationId": "projects-list",
                "summary": "List customer projects",
                "description": "Lists all projects of the given customer, including status, description and a modules array with active integrations (flowcall, flowtime, flowtasks).",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "projects-create-for-client",
                "summary": "Create project for a customer",
                "description": "Like \"Create project\", but the customer is already in the path and does not need to be repeated in the body.",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Project name"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects": {
            "get": {
                "operationId": "projects-list-all",
                "summary": "List all projects",
                "description": "Lists the team's projects across all customers.",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "client_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Only projects of the given customer",
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Searches the project name",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "<code>active</code> (default), <code>archived</code> or <code>all</code>",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "projects-create",
                "summary": "Create project",
                "description": "Creates a project for the given customer.",
                "tags": [
                    "projects"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Project name"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Customer the project belongs to"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes"
                                    },
                                    "budget_type": {
                                        "type": "string",
                                        "description": "<code>hours</code> or <code>amount</code>"
                                    },
                                    "budget_value": {
                                        "type": "number",
                                        "description": "Budget value"
                                    },
                                    "budget_currency": {
                                        "type": "string",
                                        "description": "Currency as a three-letter code"
                                    },
                                    "budget_interval": {
                                        "type": "string",
                                        "description": "<code>total</code>, <code>monthly</code> or <code>daily</code>"
                                    },
                                    "budget_enforcement": {
                                        "type": "string",
                                        "description": "<code>soft</code> or <code>hard</code>"
                                    }
                                },
                                "required": [
                                    "name",
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}": {
            "get": {
                "operationId": "projects-show",
                "summary": "Get project",
                "description": "Returns a single project including budget details and active modules.",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "projects-update",
                "summary": "Update project",
                "description": "Changes only the fields that are sent. client_uuid lets you move a project to another customer of the same team, and status lets you archive and reactivate it.",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Project name"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Internal notes"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "New customer of the project"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "<code>active</code> or <code>archived</code>"
                                    },
                                    "budget_type": {
                                        "type": "string",
                                        "description": "<code>hours</code> or <code>amount</code>"
                                    },
                                    "budget_value": {
                                        "type": "number",
                                        "description": "Budget value"
                                    },
                                    "budget_currency": {
                                        "type": "string",
                                        "description": "Currency as a three-letter code"
                                    },
                                    "budget_interval": {
                                        "type": "string",
                                        "description": "<code>total</code>, <code>monthly</code> or <code>daily</code>"
                                    },
                                    "budget_enforcement": {
                                        "type": "string",
                                        "description": "<code>soft</code> or <code>hard</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "projects-archive",
                "summary": "Archive project",
                "description": "Archives the project. It is kept because time tracking, invoices and task boards still refer to it.",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects/{project_uuid}/timeline": {
            "get": {
                "operationId": "project-timeline-list",
                "summary": "Get project timeline",
                "description": "Retrieves all timeline entries for a given project, like the customer timeline and in the same shape, including a uuid per entry.",
                "tags": [
                    "project-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "project-timeline-create",
                "summary": "Create project timeline entry",
                "description": "Appends an entry to the project timeline. Author and team are derived from the key and cannot be set in the body. One of your own entries with identical content, type and event_date is not created twice; the response is then HTTP 200 with duplicate: true.",
                "tags": [
                    "project-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Content of the entry"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Deprecated. Accepted but not stored."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "note (default), meeting, email, call, text, coffee, food, networking, party or other"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Time of the event; now if omitted"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects/{project_uuid}/timeline/{entry_uuid}": {
            "patch": {
                "operationId": "project-timeline-update",
                "summary": "Update project timeline entry",
                "description": "Corrects one of your own manually written entries. Entries by other people and automatically generated entries respond with HTTP 403.",
                "tags": [
                    "project-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "entry_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "New content"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Deprecated. Accepted but not stored."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "New type"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "New point in time"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "project-timeline-delete",
                "summary": "Delete project timeline entry",
                "description": "Removes one of your own manually written entries.",
                "tags": [
                    "project-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "entry_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/projects/{project_uuid}/timeline/bulk-delete": {
            "post": {
                "operationId": "project-timeline-bulk-delete",
                "summary": "Delete multiple project timeline entries",
                "description": "Removes up to 200 of your own manually written entries for a project in one call. Rules and response match the bulk delete of the customer timeline.",
                "tags": [
                    "project-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "entry_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of entry UUIDs to delete (1 to 200, each only once)"
                                    }
                                },
                                "required": [
                                    "entry_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/todos": {
            "get": {
                "operationId": "clients-todos-list",
                "summary": "List to-dos (customers)",
                "description": "Lists the record's to-dos. Completed to-dos only appear with include_completed=1.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include_completed",
                        "in": "query",
                        "required": false,
                        "description": "Include completed to-dos",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "clients-todos-create",
                "summary": "Create to-do (customers)",
                "description": "Creates a to-do on the record. Assignees are specified by their user UUID and must belong to the API key's team. With recurring_interval you create a series, i.e. a to-do that moves itself to the next date each time it is completed. A series requires a due_date and cannot be created as already completed; otherwise the request returns HTTP 422.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> (default) or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Create as already completed. Cannot be combined with <code>recurring_interval</code>"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> or <code>yearly</code>. Requires <code>due_date</code>"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/todos/{todo_uuid}": {
            "patch": {
                "operationId": "clients-todos-update",
                "summary": "Update to-do (customers)",
                "description": "Changes only the fields you send. Use completed to complete or reopen a to-do. Omitting assigned_user_uuids leaves the assignment unchanged; an empty value removes it. For a series (a to-do with recurring_interval), completed: true completes only the current occurrence: the to-do stays open, its due_date advances by one interval, and the completed occurrence is stored as a separate, completed to-do. data is always the addressed to-do, so for a series it still has completed: false and the new due_date. The completed occurrence is returned alongside it in the response field completed_occurrence; in all other cases this field is null. Reopening (completed: false) applies to simple to-dos and to completed occurrences; the series itself is never completed. The due_date of a series cannot be changed directly (HTTP 422). A repeated call would also complete the next occurrence: if you send expected_due_date, you instead receive HTTP 409 with the current date in current_due_date once the series has already advanced.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3f6c1b2a-9d4e-4c7f-8a1b-5e2d7c9f0a11",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-16",
                                        "priority": "medium",
                                        "completed": false,
                                        "completed_at": null,
                                        "recurring_interval": "weekly",
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-01T08:00:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    },
                                    "completed_occurrence": {
                                        "uuid": "b81d4c7e-2a5f-4e3b-9c6d-1f0a8e7b6c22",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-09",
                                        "priority": "medium",
                                        "completed": true,
                                        "completed_at": "2026-10-09T09:30:00+00:00",
                                        "recurring_interval": null,
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-09T09:30:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Completion state. For a series, <code>true</code> completes only the current occurrence"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> or <code>yearly</code>. Requires a <code>due_date</code>; <code>null</code> ends the series"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Only when completing a series: the date in the format YYYY-MM-DD that the caller currently sees. If it differs from the current <code>due_date</code>, the endpoint returns HTTP 409 and completes nothing"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "clients-todos-delete",
                "summary": "Delete to-do (customers)",
                "description": "Removes the to-do.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/metadata": {
            "get": {
                "operationId": "clients-metadata-show",
                "summary": "Get metadata (customers)",
                "description": "Returns the record's tags, sources and custom fields, along with the tags and custom field definitions available in the team. A definition with api_managed: true can only be written via the API and is read-only in the user interface. Custom fields of type reference are returned with the UUID and the name of the target. Each definition states its type: text, textarea, number, url, dropdown, multiselect, reference, date or currency. For dropdown and multiselect, options lists the selectable options with label and value; the value of a multiselect field is a list of option values such as [\"gold\", \"silber\"]. For number and currency, decimals holds the number of allowed decimal places, and for currency, currency additionally holds the field's fixed ISO 4217 code; for all other types both are null. Values of type date use the format YYYY-MM-DD; values of type currency are a decimal number with a period as the decimal separator and state the currency code in currency.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "tags": [],
                                        "available_tags": [],
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "custom_field_definitions": [
                                            {
                                                "uuid": "7c1f9a3b-42d5-4e88-9a10-b6c3f2d51e04",
                                                "name": "Branche",
                                                "type": "text",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "reference_source": null,
                                                "decimals": 2,
                                                "currency": "EUR",
                                                "options": []
                                            }
                                        ],
                                        "custom_field_values": [
                                            {
                                                "definition_uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "value": "2026-12-31",
                                                "currency": null,
                                                "reference": null
                                            },
                                            {
                                                "definition_uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "value": "12500.00",
                                                "currency": "EUR",
                                                "reference": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "clients-metadata-update",
                "summary": "Update metadata (customers)",
                "description": "Adds or removes individual tags, sources and custom field values. Nothing is replaced as a whole; an empty value deletes the respective custom field. Custom fields are identified by definition_uuid or their unique name; for reference fields, the value is the UUID of the target. Fields of type multiselect expect a list of option values from options that completely replaces the previous selection; an empty list deletes the field. Fields of type date expect a date in the format YYYY-MM-DD; fields of type currency expect an amount as a number or numeric string without a currency symbol and without thousands separators. The amount may have at most as many decimal places as the definition specifies in decimals and is stored padded to that number of places. A value that does not match the type results in HTTP 422 with the field reference custom_fields.{index}; nothing is changed in that case.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "add_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to add"
                                    },
                                    "remove_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to remove"
                                    },
                                    "add_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to add"
                                    },
                                    "remove_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to remove"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Entries consisting of <code>definition_uuid</code> or <code>name</code> and <code>value</code>. For <code>date</code>, <code>value</code> is a date such as <code>\"2026-12-31\"</code>; for <code>currency</code>, an amount such as <code>12500.5</code> or <code>\"12500.50\"</code>; for <code>multiselect</code>, a list such as <code>[\"gold\", \"silber\"]</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/files": {
            "get": {
                "operationId": "clients-files-list",
                "summary": "List files (customers)",
                "description": "Lists the record's files. has_document_source indicates whether the file was generated from Markdown and can therefore be revised instead of replaced.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "clients-files-upload",
                "summary": "Upload file (customers)",
                "description": "Attaches an uploaded file to the record. Transfer as multipart/form-data, at most 50 MB. File types that are not allowed return HTTP 422.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file to upload"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Alternative file name"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/files/{file_uuid}/download": {
            "get": {
                "operationId": "clients-files-download",
                "summary": "Download link for a file (customers)",
                "description": "Returns a short-lived download link along with its validity in seconds. The response contains the link, not the file contents.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/files/{file_uuid}/text": {
            "get": {
                "operationId": "clients-files-text",
                "summary": "Read the text of a file (customers)",
                "description": "Returns the already extracted text of the file in chunks of 20,000 characters. The endpoint is read-only; it does not trigger a new extraction.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Start position in the text; <code>next_offset</code> in the response leads to the next chunk",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/documents": {
            "post": {
                "operationId": "clients-documents-render",
                "summary": "Generate document from Markdown (customers)",
                "description": "Generates a PDF or Word document from Markdown and stores it on the record. With file_uuid, an existing version generated the same way is revised instead of a second one being added next to it.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title, also used as the file name without extension"
                                    },
                                    "source_markdown": {
                                        "type": "string",
                                        "description": "The content as Markdown"
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "<code>pdf</code> or <code>docx</code>"
                                    },
                                    "file_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Existing version to be replaced"
                                    }
                                },
                                "required": [
                                    "title",
                                    "source_markdown",
                                    "format"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/todos": {
            "get": {
                "operationId": "contacts-todos-list",
                "summary": "List to-dos (contacts)",
                "description": "Lists the record's to-dos. Completed to-dos only appear with include_completed=1.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include_completed",
                        "in": "query",
                        "required": false,
                        "description": "Include completed to-dos",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "contacts-todos-create",
                "summary": "Create to-do (contacts)",
                "description": "Creates a to-do on the record. Assignees are specified by their user UUID and must belong to the API key's team. With recurring_interval you create a series, i.e. a to-do that moves itself to the next date each time it is completed. A series requires a due_date and cannot be created as already completed; otherwise the request returns HTTP 422.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> (default) or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Create as already completed. Cannot be combined with <code>recurring_interval</code>"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> or <code>yearly</code>. Requires <code>due_date</code>"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/todos/{todo_uuid}": {
            "patch": {
                "operationId": "contacts-todos-update",
                "summary": "Update to-do (contacts)",
                "description": "Changes only the fields you send. Use completed to complete or reopen a to-do. Omitting assigned_user_uuids leaves the assignment unchanged; an empty value removes it. For a series (a to-do with recurring_interval), completed: true completes only the current occurrence: the to-do stays open, its due_date advances by one interval, and the completed occurrence is stored as a separate, completed to-do. data is always the addressed to-do, so for a series it still has completed: false and the new due_date. The completed occurrence is returned alongside it in the response field completed_occurrence; in all other cases this field is null. Reopening (completed: false) applies to simple to-dos and to completed occurrences; the series itself is never completed. The due_date of a series cannot be changed directly (HTTP 422). A repeated call would also complete the next occurrence: if you send expected_due_date, you instead receive HTTP 409 with the current date in current_due_date once the series has already advanced.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3f6c1b2a-9d4e-4c7f-8a1b-5e2d7c9f0a11",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-16",
                                        "priority": "medium",
                                        "completed": false,
                                        "completed_at": null,
                                        "recurring_interval": "weekly",
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-01T08:00:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    },
                                    "completed_occurrence": {
                                        "uuid": "b81d4c7e-2a5f-4e3b-9c6d-1f0a8e7b6c22",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-09",
                                        "priority": "medium",
                                        "completed": true,
                                        "completed_at": "2026-10-09T09:30:00+00:00",
                                        "recurring_interval": null,
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-09T09:30:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Completion state. For a series, <code>true</code> completes only the current occurrence"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> or <code>yearly</code>. Requires a <code>due_date</code>; <code>null</code> ends the series"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Only when completing a series: the date in the format YYYY-MM-DD that the caller currently sees. If it differs from the current <code>due_date</code>, the endpoint returns HTTP 409 and completes nothing"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "contacts-todos-delete",
                "summary": "Delete to-do (contacts)",
                "description": "Removes the to-do.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/metadata": {
            "get": {
                "operationId": "contacts-metadata-show",
                "summary": "Get metadata (contacts)",
                "description": "Returns the record's tags, sources and custom fields, along with the tags and custom field definitions available in the team. A definition with api_managed: true can only be written via the API and is read-only in the user interface. Custom fields of type reference are returned with the UUID and the name of the target. Each definition states its type: text, textarea, number, url, dropdown, multiselect, reference, date or currency. For dropdown and multiselect, options lists the selectable options with label and value; the value of a multiselect field is a list of option values such as [\"gold\", \"silber\"]. For number and currency, decimals holds the number of allowed decimal places, and for currency, currency additionally holds the field's fixed ISO 4217 code; for all other types both are null. Values of type date use the format YYYY-MM-DD; values of type currency are a decimal number with a period as the decimal separator and state the currency code in currency.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "tags": [],
                                        "available_tags": [],
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "custom_field_definitions": [
                                            {
                                                "uuid": "7c1f9a3b-42d5-4e88-9a10-b6c3f2d51e04",
                                                "name": "Branche",
                                                "type": "text",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "reference_source": null,
                                                "decimals": 2,
                                                "currency": "EUR",
                                                "options": []
                                            }
                                        ],
                                        "custom_field_values": [
                                            {
                                                "definition_uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "value": "2026-12-31",
                                                "currency": null,
                                                "reference": null
                                            },
                                            {
                                                "definition_uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "value": "12500.00",
                                                "currency": "EUR",
                                                "reference": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "contacts-metadata-update",
                "summary": "Update metadata (contacts)",
                "description": "Adds or removes individual tags, sources and custom field values. Nothing is replaced as a whole; an empty value deletes the respective custom field. Custom fields are identified by definition_uuid or their unique name; for reference fields, the value is the UUID of the target. Fields of type multiselect expect a list of option values from options that completely replaces the previous selection; an empty list deletes the field. Fields of type date expect a date in the format YYYY-MM-DD; fields of type currency expect an amount as a number or numeric string without a currency symbol and without thousands separators. The amount may have at most as many decimal places as the definition specifies in decimals and is stored padded to that number of places. A value that does not match the type results in HTTP 422 with the field reference custom_fields.{index}; nothing is changed in that case.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "add_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to add"
                                    },
                                    "remove_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to remove"
                                    },
                                    "add_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to add"
                                    },
                                    "remove_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to remove"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Entries consisting of <code>definition_uuid</code> or <code>name</code> and <code>value</code>. For <code>date</code>, <code>value</code> is a date such as <code>\"2026-12-31\"</code>; for <code>currency</code>, an amount such as <code>12500.5</code> or <code>\"12500.50\"</code>; for <code>multiselect</code>, a list such as <code>[\"gold\", \"silber\"]</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/files": {
            "get": {
                "operationId": "contacts-files-list",
                "summary": "List files (contacts)",
                "description": "Lists the record's files. has_document_source indicates whether the file was generated from Markdown and can therefore be revised instead of replaced.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "contacts-files-upload",
                "summary": "Upload file (contacts)",
                "description": "Attaches an uploaded file to the record. Transfer as multipart/form-data, at most 50 MB. File types that are not allowed return HTTP 422.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file to upload"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Alternative file name"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/files/{file_uuid}/download": {
            "get": {
                "operationId": "contacts-files-download",
                "summary": "Download link for a file (contacts)",
                "description": "Returns a short-lived download link along with its validity in seconds. The response contains the link, not the file contents.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/files/{file_uuid}/text": {
            "get": {
                "operationId": "contacts-files-text",
                "summary": "Read the text of a file (contacts)",
                "description": "Returns the already extracted text of the file in chunks of 20,000 characters. The endpoint is read-only; it does not trigger a new extraction.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Start position in the text; <code>next_offset</code> in the response leads to the next chunk",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/documents": {
            "post": {
                "operationId": "contacts-documents-render",
                "summary": "Generate document from Markdown (contacts)",
                "description": "Generates a PDF or Word document from Markdown and stores it on the record. With file_uuid, an existing version generated the same way is revised instead of a second one being added next to it.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title, also used as the file name without extension"
                                    },
                                    "source_markdown": {
                                        "type": "string",
                                        "description": "The content as Markdown"
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "<code>pdf</code> or <code>docx</code>"
                                    },
                                    "file_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Existing version to be replaced"
                                    }
                                },
                                "required": [
                                    "title",
                                    "source_markdown",
                                    "format"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/todos": {
            "get": {
                "operationId": "projects-todos-list",
                "summary": "List to-dos (projects)",
                "description": "Lists the record's to-dos. Completed to-dos only appear with include_completed=1.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include_completed",
                        "in": "query",
                        "required": false,
                        "description": "Include completed to-dos",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "projects-todos-create",
                "summary": "Create to-do (projects)",
                "description": "Creates a to-do on the record. Assignees are specified by their user UUID and must belong to the API key's team. With recurring_interval you create a series, i.e. a to-do that moves itself to the next date each time it is completed. A series requires a due_date and cannot be created as already completed; otherwise the request returns HTTP 422.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> (default) or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Create as already completed. Cannot be combined with <code>recurring_interval</code>"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> or <code>yearly</code>. Requires <code>due_date</code>"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/todos/{todo_uuid}": {
            "patch": {
                "operationId": "projects-todos-update",
                "summary": "Update to-do (projects)",
                "description": "Changes only the fields you send. Use completed to complete or reopen a to-do. Omitting assigned_user_uuids leaves the assignment unchanged; an empty value removes it. For a series (a to-do with recurring_interval), completed: true completes only the current occurrence: the to-do stays open, its due_date advances by one interval, and the completed occurrence is stored as a separate, completed to-do. data is always the addressed to-do, so for a series it still has completed: false and the new due_date. The completed occurrence is returned alongside it in the response field completed_occurrence; in all other cases this field is null. Reopening (completed: false) applies to simple to-dos and to completed occurrences; the series itself is never completed. The due_date of a series cannot be changed directly (HTTP 422). A repeated call would also complete the next occurrence: if you send expected_due_date, you instead receive HTTP 409 with the current date in current_due_date once the series has already advanced.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3f6c1b2a-9d4e-4c7f-8a1b-5e2d7c9f0a11",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-16",
                                        "priority": "medium",
                                        "completed": false,
                                        "completed_at": null,
                                        "recurring_interval": "weekly",
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-01T08:00:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    },
                                    "completed_occurrence": {
                                        "uuid": "b81d4c7e-2a5f-4e3b-9c6d-1f0a8e7b6c22",
                                        "title": "Wochenbericht senden",
                                        "description": null,
                                        "due_date": "2026-10-09",
                                        "priority": "medium",
                                        "completed": true,
                                        "completed_at": "2026-10-09T09:30:00+00:00",
                                        "recurring_interval": null,
                                        "assigned_user_uuids": [],
                                        "created_at": "2026-10-09T09:30:00+00:00",
                                        "updated_at": "2026-10-09T09:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title of the to-do"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Due date in the format YYYY-MM-DD"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "<code>high</code>, <code>medium</code> or <code>low</code>"
                                    },
                                    "completed": {
                                        "type": "boolean",
                                        "description": "Completion state. For a series, <code>true</code> completes only the current occurrence"
                                    },
                                    "recurring_interval": {
                                        "type": "string",
                                        "description": "Repetition of the to-do: <code>daily</code>, <code>every_2_days</code>, <code>weekly</code>, <code>every_2_weeks</code>, <code>monthly</code>, <code>every_2_months</code>, <code>quarterly</code>, <code>half_yearly</code> or <code>yearly</code>. Requires a <code>due_date</code>; <code>null</code> ends the series"
                                    },
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Only when completing a series: the date in the format YYYY-MM-DD that the caller currently sees. If it differs from the current <code>due_date</code>, the endpoint returns HTTP 409 and completes nothing"
                                    },
                                    "assigned_user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "User UUIDs of the assignees"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "projects-todos-delete",
                "summary": "Delete to-do (projects)",
                "description": "Removes the to-do.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "todo_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/metadata": {
            "get": {
                "operationId": "projects-metadata-show",
                "summary": "Get metadata (projects)",
                "description": "Returns the record's tags, sources and custom fields, along with the tags and custom field definitions available in the team. A definition with api_managed: true can only be written via the API and is read-only in the user interface. Custom fields of type reference are returned with the UUID and the name of the target. Each definition states its type: text, textarea, number, url, dropdown, multiselect, reference, date or currency. For dropdown and multiselect, options lists the selectable options with label and value; the value of a multiselect field is a list of option values such as [\"gold\", \"silber\"]. For number and currency, decimals holds the number of allowed decimal places, and for currency, currency additionally holds the field's fixed ISO 4217 code; for all other types both are null. Values of type date use the format YYYY-MM-DD; values of type currency are a decimal number with a period as the decimal separator and state the currency code in currency.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "tags": [],
                                        "available_tags": [],
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "custom_field_definitions": [
                                            {
                                                "uuid": "7c1f9a3b-42d5-4e88-9a10-b6c3f2d51e04",
                                                "name": "Branche",
                                                "type": "text",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "reference_source": null,
                                                "decimals": null,
                                                "currency": null,
                                                "options": []
                                            },
                                            {
                                                "uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "reference_source": null,
                                                "decimals": 2,
                                                "currency": "EUR",
                                                "options": []
                                            }
                                        ],
                                        "custom_field_values": [
                                            {
                                                "definition_uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Vertragsende",
                                                "type": "date",
                                                "value": "2026-12-31",
                                                "currency": null,
                                                "reference": null
                                            },
                                            {
                                                "definition_uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "value": "12500.00",
                                                "currency": "EUR",
                                                "reference": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "projects-metadata-update",
                "summary": "Update metadata (projects)",
                "description": "Adds or removes individual tags, sources and custom field values. Nothing is replaced as a whole; an empty value deletes the respective custom field. Custom fields are identified by definition_uuid or their unique name; for reference fields, the value is the UUID of the target. Fields of type multiselect expect a list of option values from options that completely replaces the previous selection; an empty list deletes the field. Fields of type date expect a date in the format YYYY-MM-DD; fields of type currency expect an amount as a number or numeric string without a currency symbol and without thousands separators. The amount may have at most as many decimal places as the definition specifies in decimals and is stored padded to that number of places. A value that does not match the type results in HTTP 422 with the field reference custom_fields.{index}; nothing is changed in that case.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "add_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to add"
                                    },
                                    "remove_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Tags to remove"
                                    },
                                    "add_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to add"
                                    },
                                    "remove_sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources to remove"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Entries consisting of <code>definition_uuid</code> or <code>name</code> and <code>value</code>. For <code>date</code>, <code>value</code> is a date such as <code>\"2026-12-31\"</code>; for <code>currency</code>, an amount such as <code>12500.5</code> or <code>\"12500.50\"</code>; for <code>multiselect</code>, a list such as <code>[\"gold\", \"silber\"]</code>"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/files": {
            "get": {
                "operationId": "projects-files-list",
                "summary": "List files (projects)",
                "description": "Lists the record's files. has_document_source indicates whether the file was generated from Markdown and can therefore be revised instead of replaced.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "projects-files-upload",
                "summary": "Upload file (projects)",
                "description": "Attaches an uploaded file to the record. Transfer as multipart/form-data, at most 50 MB. File types that are not allowed return HTTP 422.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "The file to upload"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Alternative file name"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/files/{file_uuid}/download": {
            "get": {
                "operationId": "projects-files-download",
                "summary": "Download link for a file (projects)",
                "description": "Returns a short-lived download link along with its validity in seconds. The response contains the link, not the file contents.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/files/{file_uuid}/text": {
            "get": {
                "operationId": "projects-files-text",
                "summary": "Read the text of a file (projects)",
                "description": "Returns the already extracted text of the file in chunks of 20,000 characters. The endpoint is read-only; it does not trigger a new extraction.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "file_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Start position in the text; <code>next_offset</code> in the response leads to the next chunk",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/documents": {
            "post": {
                "operationId": "projects-documents-render",
                "summary": "Generate document from Markdown (projects)",
                "description": "Generates a PDF or Word document from Markdown and stores it on the record. With file_uuid, an existing version generated the same way is revised instead of a second one being added next to it.",
                "tags": [
                    "record-extras"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title, also used as the file name without extension"
                                    },
                                    "source_markdown": {
                                        "type": "string",
                                        "description": "The content as Markdown"
                                    },
                                    "format": {
                                        "type": "string",
                                        "description": "<code>pdf</code> or <code>docx</code>"
                                    },
                                    "file_uuid": {
                                        "type": "string",
                                        "format": "uuid",
                                        "description": "Existing version to be replaced"
                                    }
                                },
                                "required": [
                                    "title",
                                    "source_markdown",
                                    "format"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/tags": {
            "get": {
                "operationId": "tags-list",
                "summary": "List tags",
                "description": "Lists your team's tags alphabetically by title. Use the list to find a tag's uuid before setting it on a customer, contact or lead. FlowCRM access is sufficient; FlowSend is not required.",
                "tags": [
                    "tags"
                ],
                "parameters": [
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Returns only tags whose title contains the text",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number, starting at 1",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "b2c1a7a6-1249-4827-b533-ef1c65c1e273",
                                            "title": "VIP",
                                            "slug": "vip",
                                            "description": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "tags-create",
                "summary": "Create tag (find-or-create)",
                "description": "Creates a tag for your team. The call can be repeated safely: if a tag with this name already exists, it is returned with created: false and HTTP 200; case and special characters are ignored in the comparison. A previously deleted tag with the same name is brought back (restored: true, HTTP 201), without its former assignments. A genuinely new tag responds with created: true and HTTP 201. Requires FlowCRM write access. Renaming and deleting tags is reserved for the FlowSend API.",
                "tags": [
                    "tags"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "restored": false,
                                    "data": {
                                        "uuid": "b2c1a7a6-1249-4827-b533-ef1c65c1e273",
                                        "title": "VIP",
                                        "slug": "vip",
                                        "description": null
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name of the tag, at most 100 characters, containing at least one letter or digit"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description, at most 1,000 characters. Only stored when the tag is newly created"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads": {
            "get": {
                "operationId": "leads-list",
                "summary": "List leads",
                "description": "Lists the team's leads, paginated. By default only the open pipeline is shown (closed and converted leads are hidden); with pipeline=false the full set is returned. Leads marked as spam are left out of the list, except with include_spam=1 or an exact search by external_source and external_id: that search always finds a lead, even one marked as spam, so an integration does not create a duplicate before creating a lead. The response follows the standard pagination format with data, links and meta.",
                "tags": [
                    "leads"
                ],
                "parameters": [
                    {
                        "name": "pipeline",
                        "in": "query",
                        "required": false,
                        "description": "Default true (open pipeline only). false shows all leads, closed ones included",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "include_spam",
                        "in": "query",
                        "required": false,
                        "description": "Default false. 1 adds leads marked as spam to the list (recognisable by spam_at). An exact search by external_source and external_id always includes spam leads",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Full-text search across company name, first/last name and email",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "external_source",
                        "in": "query",
                        "required": false,
                        "description": "Exact filter on the origin of the external identifier. Subject to the pipeline default; for closed or converted leads also send pipeline=false",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "external_id",
                        "in": "query",
                        "required": false,
                        "description": "Exact filter on the external identifier. Subject to the pipeline default; for closed or converted leads also send pipeline=false",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "source",
                        "in": "query",
                        "required": false,
                        "description": "Filter on one source, or several separated by commas",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "tag_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter on a team-owned tag UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "assigned_user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter on the UUID of the assigned user. A UUID outside the team returns an empty list. Breaking change: assigned_user_id is no longer accepted (422)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "created_from",
                        "in": "query",
                        "required": false,
                        "description": "Created on or after (date, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "created_to",
                        "in": "query",
                        "required": false,
                        "description": "Created on or before (date, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "updated_from",
                        "in": "query",
                        "required": false,
                        "description": "Changed on or after (date, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "updated_to",
                        "in": "query",
                        "required": false,
                        "description": "Changed on or before (date, YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (default 50, maximum 100)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "Additional relations, comma-separated: contacts, sources, tags, status, board_cards, assigned_user, notes, custom_fields",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "data": [
                                        {
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                            "type": "company",
                                            "company_name": "Doe GmbH",
                                            "first_name": null,
                                            "last_name": null,
                                            "name": "Doe GmbH",
                                            "email": "info@example.com",
                                            "phone": "+49 30 123456",
                                            "website": null,
                                            "address_line_1": null,
                                            "address_line_2": null,
                                            "postal_code": null,
                                            "city": "Berlin",
                                            "state": null,
                                            "country": "DE",
                                            "country_display": null,
                                            "deal_value": "5000.00",
                                            "deal_currency": "EUR",
                                            "notes": null,
                                            "external_source": "messe-2026",
                                            "external_id": "MSG-4711",
                                            "possible_duplicate": false,
                                            "last_api_ingested_at": null,
                                            "spam_at": null,
                                            "lost_at": null,
                                            "lost_reason": null,
                                            "lost_note": null,
                                            "sources": [],
                                            "tags": [],
                                            "contacts": [],
                                            "board_cards": [],
                                            "assigned_user": null,
                                            "notes_log": [],
                                            "created_at": "2026-07-21T10:00:00+00:00",
                                            "updated_at": "2026-07-21T10:00:00+00:00"
                                        }
                                    ],
                                    "links": {
                                        "first": "/api/leads?page=1",
                                        "last": "/api/leads?page=1",
                                        "prev": null,
                                        "next": null
                                    },
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "leads-create",
                "summary": "Create a lead (upsert)",
                "description": "Creates a lead, or idempotently updates an existing one through external_source + external_id (merging only the fields sent). The status can never be set here; a new lead starts in the Cold stage of the default pipeline. An optional doc object fills the lead's FlowDoc on first creation, not on an idempotent repeated POST. The former docs[] array is no longer accepted (422), because a lead has exactly one FlowDoc. The response carries created (bool) and duplicate_warning (object with matches, or null). HTTP 201 for a new lead, 200 for an idempotent update.",
                "tags": [
                    "leads"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "company_name": "Doe GmbH",
                                        "first_name": null,
                                        "last_name": null,
                                        "name": "Doe GmbH",
                                        "email": "info@example.com",
                                        "phone": "+49 30 123456",
                                        "website": "https://example.com",
                                        "address_line_1": "Hauptstrasse 1",
                                        "address_line_2": null,
                                        "postal_code": "10115",
                                        "city": "Berlin",
                                        "state": null,
                                        "country": "DE",
                                        "country_display": "Deutschland",
                                        "deal_value": "5000.00",
                                        "deal_currency": "EUR",
                                        "notes": "Interessent von der Messe",
                                        "external_source": "messe-2026",
                                        "external_id": "MSG-4711",
                                        "possible_duplicate": false,
                                        "last_api_ingested_at": "2026-07-21T10:00:00+00:00",
                                        "status": {
                                            "uuid": "1f2e3d4c-5b6a-4790-8123-45a6b7c8d9e0",
                                            "key": "kalt",
                                            "name": "Kalt",
                                            "display_name": "Kalt",
                                            "color": "#94a3b8",
                                            "is_won": false,
                                            "is_lost": false,
                                            "is_closed": false,
                                            "is_system": false
                                        },
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "tags": [
                                            {
                                                "uuid": "b2c1a7a6-1249-4827-b533-ef1c65c1e273",
                                                "title": "VIP",
                                                "source": "api"
                                            }
                                        ],
                                        "contacts": [
                                            {
                                                "uuid": "4f8a2b6c-9d1e-4c3a-8b5f-0a7e6d2c1b9e",
                                                "first_name": "Erika",
                                                "last_name": "Musterfrau",
                                                "email": "erika@example.com",
                                                "phone": null,
                                                "role": "Einkauf"
                                            }
                                        ],
                                        "board_cards": [],
                                        "assigned_user": null,
                                        "notes_log": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T10:00:00+00:00"
                                    },
                                    "duplicate_warning": null
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "company or person"
                                    },
                                    "company_name": {
                                        "type": "string",
                                        "description": "Company name (required if type=company)"
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name (required if type=person)"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Website"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Address line 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Address line 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postal code"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "State / region"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country (ISO code)"
                                    },
                                    "country_display": {
                                        "type": "string",
                                        "description": "Display name of the country"
                                    },
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Potential deal value"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Currency (3-letter ISO code)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Free-text note on the lead"
                                    },
                                    "external_source": {
                                        "type": "string",
                                        "description": "Identifier of the source system, part of the idempotency key"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Record identifier in the source system, part of the idempotency key"
                                    },
                                    "source_payload": {
                                        "type": "object",
                                        "description": "Raw payload of the source. Stored, but never appears in the response"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of sources as free text (max. 20 entries)"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of team-owned tag UUIDs (max. 50 entries)"
                                    },
                                    "assigned_user_uuid": {
                                        "type": "string",
                                        "description": "UUID of a team member as the assigned user. Users outside the team are rejected with 422. Breaking change: assigned_user_id is no longer accepted (validation error)"
                                    },
                                    "contacts": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Contact person objects (first_name, last_name, email, phone, role; max. 50 entries)"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Custom field values (definition_uuid or name, plus value). For fields of type reference, value is the UUID of the target (customer, contact, project or team member), for example {\"definition_uuid\": \"...\", \"value\": \"3f7c1a02-9b64-4d1e-a5c8-2e7b90d41f6a\"}. For fields of type date, value is a date in the format YYYY-MM-DD; for fields of type currency, an amount as a number or numeric string without currency symbol and without thousands separators, with at most the decimal places set in the definition; for fields of type multiselect, a list of option values such as [\"gold\", \"silber\"]. A value that does not fit leads to 422 and no lead is created. Breaking change: definition_id is no longer accepted, and a numeric target ID in value is also rejected with 422 for reference fields"
                                    },
                                    "doc": {
                                        "type": "object",
                                        "description": "The lead's FlowDoc, only on creation. The only field is content as a Markdown string; there is no title. Breaking change: the former docs[] array is rejected with 422"
                                    }
                                },
                                "required": [
                                    "type"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}": {
            "get": {
                "operationId": "leads-show",
                "summary": "Get a lead",
                "description": "Returns a single team-owned lead by UUID. Status, sources, tags, contact persons and the assigned user are included. Custom field values only with include=custom_fields; reference fields are addressed by UUID only.",
                "tags": [
                    "leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "custom_fields to load the custom field values. Reference fields return the UUID of the target in value and referenced_uuid, and the display name in referenced_name; if the target no longer exists, referenced_uuid is null. Fields of type date return the date as YYYY-MM-DD, fields of type currency the amount as a decimal number with a point in value and the field's ISO 4217 code in currency, fields of type multiselect the list of chosen option values in value",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "company_name": "Doe GmbH",
                                        "first_name": null,
                                        "last_name": null,
                                        "name": "Doe GmbH",
                                        "email": "info@example.com",
                                        "phone": "+49 30 123456",
                                        "website": "https://example.com",
                                        "address_line_1": "Hauptstrasse 1",
                                        "address_line_2": null,
                                        "postal_code": "10115",
                                        "city": "Berlin",
                                        "state": null,
                                        "country": "DE",
                                        "country_display": "Deutschland",
                                        "deal_value": "5000.00",
                                        "deal_currency": "EUR",
                                        "notes": "Interessent von der Messe",
                                        "external_source": "messe-2026",
                                        "external_id": "MSG-4711",
                                        "possible_duplicate": false,
                                        "last_api_ingested_at": "2026-07-21T10:00:00+00:00",
                                        "status": {
                                            "uuid": "1f2e3d4c-5b6a-4790-8123-45a6b7c8d9e0",
                                            "key": "kalt",
                                            "name": "Kalt",
                                            "display_name": "Kalt",
                                            "color": "#94a3b8",
                                            "is_won": false,
                                            "is_lost": false,
                                            "is_closed": false,
                                            "is_system": false
                                        },
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "tags": [],
                                        "contacts": [],
                                        "board_cards": [],
                                        "assigned_user": null,
                                        "notes_log": [],
                                        "custom_fields": [
                                            {
                                                "definition_uuid": "7c1f9a3b-42d5-4e88-9a10-b6c3f2d51e04",
                                                "name": "Branche",
                                                "type": "text",
                                                "value": "Gastronomie"
                                            },
                                            {
                                                "definition_uuid": "0d5b8e21-6c74-4f39-8a2b-91e7c40d3f55",
                                                "name": "Stammkunde",
                                                "type": "reference",
                                                "value": "3f7c1a02-9b64-4d1e-a5c8-2e7b90d41f6a",
                                                "referenced_uuid": "3f7c1a02-9b64-4d1e-a5c8-2e7b90d41f6a",
                                                "referenced_name": "Doe GmbH"
                                            },
                                            {
                                                "definition_uuid": "5e2a9c71-3b0d-4f86-a1c4-7d9e0b6f2a38",
                                                "name": "Wunschtermin",
                                                "type": "date",
                                                "value": "2026-12-31"
                                            },
                                            {
                                                "definition_uuid": "b84d1f06-9a2e-4c53-8e7b-0f3a6d5c9e12",
                                                "name": "Jahresbudget",
                                                "type": "currency",
                                                "value": "12500.00",
                                                "currency": "EUR"
                                            }
                                        ],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T10:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "leads-update",
                "summary": "Update a lead",
                "description": "Updates the core fields of a team-owned lead (partial update, only the fields sent). The status cannot be set here (status and status_id are rejected with 422); use the status endpoint for that. The response also carries duplicate_warning.",
                "tags": [
                    "leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "company_name": "Doe GmbH",
                                        "name": "Doe GmbH",
                                        "email": "kontakt@example.com",
                                        "phone": "+49 30 123456",
                                        "deal_value": "7500.00",
                                        "deal_currency": "EUR",
                                        "external_source": "messe-2026",
                                        "external_id": "MSG-4711",
                                        "possible_duplicate": false,
                                        "status": {
                                            "uuid": "1f2e3d4c-5b6a-4790-8123-45a6b7c8d9e0",
                                            "key": "kalt",
                                            "name": "Kalt",
                                            "display_name": "Kalt",
                                            "color": "#94a3b8",
                                            "is_won": false,
                                            "is_lost": false,
                                            "is_closed": false,
                                            "is_system": false
                                        },
                                        "sources": [],
                                        "tags": [],
                                        "contacts": [],
                                        "board_cards": [],
                                        "assigned_user": null,
                                        "notes_log": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T12:00:00+00:00"
                                    },
                                    "duplicate_warning": null
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "company or person"
                                    },
                                    "company_name": {
                                        "type": "string",
                                        "description": "Company name"
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Website"
                                    },
                                    "address_line_1": {
                                        "type": "string",
                                        "description": "Address line 1"
                                    },
                                    "address_line_2": {
                                        "type": "string",
                                        "description": "Address line 2"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postal code"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City"
                                    },
                                    "state": {
                                        "type": "string",
                                        "description": "State / region"
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Country (ISO code)"
                                    },
                                    "country_display": {
                                        "type": "string",
                                        "description": "Display name of the country"
                                    },
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Potential deal value"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Currency (3-letter ISO code)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Free-text note"
                                    },
                                    "external_source": {
                                        "type": "string",
                                        "description": "Identifier of the source system"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "Record identifier in the source system"
                                    },
                                    "source_payload": {
                                        "type": "object",
                                        "description": "Raw payload of the source. Stored, but never appears in the response"
                                    },
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sources, additive (only adds, never removes; use PUT /sources to replace; max. 20 entries)"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Team-owned tag UUIDs, additive (use PUT /tags to replace; max. 50 entries)"
                                    },
                                    "assigned_user_uuid": {
                                        "type": "string",
                                        "description": "UUID of a team member as the assigned user; null removes the assignment. Users outside the team are rejected with 422. Breaking change: assigned_user_id is no longer accepted (validation error)"
                                    },
                                    "contacts": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Contact person objects (first_name, last_name, email, phone, role), additive: creates new contact persons and never changes or deletes existing ones (use the /contacts endpoints for that; max. 50 entries)"
                                    },
                                    "custom_fields": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Custom field values (definition_uuid or name, plus value). For fields of type reference, value is the UUID of the target (customer, contact, project or team member). For fields of type date, value is a date in the format YYYY-MM-DD; for fields of type currency, an amount as a number or numeric string without currency symbol and without thousands separators; for fields of type multiselect, a list of option values (replaces the previous selection). A value that does not fit leads to 422. Breaking change: definition_id is no longer accepted, and a numeric target ID in value is also rejected with 422 for reference fields"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "leads-delete",
                "summary": "Delete a lead",
                "description": "Deletes a team-owned lead (soft delete).",
                "tags": [
                    "leads"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Lead gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/sources": {
            "put": {
                "operationId": "leads-sources-sync",
                "summary": "Sync sources",
                "description": "Full sync of the lead's sources: the list you send replaces the stored one. An empty array clears the sources. The server trims values, removes empty ones and removes duplicates.",
                "tags": [
                    "lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "name": "Doe GmbH",
                                        "sources": [
                                            "messe-2026",
                                            "empfehlung"
                                        ],
                                        "tags": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T12:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "sources": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Complete list of sources (free text, max. 50 entries). Required; an empty array clears the sources"
                                    }
                                },
                                "required": [
                                    "sources"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/tags": {
            "put": {
                "operationId": "leads-tags-sync",
                "summary": "Sync tags",
                "description": "Full sync of the lead's tags through team-owned tag UUIDs: the list you send replaces the stored one. Kept tags keep their pivot source, newly attached ones get source=api, and tags left out are removed. An empty array removes all tags. A UUID from another team is rejected with 422.",
                "tags": [
                    "lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "name": "Doe GmbH",
                                        "sources": [],
                                        "tags": [
                                            {
                                                "uuid": "b2c1a7a6-1249-4827-b533-ef1c65c1e273",
                                                "title": "VIP",
                                                "source": "api"
                                            }
                                        ],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T12:12:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Complete list of team-owned tag UUIDs (max. 50 entries). Required; an empty array removes all tags"
                                    }
                                },
                                "required": [
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/contacts": {
            "get": {
                "operationId": "leads-contacts-list",
                "summary": "List contact persons",
                "description": "Lists the contact persons of a team-owned lead.",
                "tags": [
                    "lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "4f8a2b6c-9d1e-4c3a-8b5f-0a7e6d2c1b9e",
                                            "first_name": "Erika",
                                            "last_name": "Musterfrau",
                                            "email": "erika@example.com",
                                            "phone": null,
                                            "role": "Einkauf",
                                            "created_at": "2026-07-21T10:00:00+00:00",
                                            "updated_at": "2026-07-21T10:00:00+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "leads-contacts-create",
                "summary": "Create a contact person",
                "description": "Creates a contact person on the lead. Only first_name is required.",
                "tags": [
                    "lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5a9b3c7d-0e2f-4d4b-9c6a-1b8f7e3d2c0f",
                                        "first_name": "Max",
                                        "last_name": "Doe",
                                        "email": null,
                                        "phone": "+49 170 111222",
                                        "role": "Geschäftsführung",
                                        "created_at": "2026-07-21T12:20:00+00:00",
                                        "updated_at": "2026-07-21T12:20:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "Role / position"
                                    }
                                },
                                "required": [
                                    "first_name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/contacts/{contactUuid}": {
            "patch": {
                "operationId": "leads-contacts-update",
                "summary": "Update a contact person",
                "description": "Updates a contact person (partial update). If sent, first_name must not be empty. The contact person is addressed by UUID within the lead; numeric IDs are no longer accepted (HTTP 404).",
                "tags": [
                    "lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "contactUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5a9b3c7d-0e2f-4d4b-9c6a-1b8f7e3d2c0f",
                                        "first_name": "Max",
                                        "last_name": "Doe",
                                        "email": "max@example.com",
                                        "phone": "+49 170 111222",
                                        "role": "Geschäftsführung",
                                        "created_at": "2026-07-21T12:20:00+00:00",
                                        "updated_at": "2026-07-21T12:25:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "First name (cannot be cleared)"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "Role / position"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "leads-contacts-delete",
                "summary": "Remove a contact person",
                "description": "Removes a contact person from the lead.",
                "tags": [
                    "lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "contactUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Kontaktperson entfernt."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/notes": {
            "get": {
                "operationId": "leads-notes-list",
                "summary": "List notes",
                "description": "Lists the lead's notes, newest first. The author is returned as an object (uuid, name).",
                "tags": [
                    "lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "body": "Rückruf für Freitag vereinbart.",
                                            "user": {
                                                "uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                                "name": "Sascha"
                                            },
                                            "created_at": "2026-07-21T12:30:00+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "leads-notes-create",
                "summary": "Add a note",
                "description": "Appends a note to the lead. Notes are append-only; they cannot be edited or deleted. The author is always the token user.",
                "tags": [
                    "lead-relations"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "body": "Angebot per E-Mail versendet.",
                                        "user": {
                                            "uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                            "name": "Sascha"
                                        },
                                        "created_at": "2026-07-21T12:35:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "Note content (max. 65535 characters)"
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/status": {
            "put": {
                "operationId": "leads-status-set",
                "summary": "Set the status",
                "description": "Sets the status of a team-owned lead to a team-owned status, addressed by status UUID. converted is rejected with 422; a UUID that passes validation but matches no status that can be found returns 404. Optionally lost_reason and lost_note, only for a lost stage (otherwise 422).",
                "tags": [
                    "lead-status"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "type": "company",
                                        "name": "Doe GmbH",
                                        "status": {
                                            "uuid": "3c4d5e6f-7a8b-49c0-8d1e-2f3a4b5c6d7e",
                                            "key": null,
                                            "name": "Angebot",
                                            "display_name": "Proposal",
                                            "color": "#f59e0b",
                                            "is_won": false,
                                            "is_lost": false,
                                            "is_closed": false,
                                            "is_system": false,
                                            "is_inbox": false,
                                            "pipeline": {
                                                "uuid": "5d6e7f80-91a2-4b3c-8d4e-5f6a7b8c9d0e",
                                                "name": "Standard"
                                            }
                                        },
                                        "spam_at": null,
                                        "lost_at": null,
                                        "lost_reason": null,
                                        "lost_note": null,
                                        "sources": [],
                                        "tags": [],
                                        "contacts": [],
                                        "board_cards": [],
                                        "assigned_user": null,
                                        "notes_log": [],
                                        "created_at": "2026-07-21T10:00:00+00:00",
                                        "updated_at": "2026-07-21T12:40:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status_uuid": {
                                        "type": "string",
                                        "description": "UUID of a team-owned lead status"
                                    },
                                    "lost_reason": {
                                        "type": "string",
                                        "description": "UUID of an active, team-owned lost reason (see GET /leads/lost-reasons). Only allowed for a lost stage; a UUID from another team or of a deactivated reason is rejected with 422"
                                    },
                                    "lost_note": {
                                        "type": "string",
                                        "description": "Free text about the loss, at most 2,000 characters. Only allowed for a lost stage"
                                    }
                                },
                                "required": [
                                    "status_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/pipelines": {
            "get": {
                "operationId": "leads-pipelines-list",
                "summary": "Pipelines with stages",
                "description": "All pipelines of the team in their order, each with its stages (statuses) in their order. The default pipeline carries is_default, the inbox stage of a pipeline is_inbox. The UUID of a stage is the status_uuid for the status endpoint.",
                "tags": [
                    "lead-status"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "5d6e7f80-91a2-4b3c-8d4e-5f6a7b8c9d0e",
                                            "name": "Standard",
                                            "color": "#6366F1",
                                            "sort_order": 0,
                                            "is_default": true,
                                            "stages": [
                                                {
                                                    "uuid": "1f2e3d4c-5b6a-4790-8123-45a6b7c8d9e0",
                                                    "key": "neu",
                                                    "name": "Neu",
                                                    "display_name": "Neu",
                                                    "color": "#3b82f6",
                                                    "sort_order": 0,
                                                    "is_inbox": true,
                                                    "is_won": false,
                                                    "is_lost": false,
                                                    "is_closed": false,
                                                    "is_system": false
                                                },
                                                {
                                                    "uuid": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
                                                    "key": "verloren",
                                                    "name": "Verloren",
                                                    "display_name": "Verloren",
                                                    "color": "#ef4444",
                                                    "sort_order": 8,
                                                    "is_inbox": false,
                                                    "is_won": false,
                                                    "is_lost": true,
                                                    "is_closed": true,
                                                    "is_system": false
                                                }
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/lost-reasons": {
            "get": {
                "operationId": "leads-lost-reasons-list",
                "summary": "Lost reasons",
                "description": "The team's lost reasons in their order. Deactivated reasons are left out, except with include_inactive=1; a status change only accepts active reasons.",
                "tags": [
                    "lead-status"
                ],
                "parameters": [
                    {
                        "name": "include_inactive",
                        "in": "query",
                        "required": false,
                        "description": "Default false. 1 includes deactivated reasons (is_active: false)",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d6e",
                                            "name": "Zu teuer",
                                            "sort_order": 0,
                                            "is_active": true
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/timeline": {
            "get": {
                "operationId": "leads-timeline-list",
                "summary": "Get the timeline",
                "description": "Returns the timeline entries of a team-owned lead, paginated (newest first).",
                "tags": [
                    "lead-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (default 50, maximum 100)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "lead": {
                                        "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                        "name": "Doe GmbH"
                                    },
                                    "data": [
                                        {
                                            "type": "note",
                                            "type_label": "Notiz",
                                            "type_emoji": "📝",
                                            "content": "Erstkontakt auf der Messe.",
                                            "event_date": "2026-07-21T09:00:00+00:00",
                                            "formatted_date": "21.07.2026 09:00",
                                            "relative_date": "vor 4 Stunden",
                                            "user": "Sascha",
                                            "created_at": "2026-07-21T09:00:00+00:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "leads-timeline-create",
                "summary": "Create a timeline entry",
                "description": "Appends a timeline entry to the lead. type is checked against the list of allowed timeline types; without type, note is used. For a converted lead the endpoint answers with HTTP 409.",
                "tags": [
                    "lead-timeline"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "type": "call",
                                        "type_label": "Anruf",
                                        "type_emoji": "📞",
                                        "content": "Telefonat, Angebot angekündigt.",
                                        "event_date": "2026-07-21T13:00:00+00:00",
                                        "formatted_date": "21.07.2026 13:00",
                                        "relative_date": "gerade eben",
                                        "user": "Sascha",
                                        "created_at": "2026-07-21T13:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Content of the entry"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Timeline type from the allowed vocabulary (default note)"
                                    },
                                    "event_date": {
                                        "type": "string",
                                        "description": "Event date (ISO 8601, default: now)"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/convert": {
            "post": {
                "operationId": "leads-convert",
                "summary": "Convert a lead into a customer",
                "description": "Converts the lead into a new customer. Without client_name, the name is derived from the lead (company name for a company, first and last name for a person). The response is the new customer (CmmClient) with HTTP 201. A lead that is already converted returns 409 and names its customer through converted_client_uuid. An external_id already used by another customer returns 422.",
                "tags": [
                    "lead-convert"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "d4e5f6a7-8b9c-40d1-8e2f-3a4b5c6d7e8f",
                                        "name": "Doe GmbH",
                                        "email": "info@example.com",
                                        "phone": "+49 30 123456",
                                        "contact_person": null,
                                        "source": "messe-2026",
                                        "whmcs_client_id": null,
                                        "external_id": null,
                                        "stripe_customer_id": null,
                                        "website": null,
                                        "address_line_1": "Hauptstrasse 1",
                                        "address_line_2": null,
                                        "postal_code": "10115",
                                        "city": "Berlin",
                                        "state": null,
                                        "country": "DE",
                                        "currency": "EUR",
                                        "tax_id": null,
                                        "notes": null,
                                        "status": "active",
                                        "tags": [],
                                        "sources": [
                                            "messe-2026"
                                        ],
                                        "created_at": "2026-07-21T13:10:00+00:00",
                                        "updated_at": "2026-07-21T13:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_name": {
                                        "type": "string",
                                        "description": "Explicit customer name (overrides the derived name)"
                                    },
                                    "external_id": {
                                        "type": "string",
                                        "description": "External identifier for the new customer, unique per team (customers in the trash included)"
                                    },
                                    "transfer_contacts": {
                                        "type": "boolean",
                                        "description": "Transfer contact persons"
                                    },
                                    "transfer_todos": {
                                        "type": "boolean",
                                        "description": "Transfer to-dos"
                                    },
                                    "transfer_docs": {
                                        "type": "boolean",
                                        "description": "Transfer FlowDocs"
                                    },
                                    "transfer_custom_fields": {
                                        "type": "boolean",
                                        "description": "Transfer custom field values"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/reports/funnel": {
            "get": {
                "operationId": "leads-report-funnel",
                "summary": "Funnel by status",
                "description": "Number and value of open leads per status, in the order of the status list, plus the number of leads without a status. name is the stored status name, display_name the name in the language of the request (default statuses translated, custom names once a translation exists, otherwise name).",
                "tags": [
                    "lead-reports"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "stages": [
                                            {
                                                "status_uuid": "123e4567-e89b-12d3-a456-426614174000",
                                                "name": "Erstkontakt",
                                                "display_name": "Erstkontakt",
                                                "leads": 12,
                                                "value": 48000
                                            }
                                        ],
                                        "without_status": 3
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/reports/assignments": {
            "get": {
                "operationId": "leads-report-assignments",
                "summary": "Distribution across assignees",
                "description": "Number and value of open leads per assigned person. Unassigned leads appear as a row of their own with user: null, so exactly this gap stays visible.",
                "tags": [
                    "lead-reports"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/reports/sources": {
            "get": {
                "operationId": "leads-report-sources",
                "summary": "Lead sources",
                "description": "Number of leads per source, sorted in descending order.",
                "tags": [
                    "lead-reports"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/duplicates": {
            "get": {
                "operationId": "leads-duplicates",
                "summary": "Find possible duplicates",
                "description": "Other open leads with the same email address or the same company name, at most twenty. Deliberately narrow: values are compared exactly, not by similarity, because a person decides about merging.",
                "tags": [
                    "lead-reports"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-boards": {
            "get": {
                "operationId": "lead-boards-list",
                "summary": "List boards",
                "description": "Lists the team's boards. With include=columns or include=columns.cards, columns or columns with their cards are loaded as well.",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "columns or columns.cards",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "aa11bb22-cc33-4d44-8e55-6f66aa77bb88",
                                            "name": "Vertrieb",
                                            "is_default": true,
                                            "sort_order": 0,
                                            "created_at": "2026-07-01T08:00:00+00:00",
                                            "updated_at": "2026-07-01T08:00:00+00:00"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "lead-boards-create",
                "summary": "Create a board",
                "description": "Creates a new board. If the limit (5 per team) is exceeded, the endpoint answers with HTTP 422.",
                "tags": [
                    "lead-boards"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "bb22cc33-dd44-4e55-8f66-7a77bb88cc99",
                                        "name": "Partner",
                                        "is_default": false,
                                        "sort_order": 1,
                                        "created_at": "2026-07-21T13:20:00+00:00",
                                        "updated_at": "2026-07-21T13:20:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the board"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/lead-boards/{uuid}": {
            "get": {
                "operationId": "lead-boards-show",
                "summary": "Get a board",
                "description": "Returns a team-owned board. With include=columns or columns.cards, columns or cards are included. Besides name (the stored value, to be sent back when renaming), each column returns system_key (default columns of the sales board: cold, warming, setting, closing, won, lost; otherwise null) and display_name (the column name in the language of the request, otherwise name).",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "include",
                        "in": "query",
                        "required": false,
                        "description": "columns or columns.cards",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "aa11bb22-cc33-4d44-8e55-6f66aa77bb88",
                                        "name": "Vertrieb",
                                        "is_default": true,
                                        "sort_order": 0,
                                        "columns": [
                                            {
                                                "uuid": "cc33dd44-ee55-4f66-8a77-8b88cc99dd00",
                                                "name": "Kalt",
                                                "system_key": "cold",
                                                "display_name": "Kalt",
                                                "sort_order": 0,
                                                "created_at": "2026-07-01T08:00:00+00:00",
                                                "updated_at": "2026-07-01T08:00:00+00:00"
                                            }
                                        ],
                                        "created_at": "2026-07-01T08:00:00+00:00",
                                        "updated_at": "2026-07-01T08:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "patch": {
                "operationId": "lead-boards-update",
                "summary": "Rename a board",
                "description": "Renames a team-owned board.",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "aa11bb22-cc33-4d44-8e55-6f66aa77bb88",
                                        "name": "Vertrieb DACH",
                                        "is_default": true,
                                        "sort_order": 0,
                                        "created_at": "2026-07-01T08:00:00+00:00",
                                        "updated_at": "2026-07-21T13:25:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "New name of the board"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "lead-boards-delete",
                "summary": "Delete a board",
                "description": "Deletes a team-owned board with its columns and cards. The linked leads remain.",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Board gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-boards/{uuid}/columns": {
            "post": {
                "operationId": "lead-board-columns-create",
                "summary": "Create a column",
                "description": "Creates a column on a team-owned board. Without sort_order the column is added at the end.",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "dd44ee55-ff66-4a77-8b88-9c99dd00ee11",
                                        "name": "In Verhandlung",
                                        "system_key": null,
                                        "display_name": "In Verhandlung",
                                        "sort_order": 1,
                                        "created_at": "2026-07-21T13:30:00+00:00",
                                        "updated_at": "2026-07-21T13:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the column"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position of the column (default: added at the end)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-columns/{uuid}": {
            "patch": {
                "operationId": "lead-board-columns-update",
                "summary": "Update a column",
                "description": "Updates the name or position of a team-owned column.",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "dd44ee55-ff66-4a77-8b88-9c99dd00ee11",
                                        "name": "Verhandlung",
                                        "system_key": null,
                                        "display_name": "Verhandlung",
                                        "sort_order": 1,
                                        "created_at": "2026-07-21T13:30:00+00:00",
                                        "updated_at": "2026-07-21T13:35:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "New name of the column"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "New position of the column"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "lead-board-columns-delete",
                "summary": "Delete a column",
                "description": "Deletes a team-owned column. The column's cards are removed with it; the linked leads remain.",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Spalte gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-columns/{uuid}/cards": {
            "post": {
                "operationId": "lead-board-cards-create",
                "summary": "Create a card",
                "description": "Creates a card in a team-owned column. Pass exactly one of the two variants: either lead_uuid (existing lead) OR a nested lead object (new lead and card in one transaction). The card's own deal_value/deal_currency are independent of the lead's deal fields.",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "created": true,
                                    "data": {
                                        "uuid": "ee55ff66-aa77-4b88-9c99-0d00ee11ff22",
                                        "deal_value": "5000.00",
                                        "deal_currency": "EUR",
                                        "sort_order": 0,
                                        "column_uuid": "cc33dd44-ee55-4f66-8a77-8b88cc99dd00",
                                        "lead": {
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                            "name": "Doe GmbH"
                                        },
                                        "created_at": "2026-07-21T13:40:00+00:00",
                                        "updated_at": "2026-07-21T13:40:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "lead_uuid": {
                                        "type": "string",
                                        "description": "UUID of an existing team-owned lead (alternative to lead)"
                                    },
                                    "lead": {
                                        "type": "object",
                                        "description": "New lead (type plus company_name/first_name etc., as when creating a lead; alternative to lead_uuid)"
                                    },
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Deal value of the card"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Currency of the card (3-letter ISO code)"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position of the card in the column"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-cards/{uuid}": {
            "patch": {
                "operationId": "lead-board-cards-update",
                "summary": "Update a card",
                "description": "Updates the deal fields or the position of a team-owned card. The link to the lead and the column are not changed here (use the move endpoint for that).",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "ee55ff66-aa77-4b88-9c99-0d00ee11ff22",
                                        "deal_value": "6500.00",
                                        "deal_currency": "EUR",
                                        "sort_order": 0,
                                        "column_uuid": "cc33dd44-ee55-4f66-8a77-8b88cc99dd00",
                                        "lead": {
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                            "name": "Doe GmbH"
                                        },
                                        "created_at": "2026-07-21T13:40:00+00:00",
                                        "updated_at": "2026-07-21T13:45:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "deal_value": {
                                        "type": "number",
                                        "description": "Deal value of the card"
                                    },
                                    "deal_currency": {
                                        "type": "string",
                                        "description": "Currency of the card (3-letter ISO code)"
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Position of the card in the column"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "lead-board-cards-delete",
                "summary": "Delete a card",
                "description": "Deletes a team-owned card. The linked lead remains.",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Karte gelöscht."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/lead-board-cards/{uuid}/move": {
            "put": {
                "operationId": "lead-board-cards-move",
                "summary": "Move a card",
                "description": "Moves a team-owned card into a team-owned target column, with position to a given index (renumbered without gaps). If the target column is mapped to a status, the lead status is set as with drag and drop. The card's link stays unchanged. Without position and sort_order the card is added at the end of the column; sending sort_order and position together returns HTTP 422.",
                "tags": [
                    "lead-boards"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "ee55ff66-aa77-4b88-9c99-0d00ee11ff22",
                                        "deal_value": "6500.00",
                                        "deal_currency": "EUR",
                                        "sort_order": 0,
                                        "column_uuid": "dd44ee55-ff66-4a77-8b88-9c99dd00ee11",
                                        "lead": {
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11",
                                            "name": "Doe GmbH"
                                        },
                                        "created_at": "2026-07-21T13:40:00+00:00",
                                        "updated_at": "2026-07-21T13:50:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "target_column_uuid": {
                                        "type": "string",
                                        "description": "UUID of the team-owned target column"
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Index in the target column from 0 (0 = top), counted without the moved card. An index past the end appends the card. Both columns are renumbered from 0 without gaps. Not together with sort_order."
                                    },
                                    "sort_order": {
                                        "type": "integer",
                                        "description": "Raw sort_order value, stored without renumbering the other cards (previous behaviour). Not together with position."
                                    }
                                },
                                "required": [
                                    "target_column_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/leads/{uuid}/docs": {
            "get": {
                "operationId": "leads-docs-show",
                "summary": "Get the lead document",
                "description": "Returns the FlowDoc of a team-owned lead, including latest_version_number. If none exists yet, it is created on the first call and returned empty. documentable.type is crm_lead.",
                "tags": [
                    "flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot bis Freitag."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot bis Freitag.</p>",
                                        "documentable": {
                                            "type": "crm_lead",
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 1,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "leads-docs-update",
                "summary": "Update the lead document",
                "description": "Replaces the content of the FlowDoc completely. content must be sent; null or an empty string clears the document. Every call creates a new version and increments latest_version_number. title in the body is rejected with 422.",
                "tags": [
                    "flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot versendet."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot versendet.</p>",
                                        "documentable": {
                                            "type": "crm_lead",
                                            "uuid": "9b1c7f3e-2a4d-4c8b-8e1a-6f0d2c9b4a11"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 2,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown content, converted to TipTap on the server. null or an empty string clears the document"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/clients/{uuid}/docs": {
            "get": {
                "operationId": "clients-docs-show",
                "summary": "Get the customer document",
                "description": "Returns the FlowDoc of a team-owned customer, including latest_version_number. If none exists yet, it is created on the first call and returned empty. documentable.type is cmm_client.",
                "tags": [
                    "flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot bis Freitag."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot bis Freitag.</p>",
                                        "documentable": {
                                            "type": "cmm_client",
                                            "uuid": "8c1a5d2e-0f4b-4a9c-9d3e-2b7f0a6c1e44"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 1,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "clients-docs-update",
                "summary": "Update the customer document",
                "description": "Replaces the content of the FlowDoc completely. content must be sent; null or an empty string clears the document. Every call creates a new version and increments latest_version_number. title in the body is rejected with 422.",
                "tags": [
                    "flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot versendet."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot versendet.</p>",
                                        "documentable": {
                                            "type": "cmm_client",
                                            "uuid": "8c1a5d2e-0f4b-4a9c-9d3e-2b7f0a6c1e44"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 2,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown content, converted to TipTap on the server. null or an empty string clears the document"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/contacts/{uuid}/docs": {
            "get": {
                "operationId": "contacts-docs-show",
                "summary": "Get the contact document",
                "description": "Returns the FlowDoc of a contact (a private contact without a team can only be reached by its owner), including latest_version_number. If none exists yet, it is created on the first call and returned empty. documentable.type is cmm_contact.",
                "tags": [
                    "flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot bis Freitag."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot bis Freitag.</p>",
                                        "documentable": {
                                            "type": "cmm_contact",
                                            "uuid": "7d2e6f3a-1b5c-4d8e-9f0a-3c4b5d6e7f8a"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 1,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "contacts-docs-update",
                "summary": "Update the contact document",
                "description": "Replaces the content of the FlowDoc completely. content must be sent; null or an empty string clears the document. Every call creates a new version and increments latest_version_number. title in the body is rejected with 422.",
                "tags": [
                    "flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "e5f6a7b8-c9d0-4e1f-2a3b-4c5d6e7f8a9b",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot versendet."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot versendet.</p>",
                                        "documentable": {
                                            "type": "cmm_contact",
                                            "uuid": "7d2e6f3a-1b5c-4d8e-9f0a-3c4b5d6e7f8a"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 2,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown content, converted to TipTap on the server. null or an empty string clears the document"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/projects/{uuid}/docs": {
            "get": {
                "operationId": "projects-docs-show",
                "summary": "Get the project document",
                "description": "Returns the FlowDoc of a project (a project has no team of its own and is team-scoped through its customer), including latest_version_number. If none exists yet, it is created on the first call and returned empty. documentable.type is cmm_client_project.",
                "tags": [
                    "flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f6a7b8c9-d0e1-4f2a-3b4c-5d6e7f8a9b0c",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot bis Freitag."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot bis Freitag.</p>",
                                        "documentable": {
                                            "type": "cmm_client_project",
                                            "uuid": "6e3f7a4b-2c6d-4e9f-0a1b-4d5c6e7f8a9b"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 1,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:00:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "projects-docs-update",
                "summary": "Update the project document",
                "description": "Replaces the content of the FlowDoc completely. content must be sent; null or an empty string clears the document. Every call creates a new version and increments latest_version_number. title in the body is rejected with 422.",
                "tags": [
                    "flowdoc"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "f6a7b8c9-d0e1-4f2a-3b4c-5d6e7f8a9b0c",
                                        "title": "Notizen",
                                        "content": {
                                            "type": "doc",
                                            "content": [
                                                {
                                                    "type": "paragraph",
                                                    "content": [
                                                        {
                                                            "type": "text",
                                                            "text": "Angebot versendet."
                                                        }
                                                    ]
                                                }
                                            ]
                                        },
                                        "content_html": "<p>Angebot versendet.</p>",
                                        "documentable": {
                                            "type": "cmm_client_project",
                                            "uuid": "6e3f7a4b-2c6d-4e9f-0a1b-4d5c6e7f8a9b"
                                        },
                                        "created_by_uuid": "2b7c4d8e-1f3a-4e5c-0d7b-2c9a8f4e3d1a",
                                        "latest_version_number": 2,
                                        "created_at": "2026-07-21T14:00:00+00:00",
                                        "updated_at": "2026-07-21T14:10:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content": {
                                        "type": "string",
                                        "description": "Markdown content, converted to TipTap on the server. null or an empty string clears the document"
                                    }
                                },
                                "required": [
                                    "content"
                                ]
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "API key (pk_… or at_…) as Authorization: Bearer <key>. Any other way of sending it is rejected with 401."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    },
                    "error": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object"
                    }
                }
            }
        }
    }
}