{
  "openapi": "3.1.0",
  "info": {
    "title": "Sorhage Solutions API",
    "version": "1.0.0",
    "description": "Central tools of the Sorhage voice and WhatsApp agents. One address per tool: PMS tools under /v1/tools/pms/<pms>/<function>, standard tools under /v1/tools/<function>. Generated from scripts/demo/06_tool_schemas.py; do not edit by hand."
  },
  "servers": [
    {
      "url": "https://api.sorhage.dev"
    }
  ],
  "security": [
    {
      "fleet_secret": []
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "tags": [
          "Betrieb"
        ],
        "summary": "Liveness check.",
        "security": [],
        "responses": {
          "200": {
            "description": "{\"ok\": true}"
          }
        }
      }
    },
    "/v1/admin/agents": {
      "get": {
        "operationId": "list_agents",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Alle zugeordneten Agenten mit Hotel und Status.",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        }
      }
    },
    "/v1/admin/agents/{agent_id}": {
      "put": {
        "operationId": "put_agent",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Agent einem Hotel zuordnen. Ab dann werden seine Tool-Aufrufe angenommen (nur in einem laufenden Gespräch).",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hotel": {
                    "type": "string",
                    "description": "Kurzname des Hotels (slug)."
                  },
                  "write_mode_cap": {
                    "type": "string",
                    "enum": [
                      "disabled",
                      "dry_run",
                      "live"
                    ]
                  },
                  "allowed_functions": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Standard [\"*\"] = alle Tools."
                  },
                  "note": {
                    "type": "string"
                  }
                },
                "required": [
                  "hotel"
                ]
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "disable_agent",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Agent abschalten. Der Eintrag bleibt, die Historie bleibt lesbar.",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        }
      }
    },
    "/v1/admin/calls": {
      "get": {
        "operationId": "list_calls",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Letzte Tool-Aufrufe: Zeit, Agent, Tool, Ergebnis, Dauer. Ohne Gästedaten.",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        },
        "parameters": [
          {
            "name": "agent_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "nur dieser Agent"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer"
            },
            "description": "1 bis 500, Standard 50"
          }
        ]
      }
    },
    "/v1/admin/hotels": {
      "get": {
        "operationId": "list_hotels",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Alle Hotels mit Status, PMS-Zugang (ohne Schlüssel) und zugeordneten Agenten.",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        }
      }
    },
    "/v1/admin/hotels/{slug}": {
      "get": {
        "operationId": "get_hotel",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Ein Hotel vollständig: Einstellungen, PMS-Zugang (ohne Schlüssel), Agenten.",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        }
      },
      "put": {
        "operationId": "put_hotel",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Hotel anlegen oder ändern. Ein neues Hotel startet im Probemodus (dry_run): es wird nichts verschickt.",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Anzeigename, z. B. ART Hotel Braun. Pflicht beim Anlegen."
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused"
                    ],
                    "description": "paused = alle Tool-Aufrufe werden abgelehnt."
                  },
                  "timezone": {
                    "type": "string",
                    "description": "Standard Europe/Berlin."
                  }
                },
                "required": []
              }
            }
          }
        }
      }
    },
    "/v1/admin/hotels/{slug}/check": {
      "post": {
        "operationId": "check_hotel",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Prüft den PMS-Zugang live und vergleicht Kategorien und Raten mit den Einstellungen.",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        }
      }
    },
    "/v1/admin/hotels/{slug}/config": {
      "get": {
        "operationId": "get_hotel_config",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Einstellungen eines Hotels lesen (Empfänger, SMS-Texte, Raten, Zugangscode-Regeln).",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        }
      },
      "patch": {
        "operationId": "patch_hotel_config",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Einstellungen in Teilen ändern. Objekte werden zusammengeführt, Listen und Werte ersetzt, null entfernt einen Eintrag. Ungültiges wird abgelehnt, nichts wird gespeichert.",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notifications": {
                    "type": "object",
                    "description": "z. B. {\"email_to\": [\"team@hotel.de\"], \"mode\": \"live\"}"
                  }
                },
                "required": []
              }
            }
          }
        }
      },
      "put": {
        "operationId": "put_hotel_config",
        "tags": [
          "Verwaltung"
        ],
        "summary": "Einstellungen vollständig ersetzen.",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {},
                "required": []
              }
            }
          }
        }
      }
    },
    "/v1/admin/hotels/{slug}/pms_connection": {
      "put": {
        "operationId": "put_pms_connection",
        "tags": [
          "Verwaltung"
        ],
        "summary": "PMS-Zugang hinterlegen. Der Schlüssel wird verschlüsselt gespeichert und nie zurückgegeben; ohne api_key bleibt der gespeicherte erhalten.",
        "security": [
          {
            "admin_key": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON with ok=true and the data."
          },
          "400": {
            "description": "Rejected: ok=false, error code, details."
          },
          "401": {
            "description": "Admin key missing or wrong."
          },
          "404": {
            "description": "Hotel not found."
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pms_type": {
                    "type": "string",
                    "description": "z. B. 3rpms"
                  },
                  "endpoint": {
                    "type": "string",
                    "description": "https-Adresse des PMS, z. B. https://www.3rpms.de/graphql"
                  },
                  "api_key": {
                    "type": "string",
                    "description": "PMS-Schlüssel. Nur schreiben."
                  },
                  "write_mode": {
                    "type": "string",
                    "enum": [
                      "disabled",
                      "dry_run",
                      "live"
                    ],
                    "description": "dry_run = Buchungen simuliert."
                  }
                },
                "required": [
                  "pms_type",
                  "endpoint"
                ]
              }
            }
          }
        }
      }
    },
    "/v1/initiation": {
      "post": {
        "operationId": "conversation_initiation",
        "tags": [
          "Gespraechsbeginn"
        ],
        "summary": "Optional ElevenLabs conversation initiation webhook: the start variables of the hotel (e.g. first_message).",
        "security": [
          {
            "fleet_secret": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "agent_id": {
                    "type": "string"
                  },
                  "conversation_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "agent_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "conversation_initiation_client_data with dynamic_variables."
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/booking_change": {
      "post": {
        "operationId": "std_booking_change",
        "tags": [
          "Standardtools"
        ],
        "summary": "Pass a change request for an existing booking to the hotel.",
        "description": "Pass a change request for an existing booking to the hotel. It does not change anything itself; the hotel confirms. Returns a reference. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "requested_change": {
                    "type": "string",
                    "description": "The requested change in one sentence, e.g. extend the stay by one night."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "reservation_number": {
                    "type": "string",
                    "description": "The hotel's reservation number, e.g. 524301. Booking portal numbers do not count. Omit if unknown."
                  },
                  "check_in_date": {
                    "type": "string",
                    "description": "Arrival date, format YYYY-MM-DD, e.g. 2026-12-03."
                  },
                  "booking_type": {
                    "type": "string",
                    "description": "private or business. Set business only if the caller mentions a company or a business trip; otherwise omit.",
                    "enum": [
                      "private",
                      "business"
                    ]
                  },
                  "company_name": {
                    "type": "string",
                    "description": "Company name for business bookings, e.g. ACME GmbH. Otherwise omit."
                  },
                  "email": {
                    "type": "string",
                    "description": "Email address, e.g. anna@example.org. Omit if not given."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Callback number, only if the caller states one that differs from the calling number, e.g. +491701234567. Otherwise omit."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Additional details for the hotel team in one or two sentences. Omit if none."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "last_name",
                  "requested_change",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "notification_failed",
                  "request_id": "mock-0000",
                  "message": "Die Meldung konnte wegen eines technischen Fehlers nicht an das Team übermittelt werden. Sage dem Gast offen, dass die Übermittlung nicht bestätigt werden konnte, und folge der vorgesehenen Fehlerbehandlung."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/callback": {
      "post": {
        "operationId": "std_callback",
        "tags": [
          "Standardtools"
        ],
        "summary": "Record a callback request for the hotel team.",
        "description": "Record a callback request for the hotel team. Use when the caller wants to be called back. Returns a reference. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "request": {
                    "type": "string",
                    "description": "The caller's request in one clear sentence."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Callback number, only if the caller states one that differs from the calling number, e.g. +491701234567. Otherwise omit."
                  },
                  "callback_date": {
                    "type": "string",
                    "description": "Requested callback date, format YYYY-MM-DD. Omit for as soon as possible."
                  },
                  "callback_time": {
                    "type": "string",
                    "description": "Requested callback time, format HH:MM, e.g. 15:30. Omit for as soon as possible."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Additional details for the hotel team in one or two sentences. Omit if none."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "last_name",
                  "request",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "notification_failed",
                  "request_id": "mock-0000",
                  "message": "Die Meldung konnte wegen eines technischen Fehlers nicht an das Team übermittelt werden. Sage dem Gast offen, dass die Übermittlung nicht bestätigt werden konnte, und folge der vorgesehenen Fehlerbehandlung."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/event_request": {
      "post": {
        "operationId": "std_event_request",
        "tags": [
          "Standardtools"
        ],
        "summary": "Pass an event or celebration request to the hotel team.",
        "description": "Pass an event or celebration request to the hotel team. Returns a reference. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "request": {
                    "type": "string",
                    "description": "The caller's request in one clear sentence."
                  },
                  "event_type": {
                    "type": "string",
                    "description": "Type of event, e.g. Hochzeit, Tagung, Geburtstag."
                  },
                  "event_date": {
                    "type": "string",
                    "description": "Date of the event, format YYYY-MM-DD, e.g. 2027-06-12."
                  },
                  "guests": {
                    "type": "integer",
                    "description": "Number of guests as an integer, e.g. 2."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "event_time": {
                    "type": "string",
                    "description": "Start time of the event, format HH:MM, e.g. 18:00. Omit if not stated."
                  },
                  "email": {
                    "type": "string",
                    "description": "Email address, e.g. anna@example.org. Omit if not given."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Callback number, only if the caller states one that differs from the calling number, e.g. +491701234567. Otherwise omit."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Additional details for the hotel team in one or two sentences. Omit if none."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "last_name",
                  "request",
                  "event_type",
                  "event_date",
                  "guests",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "notification_failed",
                  "request_id": "mock-0000",
                  "message": "Die Meldung konnte wegen eines technischen Fehlers nicht an das Team übermittelt werden. Sage dem Gast offen, dass die Übermittlung nicht bestätigt werden konnte, und folge der vorgesehenen Fehlerbehandlung."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/invoice": {
      "post": {
        "operationId": "std_invoice",
        "tags": [
          "Standardtools"
        ],
        "summary": "Pass an invoice or accounting request to the hotel team.",
        "description": "Pass an invoice or accounting request to the hotel team. Returns a reference. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "request": {
                    "type": "string",
                    "description": "The caller's request in one clear sentence."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "reservation_number": {
                    "type": "string",
                    "description": "The hotel's reservation number, e.g. 524301. Booking portal numbers do not count. Omit if unknown."
                  },
                  "invoice_number": {
                    "type": "string",
                    "description": "Invoice number if the caller has one. Otherwise omit."
                  },
                  "check_in_date": {
                    "type": "string",
                    "description": "Arrival date, format YYYY-MM-DD, e.g. 2026-12-03."
                  },
                  "booking_type": {
                    "type": "string",
                    "description": "private or business. Set business only if the caller mentions a company or a business trip; otherwise omit.",
                    "enum": [
                      "private",
                      "business"
                    ]
                  },
                  "company_name": {
                    "type": "string",
                    "description": "Company name for business bookings, e.g. ACME GmbH. Otherwise omit."
                  },
                  "billing_address": {
                    "type": "string",
                    "description": "Billing address if the caller gives one. Otherwise omit."
                  },
                  "email": {
                    "type": "string",
                    "description": "Email address, e.g. anna@example.org. Omit if not given."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Callback number, only if the caller states one that differs from the calling number, e.g. +491701234567. Otherwise omit."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Additional details for the hotel team in one or two sentences. Omit if none."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "last_name",
                  "request",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "notification_failed",
                  "request_id": "mock-0000",
                  "message": "Die Meldung konnte wegen eines technischen Fehlers nicht an das Team übermittelt werden. Sage dem Gast offen, dass die Übermittlung nicht bestätigt werden konnte, und folge der vorgesehenen Fehlerbehandlung."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/lost_item": {
      "post": {
        "operationId": "std_lost_item",
        "tags": [
          "Standardtools"
        ],
        "summary": "Report a lost item to the hotel team.",
        "description": "Report a lost item to the hotel team. Put the item in request; where it was left, departure date and shipping wishes in notes. Returns a reference. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "request": {
                    "type": "string",
                    "description": "The caller's request in one clear sentence."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Callback number, only if the caller states one that differs from the calling number, e.g. +491701234567. Otherwise omit."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Additional details for the hotel team in one or two sentences. Omit if none."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "last_name",
                  "request",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "notification_failed",
                  "request_id": "mock-0000",
                  "message": "Die Meldung konnte wegen eines technischen Fehlers nicht an das Team übermittelt werden. Sage dem Gast offen, dass die Übermittlung nicht bestätigt werden konnte, und folge der vorgesehenen Fehlerbehandlung."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/maintenance": {
      "post": {
        "operationId": "std_maintenance",
        "tags": [
          "Standardtools"
        ],
        "summary": "Report a technical problem in a room to the hotel team.",
        "description": "Report a technical problem in a room to the hotel team. Returns a reference. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "request": {
                    "type": "string",
                    "description": "The caller's request in one clear sentence."
                  },
                  "room_number": {
                    "type": "string",
                    "description": "Room number as stated, e.g. 207."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "request",
                  "room_number",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "success",
                  "reference": "A1B2C3D4",
                  "request_id": "mock-0000",
                  "message": "Instandhaltungsticket aufgenommen und an das Team weitergeleitet."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/message": {
      "post": {
        "operationId": "std_message",
        "tags": [
          "Standardtools"
        ],
        "summary": "Pass a general message from the caller to the hotel team.",
        "description": "Pass a general message from the caller to the hotel team. Use when no other tool fits. Returns a reference. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "request": {
                    "type": "string",
                    "description": "The caller's request in one clear sentence."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Callback number, only if the caller states one that differs from the calling number, e.g. +491701234567. Otherwise omit."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Additional details for the hotel team in one or two sentences. Omit if none."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "last_name",
                  "request",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "notification_failed",
                  "request_id": "mock-0000",
                  "message": "Die Meldung konnte wegen eines technischen Fehlers nicht an das Team übermittelt werden. Sage dem Gast offen, dass die Übermittlung nicht bestätigt werden konnte, und folge der vorgesehenen Fehlerbehandlung."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/parking_request": {
      "post": {
        "operationId": "std_parking_request",
        "tags": [
          "Standardtools"
        ],
        "summary": "Pass a parking space request to the hotel.",
        "description": "Pass a parking space request to the hotel. The hotel confirms. Returns a reference. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "check_in_date": {
                    "type": "string",
                    "description": "Arrival date, format YYYY-MM-DD, e.g. 2026-12-03."
                  },
                  "check_out_date": {
                    "type": "string",
                    "description": "Departure date, format YYYY-MM-DD, e.g. 2026-12-05."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "license_plate": {
                    "type": "string",
                    "description": "Vehicle license plate, e.g. HF-AB 123. Omit if not stated."
                  },
                  "reservation_number": {
                    "type": "string",
                    "description": "The hotel's reservation number, e.g. 524301. Booking portal numbers do not count. Omit if unknown."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Callback number, only if the caller states one that differs from the calling number, e.g. +491701234567. Otherwise omit."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Additional details for the hotel team in one or two sentences. Omit if none."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "last_name",
                  "check_in_date",
                  "check_out_date",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "notification_failed",
                  "request_id": "mock-0000",
                  "message": "Die Meldung konnte wegen eines technischen Fehlers nicht an das Team übermittelt werden. Sage dem Gast offen, dass die Übermittlung nicht bestätigt werden konnte, und folge der vorgesehenen Fehlerbehandlung."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/pms/3rpms/create_reservation": {
      "post": {
        "operationId": "pms_3rpms_create_reservation",
        "tags": [
          "PMS: 3RPMS"
        ],
        "summary": "Book exactly one room in the hotel's booking system.",
        "description": "Book exactly one room in the hotel's booking system. Use only after pms_3rpms_get_availability succeeded in this call and the guest explicitly confirmed the booking. Returns reservation_number and total_price. Never call it twice for the same booking. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "check_in_date": {
                    "type": "string",
                    "description": "Arrival date, format YYYY-MM-DD, e.g. 2026-12-03."
                  },
                  "check_out_date": {
                    "type": "string",
                    "description": "Departure date, format YYYY-MM-DD, e.g. 2026-12-05."
                  },
                  "guests": {
                    "type": "integer",
                    "description": "Number of guests as an integer, e.g. 2."
                  },
                  "room_category_id": {
                    "type": "string",
                    "description": "category_id of the chosen category from pms_3rpms_get_availability, unchanged, e.g. 402."
                  },
                  "breakfast": {
                    "type": "boolean",
                    "description": "true only if the guest explicitly wants breakfast, otherwise false."
                  },
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "email": {
                    "type": "string",
                    "description": "Email address, e.g. anna@example.org. Omit if not given."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Callback number, only if the caller states one that differs from the calling number, e.g. +491701234567. Otherwise omit."
                  },
                  "booker_first_name": {
                    "type": "string",
                    "description": "Only if the caller books for someone else: the caller's first name. Otherwise omit."
                  },
                  "booker_last_name": {
                    "type": "string",
                    "description": "Only if the caller books for someone else: the caller's last name. Otherwise omit."
                  },
                  "booking_type": {
                    "type": "string",
                    "description": "private or business. Set business only if the caller mentions a company or a business trip; otherwise omit.",
                    "enum": [
                      "private",
                      "business"
                    ]
                  },
                  "company_name": {
                    "type": "string",
                    "description": "Company name for business bookings, e.g. ACME GmbH. Otherwise omit."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Additional details for the hotel team in one or two sentences. Omit if none."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "check_in_date",
                  "check_out_date",
                  "guests",
                  "room_category_id",
                  "breakfast",
                  "last_name",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "booking_unknown",
                  "request_id": "mock-0000",
                  "message": "Der Ausgang der Buchung ist UNKLAR. Bestätige KEINE Buchung und KEINE Reservierungsnummer und sage auch nicht, dass die Buchung fehlgeschlagen ist. Sage, dass das Team die Reservierung prüft und sich meldet, und nimm einen Rückruf auf. Lege KEINE neue Reservierung an."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/pms/3rpms/find_reservation": {
      "post": {
        "operationId": "pms_3rpms_find_reservation",
        "tags": [
          "PMS: 3RPMS"
        ],
        "summary": "Find an existing reservation and verify the caller.",
        "description": "Find an existing reservation and verify the caller. Without parameters it searches by the calling number (a hint, not a verification). Pass first_name and last_name, or reservation_number, to verify. Returns matches with guest_name, reservation_number, room_number and dates; access_code only if released. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "reservation_number": {
                    "type": "string",
                    "description": "The hotel's reservation number, e.g. 524301. Booking portal numbers do not count. Omit if unknown."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "success",
                  "matches": [
                    {
                      "guest_name": "Jonas Kestner",
                      "reservation_number": "500100",
                      "room_number": "207",
                      "category_name": "Standard-Einzelzimmer",
                      "check_in_date": "2026-11-19",
                      "check_out_date": "2026-11-20",
                      "access_code": "4729",
                      "access_code_exists": true
                    }
                  ],
                  "access_code_available": true,
                  "verified_by": "reservation_number",
                  "request_id": "mock-0000",
                  "message": "Buchung gefunden: Jonas Kestner, Reservierungsnummer 500100. Anreise ist heute. Zimmer 207. Der Anrufer gilt damit als bestätigt. Der persönliche Zugangscode lautet 4 7 2 9. Nenne ihn Ziffer für Ziffer, langsam."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/pms/3rpms/get_access_code": {
      "post": {
        "operationId": "pms_3rpms_get_access_code",
        "tags": [
          "PMS: 3RPMS"
        ],
        "summary": "Give the caller their personal access code for the house or room door.",
        "description": "Give the caller their personal access code for the house or room door. Without parameters it searches by the calling number. Pass first_name and last_name, or reservation_number, to identify the caller. The response carries access_code only if access_code_available is true; otherwise the message says why and what to do next. Never state a code that is not in the response. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "reservation_number": {
                    "type": "string",
                    "description": "The hotel's reservation number, e.g. 524301. Booking portal numbers do not count. Omit if unknown."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "success",
                  "access_code_available": true,
                  "access_code": "4729",
                  "guest_name": "Jonas Kestner",
                  "reservation_number": "500100",
                  "room_number": "207",
                  "check_in_date": "2026-11-19",
                  "check_out_date": "2026-11-20",
                  "verified_by": "reservation_number",
                  "request_id": "mock-0000",
                  "message": "Buchung gefunden: Jonas Kestner, Reservierungsnummer 500100. Anreise ist heute. Zimmer 207. Der Anrufer gilt damit als bestätigt. Der persönliche Zugangscode lautet 4 7 2 9. Nenne ihn Ziffer für Ziffer, langsam."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/pms/3rpms/get_availability": {
      "post": {
        "operationId": "pms_3rpms_get_availability",
        "tags": [
          "PMS: 3RPMS"
        ],
        "summary": "Check live room availability and prices for a stay.",
        "description": "Check live room availability and prices for a stay. Use before stating any availability or price and always before pms_3rpms_create_reservation. Returns available_categories with category_id, name, total_price and price_per_night. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "check_in_date": {
                    "type": "string",
                    "description": "Arrival date, format YYYY-MM-DD, e.g. 2026-12-03."
                  },
                  "check_out_date": {
                    "type": "string",
                    "description": "Departure date, format YYYY-MM-DD, e.g. 2026-12-05."
                  },
                  "guests": {
                    "type": "integer",
                    "description": "Number of guests as an integer, e.g. 2."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "check_in_date",
                  "check_out_date",
                  "guests",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "no_availability",
                  "info_only_categories": [],
                  "nights": 2,
                  "request_id": "mock-0000",
                  "message": "Für diesen Zeitraum ist telefonisch nichts buchbar. Sage das offen und biete an, einen anderen Zeitraum oder eine andere Personenzahl zu prüfen. Erfinde KEINE Alternative."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/room_cancellation": {
      "post": {
        "operationId": "std_room_cancellation",
        "tags": [
          "Standardtools"
        ],
        "summary": "Pass a cancellation request for an existing booking to the hotel.",
        "description": "Pass a cancellation request for an existing booking to the hotel. It does not cancel anything itself; the hotel confirms. Returns a reference. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "check_in_date": {
                    "type": "string",
                    "description": "Arrival date, format YYYY-MM-DD, e.g. 2026-12-03."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "reservation_number": {
                    "type": "string",
                    "description": "The hotel's reservation number, e.g. 524301. Booking portal numbers do not count. Omit if unknown."
                  },
                  "reason": {
                    "type": "string",
                    "description": "Reason for the cancellation if the caller gives one. Otherwise omit."
                  },
                  "booking_type": {
                    "type": "string",
                    "description": "private or business. Set business only if the caller mentions a company or a business trip; otherwise omit.",
                    "enum": [
                      "private",
                      "business"
                    ]
                  },
                  "company_name": {
                    "type": "string",
                    "description": "Company name for business bookings, e.g. ACME GmbH. Otherwise omit."
                  },
                  "email": {
                    "type": "string",
                    "description": "Email address, e.g. anna@example.org. Omit if not given."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Callback number, only if the caller states one that differs from the calling number, e.g. +491701234567. Otherwise omit."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Additional details for the hotel team in one or two sentences. Omit if none."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "last_name",
                  "check_in_date",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "notification_failed",
                  "request_id": "mock-0000",
                  "message": "Die Meldung konnte wegen eines technischen Fehlers nicht an das Team übermittelt werden. Sage dem Gast offen, dass die Übermittlung nicht bestätigt werden konnte, und folge der vorgesehenen Fehlerbehandlung."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/room_request": {
      "post": {
        "operationId": "std_room_request",
        "tags": [
          "Standardtools"
        ],
        "summary": "Pass a non-binding room request to the hotel.",
        "description": "Pass a non-binding room request to the hotel. Use when a room cannot be booked directly. The hotel confirms availability and price. Returns a reference. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "last_name": {
                    "type": "string",
                    "description": "Guest's last name as understood, e.g. Beispiel."
                  },
                  "check_in_date": {
                    "type": "string",
                    "description": "Arrival date, format YYYY-MM-DD, e.g. 2026-12-03."
                  },
                  "check_out_date": {
                    "type": "string",
                    "description": "Departure date, format YYYY-MM-DD, e.g. 2026-12-05."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "Guest's first name, e.g. Anna. Omit if not given."
                  },
                  "guests": {
                    "type": "integer",
                    "description": "Number of guests as an integer, e.g. 2."
                  },
                  "rooms": {
                    "type": "integer",
                    "description": "Number of rooms as an integer, e.g. 1. Omit if not stated."
                  },
                  "room_type": {
                    "type": "string",
                    "description": "Requested room category in the caller's words, e.g. Doppelzimmer. Omit if not stated."
                  },
                  "booking_type": {
                    "type": "string",
                    "description": "private or business. Set business only if the caller mentions a company or a business trip; otherwise omit.",
                    "enum": [
                      "private",
                      "business"
                    ]
                  },
                  "company_name": {
                    "type": "string",
                    "description": "Company name for business bookings, e.g. ACME GmbH. Otherwise omit."
                  },
                  "billing_address": {
                    "type": "string",
                    "description": "Billing address if the caller gives one. Otherwise omit."
                  },
                  "email": {
                    "type": "string",
                    "description": "Email address, e.g. anna@example.org. Omit if not given."
                  },
                  "phone": {
                    "type": "string",
                    "description": "Callback number, only if the caller states one that differs from the calling number, e.g. +491701234567. Otherwise omit."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Additional details for the hotel team in one or two sentences. Omit if none."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "last_name",
                  "check_in_date",
                  "check_out_date",
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "error",
                  "error": "notification_failed",
                  "request_id": "mock-0000",
                  "message": "Die Meldung konnte wegen eines technischen Fehlers nicht an das Team übermittelt werden. Sage dem Gast offen, dass die Übermittlung nicht bestätigt werden konnte, und folge der vorgesehenen Fehlerbehandlung."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/telephony/emergency_contact": {
      "post": {
        "operationId": "telephony_emergency_contact",
        "tags": [
          "Anruf-Tools"
        ],
        "summary": "Connect the caller to the emergency contact of the hotel.",
        "description": "Connect the caller to the emergency contact of the hotel. Use only in an acute situation as the action card describes. Announce it in one short sentence in the same turn; the tool runs after you have finished speaking. A success does not mean someone picked up. If it fails, stay with the caller and help; never take a message instead. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "summary": {
                    "type": "string",
                    "description": "One sentence on why the caller is being connected. Omit if unclear."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "success",
                  "target": "emergency",
                  "request_id": "mock-0000",
                  "message": "Der Verbindungsversuch zum Notfallkontakt läuft. Sage dem Anrufer in einem kurzen Satz, dass du ihn jetzt verbindest, und sprich danach nicht weiter."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/telephony/transfer_1": {
      "post": {
        "operationId": "telephony_transfer_1",
        "tags": [
          "Anruf-Tools"
        ],
        "summary": "Connect the caller to a person at the hotel (destination 1; the action card says who that is).",
        "description": "Connect the caller to a person at the hotel (destination 1; the action card says who that is). Use only when the action card tells you to transfer. Announce the transfer in one short sentence in the same turn; the tool runs after you have finished speaking and the call then leaves you. The call starts ringing; a success does not mean someone picked up. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "summary": {
                    "type": "string",
                    "description": "One sentence on why the caller is being connected. Omit if unclear."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "success",
                  "target": "transfer_1",
                  "request_id": "mock-0000",
                  "message": "Der Verbindungsversuch läuft. Sage dem Anrufer in einem kurzen Satz, dass du ihn jetzt verbindest, und sprich danach nicht weiter."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/telephony/transfer_2": {
      "post": {
        "operationId": "telephony_transfer_2",
        "tags": [
          "Anruf-Tools"
        ],
        "summary": "Connect the caller to a person at the hotel (destination 2; the action card says who that is).",
        "description": "Connect the caller to a person at the hotel (destination 2; the action card says who that is). Use only when the action card tells you to transfer. Announce the transfer in one short sentence in the same turn; the tool runs after you have finished speaking and the call then leaves you. The call starts ringing; a success does not mean someone picked up. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "summary": {
                    "type": "string",
                    "description": "One sentence on why the caller is being connected. Omit if unclear."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "success",
                  "target": "transfer_2",
                  "request_id": "mock-0000",
                  "message": "Der Verbindungsversuch läuft. Sage dem Anrufer in einem kurzen Satz, dass du ihn jetzt verbindest, und sprich danach nicht weiter."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/telephony/transfer_3": {
      "post": {
        "operationId": "telephony_transfer_3",
        "tags": [
          "Anruf-Tools"
        ],
        "summary": "Connect the caller to a person at the hotel (destination 3; the action card says who that is).",
        "description": "Connect the caller to a person at the hotel (destination 3; the action card says who that is). Use only when the action card tells you to transfer. Announce the transfer in one short sentence in the same turn; the tool runs after you have finished speaking and the call then leaves you. The call starts ringing; a success does not mean someone picked up. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "summary": {
                    "type": "string",
                    "description": "One sentence on why the caller is being connected. Omit if unclear."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "success",
                  "target": "transfer_3",
                  "request_id": "mock-0000",
                  "message": "Der Verbindungsversuch läuft. Sage dem Anrufer in einem kurzen Satz, dass du ihn jetzt verbindest, und sprich danach nicht weiter."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    },
    "/v1/tools/telephony/transfer_4": {
      "post": {
        "operationId": "telephony_transfer_4",
        "tags": [
          "Anruf-Tools"
        ],
        "summary": "Connect the caller to a person at the hotel (destination 4; the action card says who that is).",
        "description": "Connect the caller to a person at the hotel (destination 4; the action card says who that is). Use only when the action card tells you to transfer. Announce the transfer in one short sentence in the same turn; the tool runs after you have finished speaking and the call then leaves you. The call starts ringing; a success does not mean someone picked up. On error the response carries status=error, an error code and a message that says what to do next.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "summary": {
                    "type": "string",
                    "description": "One sentence on why the caller is being connected. Omit if unclear."
                  },
                  "system__agent_id": {
                    "type": "string",
                    "description": "ElevenLabs agent id. Set by the platform, never by the language model. Identifies the hotel."
                  },
                  "system__conversation_id": {
                    "type": "string",
                    "description": "ElevenLabs conversation id. The call must belong to a running conversation of this agent."
                  },
                  "system__caller_id": {
                    "type": "string",
                    "description": "Calling number as delivered by the platform."
                  },
                  "system__called_number": {
                    "type": "string",
                    "description": "Called number as delivered by the platform."
                  }
                },
                "required": [
                  "system__agent_id",
                  "system__conversation_id",
                  "system__caller_id"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Result for the agent. Errors the agent can act on also come with 200 and status=error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                },
                "example": {
                  "status": "success",
                  "target": "transfer_4",
                  "request_id": "mock-0000",
                  "message": "Der Verbindungsversuch läuft. Sage dem Anrufer in einem kurzen Satz, dass du ihn jetzt verbindest, und sprich danach nicht weiter."
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Refused"
          },
          "401": {
            "$ref": "#/components/responses/Refused"
          },
          "403": {
            "$ref": "#/components/responses/Refused"
          },
          "429": {
            "$ref": "#/components/responses/Refused"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "admin_key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Sorhage-Admin-Key",
        "description": "Separate key for the management API. Never used by agents."
      },
      "fleet_secret": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Sorhage-Auth",
        "description": "One key for all agents and routes (ElevenLabs workspace secret). In addition every call must carry system__agent_id and system__conversation_id of a conversation that is running right now; the API verifies this with ElevenLabs."
      }
    },
    "responses": {
      "Refused": {
        "description": "Call refused. No detail is given to the caller; the reason is in the gateway log under request_id.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ToolResult"
            }
          }
        }
      }
    },
    "schemas": {
      "ToolResult": {
        "type": "object",
        "required": [
          "status",
          "request_id"
        ],
        "additionalProperties": true,
        "description": "Flat answer for the language model. Tool-specific fields are listed in docs/tool-standard.md.",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success",
              "error"
            ]
          },
          "error": {
            "type": "string",
            "description": "Machine-readable code, only with status=error.",
            "enum": [
              "missing_fields",
              "invalid_dates",
              "pms_error",
              "pms_not_connected",
              "pms_mismatch",
              "pms_function_unavailable",
              "no_config",
              "notification_failed",
              "no_availability",
              "category_not_found",
              "category_not_allowed",
              "category_priceless",
              "max_occupancy_exceeded",
              "room_unavailable",
              "category_restricted",
              "min_stay",
              "max_stay",
              "rate_plan_missing",
              "booking_disabled",
              "booking_failed",
              "booking_in_progress",
              "booking_unknown",
              "not_found",
              "ambiguous",
              "ambiguous_name",
              "cancelled",
              "rate_limited",
              "internal_error",
              "unauthorized",
              "forbidden",
              "unknown_function",
              "invalid_request"
            ]
          },
          "error_details": {
            "type": "string",
            "description": "With pms_error: timeout, network, auth, rate_limited, http."
          },
          "message": {
            "type": "string",
            "description": "German instruction to the agent: what happened and what to do next."
          },
          "request_id": {
            "type": "string"
          },
          "reference": {
            "type": "string",
            "description": "Standard tools: reference the agent may tell the caller."
          }
        }
      }
    }
  }
}