← Files VAILUPARCHIVED FILE

openapi.json

164 KB · Nov 30, 2026 · 07:45 UTC

↓ Download file

{
  "openapi": "3.1.0",
  "info": {
    "title": "VAILUP for ChatGPT",
    "version": "1.3.3",
    "description": "Same tools as the VAILUP MCP server. Everything is saved as a draft; nothing is published, sent, paid or activated."
  },
  "servers": [
    {
      "url": "https://vailup.app"
    }
  ],
  "security": [
    {
      "vailupOAuth": []
    }
  ],
  "paths": {
    "/api/public/chatgpt/tools/list_brands": {
      "post": {
        "operationId": "list_brands",
        "summary": "List my brands",
        "description": "List the VAILUP brands the signed-in user can access, with their connected channels (names and status only, never credentials).",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {},
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_brand_brain": {
      "post": {
        "operationId": "get_brand_brain",
        "summary": "Get Brand Brain",
        "description": "Read a brand's Brand Brain (tone, audience, offers, language, style) plus enabled knowledge sources. Use this before writing any content for the brand.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_calendar": {
      "post": {
        "operationId": "get_calendar",
        "summary": "View content calendar",
        "description": "List planned, draft and published posts, ads and newsletters of a brand in a date range (max. 62 days) to find gaps and plan content.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  },
                  "from": {
                    "description": "Start date YYYY-MM-DD (default today).",
                    "type": "string",
                    "format": "date",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                  },
                  "days": {
                    "description": "Number of days (default 14).",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 62
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_marketing_overview": {
      "post": {
        "operationId": "get_marketing_overview",
        "summary": "Marketing overview",
        "description": "Real results of a brand: recent published posts with their measured metrics (missing values stay null), open VailPilot suggestions, plan and credit balance. Use it to analyse and recommend next steps.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/explain_vailup": {
      "post": {
        "operationId": "explain_vailup",
        "summary": "Explain VAILUP features",
        "description": "Explain all VAILUP apps and functions (VailPilot, VailBrand, VailShare, VailAds, VailMail, VailCreate, VailBook, VailSEO \u2026) including what they do, steps and costs. Use it to answer how-to questions.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "language": {
                    "description": "Answer language (default de).",
                    "type": "string",
                    "enum": [
                      "de",
                      "en"
                    ]
                  },
                  "query": {
                    "description": "Optional app or topic filter, e.g. 'newsletter'.",
                    "type": "string",
                    "maxLength": 80
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/save_image_to_library": {
      "post": {
        "operationId": "save_image_to_library",
        "summary": "Save image to VAILUP library",
        "description": "Save an image (generated or uploaded in ChatGPT) into the brand's VAILUP media library as a private item. Pass image_url (https download link or file object with download_url) OR image_base64. Returns media_path to attach to drafts. PNG, JPG, WebP or GIF, max 20 MB. No VAILUP credits are used. If no link is available, tell the user to upload the image at https://vailup.app/media instead.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  },
                  "image_url": {
                    "description": "https download URL of the image, or a ChatGPT file object with download_url.",
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "object",
                        "properties": {
                          "download_url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "file_id": {
                            "type": "string",
                            "maxLength": 200
                          },
                          "mime_type": {
                            "type": "string",
                            "maxLength": 100
                          },
                          "file_name": {
                            "type": "string",
                            "maxLength": 200
                          }
                        },
                        "required": [
                          "download_url"
                        ],
                        "additionalProperties": {}
                      }
                    ]
                  },
                  "image_base64": {
                    "description": "Alternative: base64 or data URL of the image.",
                    "type": "string",
                    "maxLength": 28000000
                  },
                  "name": {
                    "description": "File name / title shown in the library.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "caption": {
                    "description": "Short description of the image.",
                    "type": "string",
                    "maxLength": 500
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/create_social_draft": {
      "post": {
        "operationId": "create_social_draft",
        "summary": "Create social media draft",
        "description": "Save a social media post as a DRAFT in VAILUP (calendar + My Marketing). Never publishes. Optionally attach an image saved with save_image_to_library. Instagram, TikTok and Pinterest need an image.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  },
                  "campaign_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "channels": {
                    "minItems": 1,
                    "maxItems": 7,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "instagram",
                        "facebook",
                        "linkedin",
                        "threads",
                        "tiktok",
                        "pinterest",
                        "google_business"
                      ]
                    },
                    "description": "Platforms for this post."
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2200,
                    "description": "Post text in the brand's language."
                  },
                  "hashtags": {
                    "maxItems": 15,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 60
                    }
                  },
                  "title": {
                    "description": "Short internal title.",
                    "type": "string",
                    "maxLength": 80
                  },
                  "media_path": {
                    "description": "media_path returned by save_image_to_library.",
                    "type": "string",
                    "maxLength": 300
                  },
                  "scheduled_at": {
                    "description": "Planned date/time (ISO). The user still approves in VAILUP.",
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "brand_id",
                  "channels",
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/create_newsletter_draft": {
      "post": {
        "operationId": "create_newsletter_draft",
        "summary": "Create newsletter draft",
        "description": "Save a newsletter as a DRAFT in VailMail. Never sends. The user picks recipients, checks the brand design and sends in VAILUP.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  },
                  "campaign_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "subject": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 150
                  },
                  "preheader": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20000,
                    "description": "Newsletter text in plain paragraphs."
                  },
                  "cta": {
                    "description": "Button label.",
                    "type": "string",
                    "maxLength": 60
                  },
                  "language": {
                    "description": "Main language (default de).",
                    "type": "string",
                    "enum": [
                      "de",
                      "en"
                    ]
                  }
                },
                "required": [
                  "brand_id",
                  "subject",
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/add_brand_brain_note": {
      "post": {
        "operationId": "add_brand_brain_note",
        "summary": "Add to Brand Brain",
        "description": "Add verified facts to the Brand Brain as a separate, removable source (e.g. new product, offer, target group, FAQ). Optional brain_fields keys: content_pillars, content_formats, products, services, prices, promotions, audiences, usps, values, competitors, claims, ctas, keywords, hashtags, locations, social_links, important_links, team, faqs, description, industry, phone, email, address. Never changes colours, fonts, tone or identity. Free, no credits.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200,
                    "description": "Short title of the note."
                  },
                  "content": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 8000,
                    "description": "The note text the user confirmed."
                  },
                  "category": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "facts": {
                    "description": "Short factual statements.",
                    "maxItems": 30,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 400
                    }
                  },
                  "brain_fields": {
                    "description": "Facts sorted into Brand Brain fields.",
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "maxItems": 20,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 400
                      }
                    }
                  }
                },
                "required": [
                  "brand_id",
                  "title",
                  "content"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_analytics": {
      "post": {
        "operationId": "get_analytics",
        "summary": "Analytics & insights",
        "description": "Measured analytics of a brand: daily account metrics per channel (followers, reach, views, engagement), top posts and paid ad results (Meta, Pinterest, TikTok, Snapchat, LinkedIn, Google) from synced data. Missing values stay null; never estimate.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  },
                  "days": {
                    "description": "Period in days (default 30).",
                    "type": "integer",
                    "minimum": 7,
                    "maximum": 90
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_seo_and_trends": {
      "post": {
        "operationId": "get_seo_and_trends",
        "summary": "VailSEO, VailTrend & competitors",
        "description": "Latest saved VailSEO website check (score, sub-scores, findings), Google Business search terms and Maps numbers, latest VailTrend ideas and competitor snapshots. Read-only; new paid analyses are started in VAILUP.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_bookings_leads_reviews": {
      "post": {
        "operationId": "get_bookings_leads_reviews",
        "summary": "Bookings, leads & reviews",
        "description": "VailBook upcoming appointments and 30-day counts, VailLead pipeline by stage with recent leads, and latest Google plus own reviews with average rating. No e-mail addresses or phone numbers are shared.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_integrations": {
      "post": {
        "operationId": "get_integrations",
        "summary": "Connected apps & integrations",
        "description": "Which integrations a brand has connected (social channels, Shopify shop, WordPress site, Google Business locations, ad accounts), their status, plus the brand's VailPage landing pages, recent Shopify-based and WordPress blog proposals. Never returns credentials.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                    "description": "Brand id from list_brands."
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/create_graphic_layout_draft": {
      "post": {
        "operationId": "create_graphic_layout_draft",
        "summary": "Create editable graphic layout draft",
        "description": "Creates an editable graphic layout draft using brand colours, text, logo and optionally an existing image from the media library. Returns a project ID and editor URL. Does not generate a new AI image, publish content or automatically export a finished image.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "campaign_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "title": {
                    "description": "Internal project name.",
                    "type": "string",
                    "maxLength": 80
                  },
                  "format": {
                    "description": "1:1 post, 4:5 portrait/ad, 9:16 story/reel, 16:9 banner.",
                    "type": "string",
                    "enum": [
                      "1:1",
                      "4:5",
                      "9:16",
                      "16:9"
                    ]
                  },
                  "template": {
                    "description": "split = half photo/half graphic, typo = text only, phone = phone mockup, background = photo behind text.",
                    "type": "string",
                    "enum": [
                      "split",
                      "typo",
                      "phone",
                      "background"
                    ]
                  },
                  "background": {
                    "type": "string",
                    "enum": [
                      "brand",
                      "white",
                      "black"
                    ]
                  },
                  "headline": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "sub": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "cta": {
                    "type": "string",
                    "maxLength": 28
                  },
                  "photo_media_path": {
                    "description": "Path of a library image (list_media).",
                    "type": "string",
                    "maxLength": 300
                  },
                  "photo_first": {
                    "type": "boolean"
                  },
                  "logo": {
                    "description": "Place the brand's original logo.",
                    "type": "boolean"
                  },
                  "logo_position": {
                    "type": "string",
                    "enum": [
                      "tl",
                      "tr",
                      "bl",
                      "br"
                    ]
                  },
                  "brand_color": {
                    "description": "Override; default from Brand Brain.",
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  },
                  "accent": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/update_graphic_project": {
      "post": {
        "operationId": "update_graphic_project",
        "summary": "Update VailCreate graphic",
        "description": "Change text, format, template, colours, photo or logo of an existing graphic project. Free.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "project_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "title": {
                    "description": "Internal project name.",
                    "type": "string",
                    "maxLength": 80
                  },
                  "format": {
                    "description": "1:1 post, 4:5 portrait/ad, 9:16 story/reel, 16:9 banner.",
                    "type": "string",
                    "enum": [
                      "1:1",
                      "4:5",
                      "9:16",
                      "16:9"
                    ]
                  },
                  "template": {
                    "description": "split = half photo/half graphic, typo = text only, phone = phone mockup, background = photo behind text.",
                    "type": "string",
                    "enum": [
                      "split",
                      "typo",
                      "phone",
                      "background"
                    ]
                  },
                  "background": {
                    "type": "string",
                    "enum": [
                      "brand",
                      "white",
                      "black"
                    ]
                  },
                  "headline": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "sub": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "cta": {
                    "type": "string",
                    "maxLength": 28
                  },
                  "photo_media_path": {
                    "description": "Path of a library image (list_media).",
                    "type": "string",
                    "maxLength": 300
                  },
                  "photo_first": {
                    "type": "boolean"
                  },
                  "logo": {
                    "description": "Place the brand's original logo.",
                    "type": "boolean"
                  },
                  "logo_position": {
                    "type": "string",
                    "enum": [
                      "tl",
                      "tr",
                      "bl",
                      "br"
                    ]
                  },
                  "brand_color": {
                    "description": "Override; default from Brand Brain.",
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  },
                  "accent": {
                    "type": "string",
                    "pattern": "^#[0-9a-fA-F]{6}$"
                  }
                },
                "required": [
                  "project_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_graphic_project": {
      "post": {
        "operationId": "get_graphic_project",
        "summary": "Get VailCreate graphic",
        "description": "Read the full layout of a graphic project and its editor link.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "project_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "project_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/list_graphic_projects": {
      "post": {
        "operationId": "list_graphic_projects",
        "summary": "List VailCreate graphics",
        "description": "List graphic projects of a brand, newest first.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/list_media": {
      "post": {
        "operationId": "list_media",
        "summary": "Search media library (VailHub)",
        "description": "Search and list the brand's images and videos by name/caption, type or folder. Returns media_path values usable in drafts and graphics.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "query": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "image",
                      "video",
                      "any"
                    ]
                  },
                  "folder_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 60
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_media_details": {
      "post": {
        "operationId": "get_media_details",
        "summary": "Get media details",
        "description": "Read size, dimensions, usage rights and caption of one library item.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "media_path": {
                    "type": "string",
                    "maxLength": 300
                  }
                },
                "required": [
                  "brand_id",
                  "media_path"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/organize_media": {
      "post": {
        "operationId": "organize_media",
        "summary": "Organise media into a folder",
        "description": "Create a folder (if needed) and move library items into it. Nothing is deleted.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "folder_name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 60
                  },
                  "media_paths": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "required": [
                  "brand_id",
                  "folder_name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/list_drafts": {
      "post": {
        "operationId": "list_drafts",
        "summary": "List social drafts",
        "description": "List social posts of a brand by status (draft, approved, scheduled, published) to edit or reuse them.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "approved",
                      "published",
                      "failed",
                      "any"
                    ]
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/update_social_draft": {
      "post": {
        "operationId": "update_social_draft",
        "summary": "Edit or reschedule a social draft",
        "description": "Change text, hashtags, image or planned date of a DRAFT post. Approved or published posts are never changed.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "draft_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2200
                  },
                  "hashtags": {
                    "maxItems": 15,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 60
                    }
                  },
                  "media_path": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "scheduled_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "draft_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/create_campaign_draft": {
      "post": {
        "operationId": "create_campaign_draft",
        "summary": "Create a new campaign draft",
        "description": "Create a NEW campaign and atomically attach explicit existing same-brand draft IDs: posts, newsletters, vouchers/cards/links, documents, graphics and landing pages. Search list_campaigns first; modifications use get/update_campaign and attach_campaign_assets, not a duplicate. Free; no publication, sending or credits.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "brief": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "draft_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "newsletter_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "link_page_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "document_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "graphic_project_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "landing_page_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "media_paths": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 300
                    }
                  }
                },
                "required": [
                  "brand_id",
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/list_ad_campaigns": {
      "post": {
        "operationId": "list_ad_campaigns",
        "summary": "List ads and ad performance",
        "description": "Read saved ad plans (VailAds) with status, budget, copy and cached real performance. Read-only: activation and budget changes only happen in VAILUP/Ads Manager.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 40
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/list_newsletters": {
      "post": {
        "operationId": "list_newsletters",
        "summary": "List newsletters and results",
        "description": "List newsletter drafts and sent campaigns with real send counts/stats, plus the number of contacts with consent (no personal data).",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/update_newsletter_draft": {
      "post": {
        "operationId": "update_newsletter_draft",
        "summary": "Edit newsletter draft",
        "description": "Change subject, preheader, text or CTA of an unsent newsletter draft. Sending only happens in VAILUP after approval.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "newsletter_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "subject": {
                    "type": "string",
                    "maxLength": 150
                  },
                  "preheader": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "body": {
                    "type": "string",
                    "maxLength": 10000
                  },
                  "cta": {
                    "type": "string",
                    "maxLength": 60
                  }
                },
                "required": [
                  "newsletter_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/create_landing_page_draft": {
      "post": {
        "operationId": "create_landing_page_draft",
        "summary": "Create landing page draft (VailPage)",
        "description": "Create an unpublished landing page from blocks (hero, benefits, form, faq, contact). Publishing happens only in VAILUP.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "campaign_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "blocks": {
                    "minItems": 1,
                    "maxItems": 15,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "hero",
                            "benefits",
                            "text",
                            "form",
                            "faq",
                            "contact",
                            "image"
                          ]
                        },
                        "title": {
                          "type": "string",
                          "maxLength": 160
                        },
                        "text": {
                          "type": "string",
                          "maxLength": 2000
                        },
                        "image_media_path": {
                          "type": "string",
                          "maxLength": 300
                        },
                        "items": {
                          "maxItems": 12,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "type": "string",
                                "maxLength": 120
                              },
                              "text": {
                                "type": "string",
                                "maxLength": 600
                              }
                            },
                            "required": [
                              "title",
                              "text"
                            ]
                          }
                        }
                      },
                      "required": [
                        "type",
                        "title",
                        "text"
                      ]
                    }
                  }
                },
                "required": [
                  "brand_id",
                  "title",
                  "blocks"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/create_link_page_draft": {
      "post": {
        "operationId": "create_link_page_draft",
        "summary": "Create a structured VailLink draft",
        "description": "Create a NEW unpublished voucher, business card or link page. Voucher fields are saved in contact (real percent/value/dates); card layout/social flags use the UI format. No invented code or conditions. For changes first find/get the existing page then update_link_page_draft, never create a replacement. Costs 0 credits.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "bio",
                      "card",
                      "voucher",
                      "campaign",
                      "mini"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "bio": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "links": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2000,
                          "format": "uri"
                        }
                      },
                      "required": [
                        "label",
                        "url"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "voucher": {
                    "type": "object",
                    "properties": {
                      "vtype": {
                        "type": "string",
                        "enum": [
                          "percent",
                          "amount",
                          "gift",
                          "free",
                          "shipping",
                          "bogo"
                        ]
                      },
                      "vvalue": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "number"
                          }
                        ]
                      },
                      "vcode": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "vheadline": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "vfrom": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "vuntil": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "vmin": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^\\d+(\\.\\d{1,2})?$"
                          },
                          {
                            "type": "number",
                            "minimum": 0
                          }
                        ]
                      },
                      "vwhere": {
                        "type": "string",
                        "enum": [
                          "both",
                          "online",
                          "store"
                        ]
                      },
                      "vmessage": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "vteaser": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "vterms": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "vcta": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "vcta_url": {
                        "type": "string",
                        "maxLength": 2000,
                        "format": "uri"
                      },
                      "vwrap": {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$"
                      },
                      "vaccent": {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$"
                      },
                      "vlogo": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "0",
                              "1"
                            ]
                          }
                        ]
                      },
                      "vonce": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "0",
                              "1"
                            ]
                          }
                        ]
                      },
                      "vphoto": {
                        "type": "string",
                        "maxLength": 4000000
                      }
                    },
                    "additionalProperties": false
                  },
                  "contact": {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "phone": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 254,
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      "address": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "website": {
                        "type": "string",
                        "maxLength": 2000,
                        "format": "uri"
                      },
                      "social": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "maxLength": 60
                        },
                        "additionalProperties": {
                          "type": "string",
                          "maxLength": 2000,
                          "format": "uri"
                        }
                      },
                      "photo": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "layout": {
                        "type": "object",
                        "properties": {
                          "photo": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "title": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "bio": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "phone": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "email": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "address": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "website": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "qr": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  },
                  "campaign_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "brand_id",
                  "kind",
                  "title"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/create_document_draft": {
      "post": {
        "operationId": "create_document_draft",
        "summary": "Create document / presentation draft (VailDoc)",
        "description": "Save an offer, presentation, product sheet, sales sheet, company profile or press kit written in the chat as an editable VailDoc draft. Free (no VAILUP AI). PDF export happens in the editor.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "campaign_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "offer",
                      "presentation",
                      "product_sheet",
                      "sales_sheet",
                      "company_profile",
                      "press_kit"
                    ]
                  },
                  "title": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 200
                  },
                  "subtitle": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "lang": {
                    "type": "string",
                    "enum": [
                      "de",
                      "en"
                    ]
                  },
                  "sections": {
                    "minItems": 1,
                    "maxItems": 24,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "heading": {
                          "type": "string",
                          "maxLength": 200
                        },
                        "body": {
                          "type": "string",
                          "maxLength": 4000
                        },
                        "bullets": {
                          "maxItems": 12,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 400
                          }
                        },
                        "layout": {
                          "type": "string",
                          "enum": [
                            "text",
                            "bullets",
                            "steps",
                            "facts",
                            "pricing"
                          ]
                        },
                        "facts": {
                          "maxItems": 16,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "maxLength": 120
                              },
                              "value": {
                                "type": "string",
                                "maxLength": 300
                              }
                            },
                            "required": [
                              "label",
                              "value"
                            ]
                          }
                        }
                      },
                      "required": [
                        "heading"
                      ]
                    }
                  }
                },
                "required": [
                  "brand_id",
                  "kind",
                  "title",
                  "sections"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/list_pages_docs_videos": {
      "post": {
        "operationId": "list_pages_docs_videos",
        "summary": "List pages, documents and video projects",
        "description": "List landing pages, VailLink pages, VailDoc documents and VailCut video projects with editor links.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_pilot_status": {
      "post": {
        "operationId": "get_pilot_status",
        "summary": "VailPilot status and suggestions",
        "description": "Read VailPilot mode, enabled state, limits and current open insights/suggestions with sources. Settings and pausing are changed only in VAILUP.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/list_leads": {
      "post": {
        "operationId": "list_leads",
        "summary": "Search leads (VailLead)",
        "description": "Search leads by name/company/stage. Returns only what is needed: name, company, stage, source, next step, value. Email/phone only when include_contact is true.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "query": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "stage": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "include_contact": {
                    "type": "boolean"
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/update_lead": {
      "post": {
        "operationId": "update_lead",
        "summary": "Update lead stage, next step or note",
        "description": "Move a lead to another stage, set the next step and/or add a note to its history. Nothing is sent to the lead.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "lead_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "stage": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "next_step": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "lead_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_booking_setup": {
      "post": {
        "operationId": "get_booking_setup",
        "summary": "Read VailBook setup",
        "description": "Read the complete VailBook configuration: booking rules, locations, services (duration, price, buffers, hours, staff), staff with weekly schedules, absences/holidays and upcoming booking counts. Use it before changing anything so nothing has to be typed again.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/save_booking_rules": {
      "post": {
        "operationId": "save_booking_rules",
        "summary": "Save VailBook booking rules",
        "description": "Set time zone, slot grid, minimum notice, booking horizon, manual vs instant confirmation, contact/location text and reminder/review email options. Only given fields change. Free.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "timezone": {
                    "type": "string",
                    "maxLength": 60
                  },
                  "slot_step": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 240
                  },
                  "min_notice_minutes": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 43200
                  },
                  "horizon_days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 365
                  },
                  "auto_confirm": {
                    "type": "boolean"
                  },
                  "location": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "sender_name": {
                    "type": "string",
                    "maxLength": 80
                  },
                  "reminder_24h": {
                    "type": "boolean"
                  },
                  "reminder_2h": {
                    "type": "boolean"
                  },
                  "review_email": {
                    "type": "boolean"
                  },
                  "confirmed": {
                    "description": "Must be true when the booking page is already live (has active services). Ask the user first.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/save_booking_location": {
      "post": {
        "operationId": "save_booking_location",
        "summary": "Create or edit a VailBook location",
        "description": "Create a location (omit id) or update one. With 2+ active locations customers pick the location first.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "address": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "phone": {
                    "type": "string",
                    "maxLength": 40
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "confirmed": {
                    "description": "Must be true when the booking page is already live (has active services). Ask the user first.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/save_booking_service": {
      "post": {
        "operationId": "save_booking_service",
        "summary": "Create or edit a VailBook service",
        "description": "Create a service/appointment type (omit id) or update one: duration, price, buffers before/after, weekly hours with breaks, staff (none/any/specific) and locations. New services are saved inactive (unpublished) unless the user explicitly asks to activate; activating or changing live services needs confirmed=true.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "duration": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 720
                  },
                  "price": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "buffer_before": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 240
                  },
                  "buffer_after": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 240
                  },
                  "hours": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "enum": [
                        "0",
                        "1",
                        "2",
                        "3",
                        "4",
                        "5",
                        "6"
                      ]
                    },
                    "additionalProperties": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "from": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                          },
                          "to": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                          }
                        },
                        "required": [
                          "from",
                          "to"
                        ]
                      }
                    },
                    "required": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5",
                      "6"
                    ],
                    "description": "Weekday (0=Sunday \u2026 6=Saturday) \u2192 time blocks, e.g. {\"1\":[{\"from\":\"09:00\",\"to\":\"12:00\"},{\"from\":\"13:00\",\"to\":\"18:00\"}]}. A gap between blocks is a break."
                  },
                  "staff_mode": {
                    "type": "string",
                    "enum": [
                      "none",
                      "any",
                      "specific"
                    ]
                  },
                  "staff_ids": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "location_ids": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "confirmed": {
                    "description": "Must be true when the booking page is already live (has active services). Ask the user first.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/save_booking_staff": {
      "post": {
        "operationId": "save_booking_staff",
        "summary": "Create or edit a VailBook staff member",
        "description": "Create a staff member (omit id) or update one, assign services/locations and set an individual weekly schedule with breaks (replaces only that person's schedule when given).",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "email": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200,
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "active": {
                    "type": "boolean"
                  },
                  "service_ids": {
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "location_ids": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "weekly_schedule": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string",
                      "enum": [
                        "0",
                        "1",
                        "2",
                        "3",
                        "4",
                        "5",
                        "6"
                      ]
                    },
                    "additionalProperties": {
                      "maxItems": 4,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "from": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                          },
                          "to": {
                            "type": "string",
                            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                          }
                        },
                        "required": [
                          "from",
                          "to"
                        ]
                      }
                    },
                    "required": [
                      "0",
                      "1",
                      "2",
                      "3",
                      "4",
                      "5",
                      "6"
                    ],
                    "description": "Weekday (0=Sunday \u2026 6=Saturday) \u2192 time blocks, e.g. {\"1\":[{\"from\":\"09:00\",\"to\":\"12:00\"},{\"from\":\"13:00\",\"to\":\"18:00\"}]}. A gap between blocks is a break."
                  },
                  "confirmed": {
                    "description": "Must be true when the booking page is already live (has active services). Ask the user first.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/manage_booking_absence": {
      "post": {
        "operationId": "manage_booking_absence",
        "summary": "Add or remove VailBook absences",
        "description": "Add vacation, sick leave, training, blocked time, public holiday, closure, weekly recurring break or special opening \u2014 for one staff member or the whole business (omit staff_id) \u2014 or remove one by id. Reports existing bookings that conflict; they are never deleted.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "action": {
                    "type": "string",
                    "enum": [
                      "add",
                      "remove"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "staff_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "vacation",
                      "sick",
                      "training",
                      "block",
                      "holiday",
                      "closed",
                      "recurring",
                      "extra"
                    ]
                  },
                  "starts_at": {
                    "description": "ISO start for dated absences.",
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "ends_at": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "all_day": {
                    "type": "boolean"
                  },
                  "weekday": {
                    "description": "For kind 'recurring'.",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 6
                  },
                  "from": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                  },
                  "to": {
                    "type": "string",
                    "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$|^24:00$"
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "confirmed": {
                    "description": "Must be true when the booking page is already live (has active services). Ask the user first.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "brand_id",
                  "action"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/check_booking_availability": {
      "post": {
        "operationId": "check_booking_availability",
        "summary": "Check VailBook free times",
        "description": "Preview free slots for a service with the real VailBook engine (hours, staff schedules, absences, buffers, notice and existing bookings). Creates nothing.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "service_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "from_date": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "days": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 31
                  },
                  "location_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "brand_id",
                  "service_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_monthly_report": {
      "post": {
        "operationId": "get_monthly_report",
        "summary": "Monthly report",
        "description": "Load the VAILUP monthly report for a month (YYYY-MM): published posts, reach/followers per connected channel, ads, leads, bookings, reviews, link clicks, vouchers, Google Maps and goal progress. Real data only; null = not measured.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "month": {
                    "description": "Defaults to the previous month.",
                    "type": "string",
                    "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_qr_codes": {
      "post": {
        "operationId": "get_qr_codes",
        "summary": "All QR codes",
        "description": "Return every QR code of a brand (review page, Google review per location, booking page DE/EN, published VailLink pages, business cards and vouchers) with target URL and ready-to-place SVG. Free.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "review",
                      "booking",
                      "link",
                      "voucher",
                      "business_card"
                    ]
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_review_qr_code": {
      "post": {
        "operationId": "get_review_qr_code",
        "summary": "Review QR code",
        "description": "Return the VailReview QR code (plus Google review QR codes per connected location) as URL and SVG, ready for a review card or poster. Free.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_link_page": {
      "post": {
        "operationId": "get_link_page",
        "summary": "Read a VailLink page",
        "description": "Read an existing voucher, card or link page including its structured contact, links, campaign and draft/live state before editing. Never creates a copy.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "page_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "brand_id",
                  "page_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/list_link_pages": {
      "post": {
        "operationId": "list_link_pages",
        "summary": "Find VailLink pages",
        "description": "Find existing vouchers, cards and links by brand, kind and title, including structured contact. Search before create; edits use the existing ID.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "bio",
                      "card",
                      "voucher",
                      "campaign",
                      "mini"
                    ]
                  },
                  "query": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/update_link_page_draft": {
      "post": {
        "operationId": "update_link_page_draft",
        "summary": "Edit the existing VailLink draft",
        "description": "Patch exactly the existing ID, merging structured voucher/card contact without losing fields. Unpublished pages only; never publishes or creates a replacement. Read get_link_page first.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "page_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "bio": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "links": {
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 60
                        },
                        "url": {
                          "type": "string",
                          "maxLength": 2000,
                          "format": "uri"
                        }
                      },
                      "required": [
                        "label",
                        "url"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "voucher": {
                    "type": "object",
                    "properties": {
                      "vtype": {
                        "type": "string",
                        "enum": [
                          "percent",
                          "amount",
                          "gift",
                          "free",
                          "shipping",
                          "bogo"
                        ]
                      },
                      "vvalue": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 300
                          },
                          {
                            "type": "number"
                          }
                        ]
                      },
                      "vcode": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "vheadline": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "vfrom": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "vuntil": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "vmin": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^\\d+(\\.\\d{1,2})?$"
                          },
                          {
                            "type": "number",
                            "minimum": 0
                          }
                        ]
                      },
                      "vwhere": {
                        "type": "string",
                        "enum": [
                          "both",
                          "online",
                          "store"
                        ]
                      },
                      "vmessage": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "vteaser": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "vterms": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "vcta": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "vcta_url": {
                        "type": "string",
                        "maxLength": 2000,
                        "format": "uri"
                      },
                      "vwrap": {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$"
                      },
                      "vaccent": {
                        "type": "string",
                        "pattern": "^#[0-9a-f]{6}$"
                      },
                      "vlogo": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "0",
                              "1"
                            ]
                          }
                        ]
                      },
                      "vonce": {
                        "anyOf": [
                          {
                            "type": "boolean"
                          },
                          {
                            "type": "string",
                            "enum": [
                              "0",
                              "1"
                            ]
                          }
                        ]
                      },
                      "vphoto": {
                        "type": "string",
                        "maxLength": 4000000
                      }
                    },
                    "additionalProperties": false
                  },
                  "contact": {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "phone": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "email": {
                        "type": "string",
                        "maxLength": 254,
                        "format": "email",
                        "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                      },
                      "address": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "website": {
                        "type": "string",
                        "maxLength": 2000,
                        "format": "uri"
                      },
                      "social": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string",
                          "maxLength": 60
                        },
                        "additionalProperties": {
                          "type": "string",
                          "maxLength": 2000,
                          "format": "uri"
                        }
                      },
                      "photo": {
                        "type": "string",
                        "maxLength": 500
                      },
                      "layout": {
                        "type": "object",
                        "properties": {
                          "photo": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "title": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "bio": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "phone": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "email": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "address": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "website": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          },
                          "qr": {
                            "type": "string",
                            "enum": [
                              "front",
                              "back",
                              "hide"
                            ]
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "additionalProperties": false
                  },
                  "campaign_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "brand_id",
                  "page_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/get_campaign": {
      "post": {
        "operationId": "get_campaign",
        "summary": "Read campaign and linked materials",
        "description": "Read an existing campaign and its real linked posts, newsletters, vouchers, cards, links, documents, graphics and landing pages before editing. No inferred text-only associations.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "campaign_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "brand_id",
                  "campaign_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/list_campaigns": {
      "post": {
        "operationId": "list_campaigns",
        "summary": "Find existing campaigns",
        "description": "Search a brand\u2019s existing campaigns by title before creating or changing one. Returns actual IDs and draft/live workflow status; never duplicates campaigns.",
        "x-openai-isConsequential": false,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "query": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 100
                  }
                },
                "required": [
                  "brand_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/update_campaign": {
      "post": {
        "operationId": "update_campaign",
        "summary": "Edit existing campaign draft",
        "description": "Change title or brief on exactly the existing campaign ID. Drafts only; no creation, publication, sending, scheduling, credits or copy of assets. Read get_campaign first.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "campaign_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "title": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 120
                  },
                  "brief": {
                    "type": "string",
                    "maxLength": 2000
                  }
                },
                "required": [
                  "brand_id",
                  "campaign_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    },
    "/api/public/chatgpt/tools/attach_campaign_assets": {
      "post": {
        "operationId": "attach_campaign_assets",
        "summary": "Attach or detach existing campaign materials",
        "description": "Atomically attach/detach explicit existing IDs of same-brand draft posts, unsent newsletter drafts, VailLink pages, documents, graphics and landing pages. Idempotent; no copies/deletions. Non-draft associations require confirmed=true after explicit user confirmation. Assets in other campaigns must be detached explicitly first. Reads back actual IDs and counts.",
        "x-openai-isConsequential": true,
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "brand_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "campaign_id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "action": {
                    "default": "attach",
                    "type": "string",
                    "enum": [
                      "attach",
                      "detach"
                    ]
                  },
                  "confirmed": {
                    "type": "boolean"
                  },
                  "draft_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "newsletter_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "link_page_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "document_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "graphic_project_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "landing_page_ids": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "brand_id",
                  "campaign_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or tool error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                }
              }
            }
          },
          "401": {
            "description": "Not signed in with VAILUP"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "vailupOAuth": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://dkiomfozkdlywtnazali.supabase.co/auth/v1/oauth/authorize",
            "tokenUrl": "https://dkiomfozkdlywtnazali.supabase.co/auth/v1/oauth/token",
            "scopes": {
              "openid": "Sign in",
              "email": "Email address",
              "profile": "Basic profile"
            }
          }
        }
      }
    },
    "schemas": {
      "Result": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "message": {
            "type": "string"
          },
          "data": {}
        },
        "required": [
          "ok",
          "message"
        ]
      }
    }
  }
}

SHA-256: 29b4529f968d5ea27b73ba5049652bfdc47b6c48ac33f695c8d696803346e17c