{
    "openapi": "3.1.0",
    "info": {
        "title": "FlowSend API",
        "version": "v1",
        "description": "REST API for managing subscribers, lists, tags, campaigns, templates and the sender domain. Built for newsletter integrations, marketing automation and data synchronisation."
    },
    "servers": [
        {
            "url": "https://api.flowsuite.one",
            "description": "FlowSuite API"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "subscribers",
            "description": "Subscribers"
        },
        {
            "name": "subscribers-bulk",
            "description": "Bulk operations"
        },
        {
            "name": "lists",
            "description": "Lists"
        },
        {
            "name": "tags",
            "description": "Tags"
        },
        {
            "name": "campaigns",
            "description": "Campaigns"
        },
        {
            "name": "templates",
            "description": "Templates"
        },
        {
            "name": "sender-domains",
            "description": "Sender domain"
        },
        {
            "name": "insights",
            "description": "Context and reports"
        }
    ],
    "paths": {
        "/flowsend/subscribers": {
            "get": {
                "operationId": "subscribers-list",
                "summary": "List subscribers",
                "description": "Returns a paginated list of all subscribers.",
                "tags": [
                    "subscribers"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: subscribed, unsubscribed, bounced, complained, pending",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "source",
                        "in": "query",
                        "required": false,
                        "description": "Filter: manual, import, api, form, crm_sync",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "email",
                        "in": "query",
                        "required": false,
                        "description": "Exact filter on the normalised email address",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term (email, name, phone)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lists[]",
                        "in": "query",
                        "required": false,
                        "description": "Array of list UUIDs",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "tags[]",
                        "in": "query",
                        "required": false,
                        "description": "Array of tag UUIDs",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Number per page (1-200, default: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "550e8400-...",
                                        "email": "max@example.com",
                                        "firstname": "Max",
                                        "lastname": "Doe",
                                        "full_name": "John Doe",
                                        "status": "subscribed",
                                        "source": "api",
                                        "lists": [
                                            {
                                                "uuid": "...",
                                                "title": "Newsletter"
                                            }
                                        ],
                                        "tags": [
                                            {
                                                "uuid": "...",
                                                "title": "VIP-Kunde"
                                            }
                                        ],
                                        "created_at": "2024-01-15T10:30:00+00:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "subscribers-create",
                "summary": "Create a subscriber",
                "description": "Creates a new subscriber.",
                "tags": [
                    "subscribers"
                ],
                "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": {
                                    "email": {
                                        "type": "string",
                                        "description": "Email address of the subscriber"
                                    },
                                    "prefix": {
                                        "type": "string",
                                        "description": "Salutation (for example Herr, Frau)"
                                    },
                                    "firstname": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "lastname": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone number"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (default: subscribed)"
                                    },
                                    "lists": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of list UUIDs"
                                    },
                                    "tags": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of tag UUIDs"
                                    },
                                    "meta": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Meta data as an array of {key, value} objects"
                                    }
                                },
                                "required": [
                                    "email"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/by-client/{client_uuid}": {
            "get": {
                "operationId": "subscribers-preview-client",
                "summary": "Check the subscriber for a CRM customer",
                "description": "Requires FlowSend and FlowCRM access. Runs the same customer matching as PUT without saving any changes. Returns the existing UUID, tags and lists, also when an allowed address change applies. If a new subscriber would be created, uuid is null. Protected address changes and matching conflicts return 409; missing, deleted or anonymised customers return 404.",
                "tags": [
                    "subscribers"
                ],
                "parameters": [
                    {
                        "name": "client_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"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "subscribers-upsert-client",
                "summary": "Sync the subscriber for a CRM customer",
                "description": "Requires FlowSend and FlowCRM access. Resolves the current primary address of a CRM customer of the same team. Repeated calls return the same subscriber: 201 when it is created, 200 when it is reused. Unclear matches or protected address changes return 409; missing, deleted or anonymised customers return 404. Lists, tags and existing newsletter statuses are not reset. The request needs no body.",
                "tags": [
                    "subscribers"
                ],
                "parameters": [
                    {
                        "name": "client_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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}": {
            "get": {
                "operationId": "subscribers-show",
                "summary": "Get a subscriber",
                "description": "Returns the details of a single subscriber.",
                "tags": [
                    "subscribers"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "subscribers-update",
                "summary": "Update a subscriber",
                "description": "Updates an existing subscriber.",
                "tags": [
                    "subscribers"
                ],
                "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": {
                                    "email": {
                                        "type": "string",
                                        "description": "Email address"
                                    },
                                    "firstname": {
                                        "type": "string",
                                        "description": "First name"
                                    },
                                    "lastname": {
                                        "type": "string",
                                        "description": "Last name"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (subscribed, unsubscribed)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "subscribers-delete",
                "summary": "Delete a subscriber",
                "description": "Deletes a subscriber permanently.",
                "tags": [
                    "subscribers"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}/lists": {
            "put": {
                "operationId": "subscribers-sync-lists",
                "summary": "Sync subscriber lists",
                "description": "Replaces all list assignments of the subscriber (full synchronisation).",
                "tags": [
                    "subscribers"
                ],
                "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": {
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of list UUIDs (replaces existing assignments)"
                                    }
                                },
                                "required": [
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}/resend-double-opt-in": {
            "post": {
                "operationId": "subscribers-resend-double-opt-in",
                "summary": "Resend the double opt-in email",
                "description": "Sends the double opt-in confirmation email again and creates a fresh confirmation link. Only useful for subscribers who have not confirmed yet; a subscriber who has already confirmed returns 422. Whether a subscriber is waiting for confirmation is shown in the double_opt_in.awaiting_confirmation field of the subscriber response. The request needs no body.",
                "tags": [
                    "subscribers"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/{uuid}/tags": {
            "put": {
                "operationId": "subscribers-sync-tags",
                "summary": "Sync subscriber tags",
                "description": "Replaces all tag assignments of the subscriber (full synchronisation).",
                "tags": [
                    "subscribers"
                ],
                "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": {
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "List of tag UUIDs (replaces existing assignments)"
                                    }
                                },
                                "required": [
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/add-to-lists": {
            "post": {
                "operationId": "bulk-add-to-lists",
                "summary": "Add subscribers to lists",
                "description": "Adds several subscribers to several lists at once. This applies regardless of status, including unsubscribed, bounced and complained: the status stays unchanged, and campaigns still reach only subscribed. affected_count counts all subscribers found.",
                "tags": [
                    "subscribers-bulk"
                ],
                "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": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers"
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the target lists"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/add-tags": {
            "post": {
                "operationId": "bulk-add-tags",
                "summary": "Add tags to subscribers",
                "description": "Assigns several tags to several subscribers at once. This applies regardless of status, including unsubscribed, bounced and complained: the status stays unchanged, and campaigns still reach only subscribed. affected_count counts all subscribers found.",
                "tags": [
                    "subscribers-bulk"
                ],
                "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": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the target tags"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/remove-from-lists": {
            "post": {
                "operationId": "bulk-remove-from-lists",
                "summary": "Remove subscribers from lists",
                "description": "Removes several subscribers from several lists at once.",
                "tags": [
                    "subscribers-bulk"
                ],
                "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": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers"
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the lists"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "list_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/remove-tags": {
            "post": {
                "operationId": "bulk-remove-tags",
                "summary": "Remove tags from subscribers",
                "description": "Removes several tags from several subscribers at once.",
                "tags": [
                    "subscribers-bulk"
                ],
                "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": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers"
                                    },
                                    "tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the tags"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "tag_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/delete": {
            "post": {
                "operationId": "bulk-delete",
                "summary": "Bulk delete subscribers",
                "description": "Deletes several subscribers at once. This action cannot be undone.",
                "tags": [
                    "subscribers-bulk"
                ],
                "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": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers to delete"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/subscribers/bulk/status": {
            "post": {
                "operationId": "bulk-status",
                "summary": "Change the status of several subscribers",
                "description": "Sets the status of several subscribers at once. Only subscribed and pending are allowed. Subscribers who are already unsubscribed, bounced or complained stay unchanged: these states come from the recipient's own decision or from the sending service and are never overwritten. The response contains selected_count, affected_count and skipped_count.",
                "tags": [
                    "subscribers-bulk"
                ],
                "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": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers to change (1 to 500)"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "New status: subscribed or pending"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids",
                                    "status"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/lists": {
            "get": {
                "operationId": "lists-list",
                "summary": "List lists",
                "description": "Returns all lists, including the number of subscribers.",
                "tags": [
                    "lists"
                ],
                "parameters": [
                    {
                        "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"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "lists-create",
                "summary": "Create a list",
                "description": "Creates a new list.",
                "tags": [
                    "lists"
                ],
                "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": "Name of the list"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "URL slug (optional, generated automatically)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description of the list"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/lists/{uuid}": {
            "get": {
                "operationId": "lists-show",
                "summary": "Get list details",
                "description": "Returns the details of a specific list.",
                "tags": [
                    "lists"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "lists-update",
                "summary": "Update a list",
                "description": "Updates an existing list.",
                "tags": [
                    "lists"
                ],
                "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": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name of the list"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "lists-delete",
                "summary": "Delete a list",
                "description": "Deletes a list. Subscribers on this list are not deleted.",
                "tags": [
                    "lists"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/lists/{uuid}/subscribers": {
            "get": {
                "operationId": "lists-subscribers",
                "summary": "Subscribers of a list",
                "description": "Lists the subscribers of the list page by page. The response contains a meta block with the paging details.",
                "tags": [
                    "lists"
                ],
                "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": "lists-add-subscribers",
                "summary": "Add subscribers to the list",
                "description": "Adds existing subscribers to the list. Subscribers already on it stay unchanged; unknown UUIDs or UUIDs of another team are skipped.",
                "tags": [
                    "lists"
                ],
                "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": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers to add"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "lists-remove-subscribers",
                "summary": "Remove subscribers from the list",
                "description": "Removes the given subscribers from this list. The subscribers themselves, their status and their other lists and tags stay unchanged: being removed from a list is not the same as unsubscribing. Unknown UUIDs or UUIDs of another team are skipped; removed_count gives the number of assignments actually removed.",
                "tags": [
                    "lists"
                ],
                "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": {
                                    "subscriber_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the subscribers to remove (1 to 500)"
                                    }
                                },
                                "required": [
                                    "subscriber_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/tags": {
            "get": {
                "operationId": "tags-list",
                "summary": "List tags",
                "description": "Returns all tags, including the number of subscribers.",
                "tags": [
                    "tags"
                ],
                "parameters": [
                    {
                        "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"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "tags-create",
                "summary": "Create a tag",
                "description": "Creates a new tag.",
                "tags": [
                    "tags"
                ],
                "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": "Name of the tag"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "URL slug (optional, generated automatically)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description of the tag"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/tags/{uuid}": {
            "get": {
                "operationId": "tags-show",
                "summary": "Get tag details",
                "description": "Returns the details of a specific tag.",
                "tags": [
                    "tags"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "tags-update",
                "summary": "Update a tag",
                "description": "Updates an existing tag.",
                "tags": [
                    "tags"
                ],
                "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": {
                                    "title": {
                                        "type": "string",
                                        "description": "Name of the tag"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "tags-delete",
                "summary": "Delete a tag",
                "description": "Deletes a tag. Subscribers with this tag lose the assignment.",
                "tags": [
                    "tags"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/tags/{uuid}/subscribers": {
            "get": {
                "operationId": "tags-subscribers",
                "summary": "Subscribers of a tag",
                "description": "Lists the subscribers with this tag page by page. The response contains a meta block with the paging details.",
                "tags": [
                    "tags"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns": {
            "get": {
                "operationId": "campaigns-list",
                "summary": "List campaigns",
                "description": "Returns the team's campaigns page by page, newest first. The response contains a meta block with the paging details.",
                "tags": [
                    "campaigns"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filter: draft, scheduled, sending, sent, cancelled, failed",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term in name and subject",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 25)",
                        "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": "campaigns-create",
                "summary": "Create a campaign",
                "description": "Creates a campaign as a draft. The content is a Templatical document in content_json; it is validated against the schema and sanitised before anything is saved. FlowSend generates content_html itself and does not accept it. With template_uuid the draft starts from a visible template; content sent explicitly takes precedence. To change single blocks afterwards, use POST /campaigns/{uuid}/content/operations.",
                "tags": [
                    "campaigns"
                ],
                "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": "Internal name of the campaign"
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Subject line"
                                    },
                                    "preview_text": {
                                        "type": "string",
                                        "description": "Preview text in the inbox. It is copied into the content as the preheader (settings.preheaderText) and follows its changes."
                                    },
                                    "from_name": {
                                        "type": "string",
                                        "description": "Sender name"
                                    },
                                    "from_email": {
                                        "type": "string",
                                        "description": "Sender address; must match the verified sender domain"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Only visual is accepted; other values return 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Templatical document {\"blocks\": [...], \"settings\": {...}}, as an object or a JSON string. It is validated against the Templatical schema; the old builder format (root/childrenIds) returns 422 legacy_content_format."
                                    },
                                    "template_uuid": {
                                        "type": "string",
                                        "description": "UUID of an own or system template whose content is used"
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the recipient lists"
                                    },
                                    "include_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the tags to include"
                                    },
                                    "exclude_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs of the tags to exclude"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}": {
            "get": {
                "operationId": "campaigns-show",
                "summary": "Get a campaign",
                "description": "Returns the campaign with its content, recipient selection, statistics and the blockers list. An empty blockers means the campaign is ready to send; current_recipients gives the current reach. content.content_json is always a Templatical document (object), content.revision the current revision and content.content_html the preview generated from it.",
                "tags": [
                    "campaigns"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "campaigns-update",
                "summary": "Update a campaign",
                "description": "Changes a draft. Only campaigns in the states draft, scheduled and failed can be changed; everything else is send history and returns 422. Omitted fields keep their value; an empty list_uuids clears the list selection. A content_json sent along replaces the whole document; the previous state is saved as a version and open editors reload. For single blocks, POST /campaigns/{uuid}/content/operations is the better choice.",
                "tags": [
                    "campaigns"
                ],
                "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": "Internal name"
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Subject line"
                                    },
                                    "preview_text": {
                                        "type": "string",
                                        "description": "Preview text in the inbox. It is copied into the content as the preheader (settings.preheaderText) and follows its changes."
                                    },
                                    "from_name": {
                                        "type": "string",
                                        "description": "Sender name"
                                    },
                                    "from_email": {
                                        "type": "string",
                                        "description": "Sender address"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Only visual is accepted; other values return 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Templatical document {\"blocks\": [...], \"settings\": {...}}, as an object or a JSON string. It is validated against the Templatical schema; the old builder format (root/childrenIds) returns 422 legacy_content_format."
                                    },
                                    "list_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Replaces the list selection"
                                    },
                                    "include_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Replaces the included tags"
                                    },
                                    "exclude_tag_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Replaces the excluded tags"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "campaigns-delete",
                "summary": "Delete a campaign",
                "description": "Deletes a campaign. Only drafts and cancelled campaigns can be deleted; a sent campaign is send history and returns 422.",
                "tags": [
                    "campaigns"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/duplicate": {
            "post": {
                "operationId": "campaigns-duplicate",
                "summary": "Duplicate a campaign",
                "description": "Creates a copy with content and recipient selection as a new draft. Send time, counters and send history are not copied. The request needs no body.",
                "tags": [
                    "campaigns"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/send-test": {
            "post": {
                "operationId": "campaigns-send-test",
                "summary": "Send a test email",
                "description": "Sends the campaign to up to five test addresses. The recipient selection is ignored and the campaign's counters stay untouched. The response has a separate result for each address, because the sending service may accept one and reject another; if at least one fails, the response is 422.",
                "tags": [
                    "campaigns"
                ],
                "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": {
                                    "emails": {
                                        "type": "array",
                                        "items": [],
                                        "description": "One to five test addresses"
                                    },
                                    "subscriber_uuid": {
                                        "type": "string",
                                        "description": "UUID of a real subscriber whose data fills the placeholders"
                                    }
                                },
                                "required": [
                                    "emails"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/send": {
            "post": {
                "operationId": "campaigns-send",
                "summary": "Send a campaign now",
                "description": "Puts the campaign into sending immediately. If it is not ready to send, the endpoint returns 422 and a blockers list naming each reason separately, for example a missing subject, missing content, a missing list or an exceeded monthly limit. The request needs no body.",
                "tags": [
                    "campaigns"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/schedule": {
            "post": {
                "operationId": "campaigns-schedule",
                "summary": "Schedule a campaign",
                "description": "Schedules sending for a time in the future. The same readiness check as for immediate sending runs, and any obstacle is answered with 422 and blockers.",
                "tags": [
                    "campaigns"
                ],
                "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": {
                                    "scheduled_at": {
                                        "type": "string",
                                        "description": "Send time as date and time; must be in the future"
                                    }
                                },
                                "required": [
                                    "scheduled_at"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/cancel": {
            "post": {
                "operationId": "campaigns-cancel",
                "summary": "Cancel sending",
                "description": "Cancels a scheduled or running campaign. A campaign that is neither scheduled nor sending returns 422. Emails already delivered cannot be recalled. The request needs no body.",
                "tags": [
                    "campaigns"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/recipients": {
            "get": {
                "operationId": "campaigns-recipients",
                "summary": "Campaign recipients",
                "description": "Returns, page by page, the recipients the campaign would reach with the current selection. It is the same query that sending uses, so preview and sending cannot drift apart. The total is in the meta block as recipient_count.",
                "tags": [
                    "campaigns"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/stats": {
            "get": {
                "operationId": "campaigns-stats",
                "summary": "Campaign statistics",
                "description": "Returns delivery figures, opens, clicks, unsubscribes and bounces as well as the current reach and the blockers list.",
                "tags": [
                    "campaigns"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/events": {
            "get": {
                "operationId": "campaigns-events",
                "summary": "Campaign delivery events",
                "description": "Lists the individual delivery events page by page, newest first. Each event gives its type, the time and the UUID of the recipient concerned.",
                "tags": [
                    "campaigns"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Filter: delivered, opened, clicked, unsubscribed, bounced, complained, rejected, processed",
                        "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/content": {
            "get": {
                "operationId": "campaigns-content",
                "summary": "Campaign: read the content block by block",
                "description": "Returns the Templatical document with revision, an overview of the settings and blocks: every block in reading order with block_id, type, position (parent with sectionId and column) and its content fields under their Templatical names. A legacy document is converted in memory. The mandatory footer with legal notice and unsubscribe link is not a block.",
                "tags": [
                    "campaigns"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/campaigns/{uuid}/content/operations": {
            "post": {
                "operationId": "campaigns-content-operations",
                "summary": "Campaign: change the content with operations",
                "description": "Applies a batch of Templatical operations: all or nothing, validated against the schema, sanitised and saved with a new revision. The previous state is saved as a version, and open editors show the change immediately. A rejection names the operation (opIndex from 0) and the reason: 409 for an unknown block, a missing anchor, an outdated expected_revision or a block someone is editing in the editor right now; 422 for an invalid operation. The response contains the new revision, the newly created blocks (created) and the block overview. Only campaigns in the states draft, scheduled and failed; via MCP only drafts.",
                "tags": [
                    "campaigns"
                ],
                "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": {
                                    "operations": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Templatical operations, applied in order and all or nothing: <code>{\"op\": \"updateBlock\", \"blockId\": \"b1\", \"set\": {\"content\": \"&lt;p&gt;Hallo&lt;/p&gt;\"}}</code>, <code>{\"op\": \"addBlock\", \"block\": {\"type\": \"paragraph\", \"content\": \"&lt;p&gt;Neu&lt;/p&gt;\"}, \"parent\": null, \"after\": \"b1\"}</code>, <code>{\"op\": \"moveBlock\", \"blockId\": \"b2\", \"parent\": {\"sectionId\": \"s1\", \"column\": 0}, \"after\": null}</code>, <code>{\"op\": \"deleteBlock\", \"blockId\": \"b2\"}</code>, <code>{\"op\": \"updateSettings\", \"set\": {\"preheaderText\": \"…\"}}</code>, <code>{\"op\": \"setContent\", \"content\": {…}}</code> (only with expected_revision). At most 80 per call. Blocks without an id get one from FlowSend."
                                    },
                                    "expected_revision": {
                                        "type": "integer",
                                        "description": "The revision the operations were planned on; if the current one differs, the response is 409 stale_revision. Required for setContent."
                                    }
                                },
                                "required": [
                                    "operations"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates": {
            "get": {
                "operationId": "templates-list",
                "summary": "List templates",
                "description": "Lists your own templates and the shared system templates page by page.",
                "tags": [
                    "templates"
                ],
                "parameters": [
                    {
                        "name": "scope",
                        "in": "query",
                        "required": false,
                        "description": "all (default), own or system",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "required": false,
                        "description": "Filter: newsletter, welcome, announcement, promo, custom",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "editor_type",
                        "in": "query",
                        "required": false,
                        "description": "Filter: visual (legacy templates not yet converted carry richtext or html)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "is_active",
                        "in": "query",
                        "required": false,
                        "description": "Filter by active or deactivated templates",
                        "schema": {
                            "type": "boolean"
                        }
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Search term in name and description",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Entries per page (1 to 200, default 25)",
                        "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": "templates-create",
                "summary": "Create a template",
                "description": "Creates a template of your own. The content is a Templatical document in content_json, which is validated against the schema and sanitised; the old builder format returns 422. content_html is the generated preview and read-only. HTML exports from other providers are imported in FlowSend with \"Import HTML\".",
                "tags": [
                    "templates"
                ],
                "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": "Name of the template"
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "newsletter, welcome, announcement, promo or custom (default)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Only visual is accepted; other values return 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Templatical document {\"blocks\": [...], \"settings\": {...}}, as an object or a JSON string. It is validated against the Templatical schema; the old builder format (root/childrenIds) returns 422 legacy_content_format."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Whether the template appears in the selection (default: true)"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}": {
            "get": {
                "operationId": "templates-show",
                "summary": "Get a template",
                "description": "Returns an own or shared system template with its saved content. The editable field says whether the template may be changed.",
                "tags": [
                    "templates"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "templates-update",
                "summary": "Update a template",
                "description": "Changes a template of your own. A system template belongs to all teams and returns 422; duplicate it first. A content_json (Templatical) sent along replaces the whole document; the previous state is saved as a version first.",
                "tags": [
                    "templates"
                ],
                "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": "Name of the template"
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "newsletter, welcome, announcement, promo or custom"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description"
                                    },
                                    "editor_type": {
                                        "type": "string",
                                        "description": "Only visual is accepted; other values return 422"
                                    },
                                    "content_json": {
                                        "type": "object",
                                        "description": "Templatical document {\"blocks\": [...], \"settings\": {...}}, as an object or a JSON string. It is validated against the Templatical schema; the old builder format (root/childrenIds) returns 422 legacy_content_format."
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Whether the template appears in the selection"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "templates-delete",
                "summary": "Delete a template",
                "description": "Deletes a template of your own. System templates cannot be reached this way and return 404.",
                "tags": [
                    "templates"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}/duplicate": {
            "post": {
                "operationId": "templates-duplicate",
                "summary": "Duplicate a template",
                "description": "Creates a copy of your own from an own or shared system template, which you can change freely. The copy's thumbnail is created in the background. The request needs no body.",
                "tags": [
                    "templates"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}/content": {
            "get": {
                "operationId": "templates-content",
                "summary": "Template: read the content block by block",
                "description": "Returns the Templatical document with revision, an overview of the settings and blocks: every block in reading order with block_id, type, position (parent with sectionId and column) and its content fields under their Templatical names. A legacy document is converted in memory. The mandatory footer with legal notice and unsubscribe link is not a block.",
                "tags": [
                    "templates"
                ],
                "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"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/templates/{uuid}/content/operations": {
            "post": {
                "operationId": "templates-content-operations",
                "summary": "Template: change the content with operations",
                "description": "Applies a batch of Templatical operations: all or nothing, validated against the schema, sanitised and saved with a new revision. The previous state is saved as a version, and open editors show the change immediately. A rejection names the operation (opIndex from 0) and the reason: 409 for an unknown block, a missing anchor, an outdated expected_revision or a block someone is editing in the editor right now; 422 for an invalid operation. The response contains the new revision, the newly created blocks (created) and the block overview. System templates return 422; duplicate them first.",
                "tags": [
                    "templates"
                ],
                "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": {
                                    "operations": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Templatical operations, applied in order and all or nothing: <code>{\"op\": \"updateBlock\", \"blockId\": \"b1\", \"set\": {\"content\": \"&lt;p&gt;Hallo&lt;/p&gt;\"}}</code>, <code>{\"op\": \"addBlock\", \"block\": {\"type\": \"paragraph\", \"content\": \"&lt;p&gt;Neu&lt;/p&gt;\"}, \"parent\": null, \"after\": \"b1\"}</code>, <code>{\"op\": \"moveBlock\", \"blockId\": \"b2\", \"parent\": {\"sectionId\": \"s1\", \"column\": 0}, \"after\": null}</code>, <code>{\"op\": \"deleteBlock\", \"blockId\": \"b2\"}</code>, <code>{\"op\": \"updateSettings\", \"set\": {\"preheaderText\": \"…\"}}</code>, <code>{\"op\": \"setContent\", \"content\": {…}}</code> (only with expected_revision). At most 80 per call. Blocks without an id get one from FlowSend."
                                    },
                                    "expected_revision": {
                                        "type": "integer",
                                        "description": "The revision the operations were planned on; if the current one differs, the response is 409 stale_revision. Required for setContent."
                                    }
                                },
                                "required": [
                                    "operations"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/sender-domains": {
            "get": {
                "operationId": "sender-domains-list",
                "summary": "List the sender domain",
                "description": "Returns the configured sender domain as a list with zero or one entry, without querying the sending service.",
                "tags": [
                    "sender-domains"
                ],
                "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": "sender-domains-create",
                "summary": "Add a sender domain",
                "description": "Registers a sender domain with the sending service and returns the DNS records to publish. If a domain is already configured, the endpoint returns 422.",
                "tags": [
                    "sender-domains"
                ],
                "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": {
                                    "domain": {
                                        "type": "string",
                                        "description": "The domain, for example beispiel.de"
                                    }
                                },
                                "required": [
                                    "domain"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/sender-domains/current": {
            "get": {
                "operationId": "sender-domains-show",
                "summary": "Get the sender domain",
                "description": "Returns the domain with its DNS records and asks the sending service for the current verification state. If the service cannot be reached, the stored state comes back with reachable: false.",
                "tags": [
                    "sender-domains"
                ],
                "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": "sender-domains-delete",
                "summary": "Remove the sender domain",
                "description": "Removes the sender domain. The local state is always deleted; whether the sending service released the domain as well is shown in the provider_removed field. If it is false, the domain must be removed at the service manually before it can be added again.",
                "tags": [
                    "sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/sender-domains/current/verify": {
            "post": {
                "operationId": "sender-domains-verify",
                "summary": "Verify the sender domain",
                "description": "Asks the sending service to check the published DNS records again. The request needs no body.",
                "tags": [
                    "sender-domains"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/context": {
            "get": {
                "operationId": "context",
                "summary": "Get the context",
                "description": "Returns in one call everything you need to know before writing: the field contracts per record type, the allowed subscriber and campaign statuses, the protected consent states, the template categories, the double opt-in state, the sender domain and the monthly limit.",
                "tags": [
                    "insights"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/limit": {
            "get": {
                "operationId": "limit",
                "summary": "Get the monthly limit",
                "description": "Returns the monthly sending quota: limit, the sent emails already used, the remaining ones, the reached flag and the usage in percent.",
                "tags": [
                    "insights"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/reports/overview": {
            "get": {
                "operationId": "reports-overview",
                "summary": "Overview",
                "description": "Counts subscribers per status, lists, tags and campaigns per state, and gives the monthly limit.",
                "tags": [
                    "insights"
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowsend/reports/audience": {
            "get": {
                "operationId": "reports-audience",
                "summary": "Estimate the reach",
                "description": "Counts how many subscribers a selection of lists and tags actually reaches. It is the same query that sending uses: unsubscribed, undeliverable and not yet confirmed subscribers are not counted. Without a selection you get the number of all subscribed recipients.",
                "tags": [
                    "insights"
                ],
                "parameters": [
                    {
                        "name": "list_uuids[]",
                        "in": "query",
                        "required": false,
                        "description": "UUIDs of the recipient lists",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "include_tag_uuids[]",
                        "in": "query",
                        "required": false,
                        "description": "UUIDs of the tags to include",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    },
                    {
                        "name": "exclude_tag_uuids[]",
                        "in": "query",
                        "required": false,
                        "description": "UUIDs of the tags to exclude",
                        "schema": {
                            "type": "array",
                            "items": []
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "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"
                    }
                }
            }
        }
    }
}