{
  "openapi": "3.0.3",
  "info": {
    "title": "Auto Appy AI API",
    "version": "2026-10-02.1",
    "description": "Auto Appy native application API reference, independent of workflow actions. Use the coverage report and exclusions to audit available endpoints. Third-party adapter endpoints are internal-only. Authentication and resource permissions still apply; see each operation for its authentication contract."
  },
  "servers": [
    {
      "url": "https://aiapi.autoappy.com"
    }
  ],
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Auto Appy application API key"
      }
    }
  },
  "paths": {
    "/api/auth/me": {
      "get": {
        "summary": "Me auto appy auth",
        "operationId": "GET_api_auth_me",
        "tags": [
          "Auto appy auth"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AutoAppyAuthController@me",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.session:force"
        ],
        "description": "Me for auto appy auth. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "data",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email",
              "description": "Data. Optional. "
            },
            "description": "Data. Optional. "
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/usage": {
      "get": {
        "summary": "Personal ai usage",
        "operationId": "GET_api_usage",
        "tags": [
          "Ai usage"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiUsageController@personal",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Personal for ai usage. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/source-library": {
      "get": {
        "summary": "Sources ai library",
        "operationId": "GET_api_source_library",
        "tags": [
          "Ai library"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiLibraryController@sources",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Sources for ai library. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Type. Optional. ",
              "enum": [
                "faq",
                "knowledge",
                "product",
                "intake"
              ]
            },
            "description": "Type. Optional. "
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Search. Optional. Limits: max:160."
            },
            "description": "Search. Optional. Limits: max:160."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page. Optional. Limits: min:1."
            },
            "description": "Page. Optional. Limits: min:1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Per page. Optional. "
            },
            "description": "Per page. Optional. "
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/bots": {
      "get": {
        "summary": "List bot",
        "operationId": "GET_api_bots",
        "tags": [
          "Bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\BotController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Index for bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/bots/{bot}": {
      "get": {
        "summary": "Get bot",
        "operationId": "GET_api_bots__bot_",
        "tags": [
          "Bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\BotController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Show for bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/ai-jobs/types": {
      "get": {
        "summary": "Job types ai job",
        "operationId": "GET_api_ai_jobs_types",
        "tags": [
          "Ai job"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiJobController@jobTypes",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Job types for ai job. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/ai-jobs/health": {
      "get": {
        "summary": "Health ai job",
        "operationId": "GET_api_ai_jobs_health",
        "tags": [
          "Ai job"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiJobController@health",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Health for ai job. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/ai-jobs": {
      "get": {
        "summary": "List ai job",
        "operationId": "GET_api_ai_jobs",
        "tags": [
          "Ai job"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "examples": {
                  "job_id": {
                    "summary": "Lookup fields for job_id",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "data": [
                        {
                          "id": "example-job_id",
                          "job_type": "Example job id"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiJobController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Index for ai job. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. \n\nLookup `job_id`: read `data[].id` as the value and `data[].job_type` as the label. Use identifiers only within their authorised workspace.",
        "parameters": [
          {
            "name": "job_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Job type."
            },
            "description": "Job type."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Status."
            },
            "description": "Status."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Per page."
            },
            "description": "Per page."
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create ai job",
        "operationId": "POST_api_ai_jobs",
        "tags": [
          "Ai job"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "201": {
            "description": "Job queued; data.id identifies the private job.",
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "id": "job-example",
                    "job_type": "call_transcript_url",
                    "status": "pending",
                    "stage": "queued"
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiJobController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Queue one of the supported AI utilities. Returns 201 with data.id and pending status. Poll GET /api/ai-jobs/{aiJob}; do not resubmit the job to poll. See the lookup cookbook for all five complete input examples.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "job_type": {
                    "type": "string",
                    "description": "Type from GET /api/ai-jobs/types."
                  },
                  "input": {
                    "type": "object",
                    "description": "Tool-specific fields; see the examples.",
                    "additionalProperties": true
                  }
                },
                "required": [
                  "job_type",
                  "input"
                ]
              },
              "examples": {
                "audio": {
                  "summary": "Audio",
                  "value": {
                    "job_type": "call_transcript_url",
                    "input": {
                      "call_url": "https://example.com/audio.mp3",
                      "output_mode": "original"
                    }
                  }
                },
                "video": {
                  "summary": "Video",
                  "value": {
                    "job_type": "meeting_transcript_url",
                    "input": {
                      "video_url": "https://example.com/video.mp4",
                      "track_index": 0
                    }
                  }
                },
                "website": {
                  "summary": "Website",
                  "value": {
                    "job_type": "web_process",
                    "input": {
                      "start_url": "https://example.com",
                      "mode": "all"
                    }
                  }
                },
                "extraction": {
                  "summary": "Extraction",
                  "value": {
                    "job_type": "text_extraction",
                    "input": {
                      "long_text": "Raj: raj@example.com",
                      "fields": [
                        {
                          "name": "email",
                          "type": "string",
                          "description": "Email address"
                        }
                      ]
                    }
                  }
                },
                "matching": {
                  "summary": "Matching",
                  "value": {
                    "job_type": "smart_selector",
                    "input": {
                      "input": {
                        "text": "Invoice please",
                        "options": [
                          "Sales",
                          "Billing"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/ai-jobs/{aiJob}": {
      "get": {
        "summary": "Get ai job",
        "operationId": "GET_api_ai_jobs__aiJob_",
        "tags": [
          "Ai job"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiJobController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Show for ai job. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "aiJob",
            "in": "path",
            "required": true,
            "description": "Ai job identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete ai job",
        "operationId": "DELETE_api_ai_jobs__aiJob_",
        "tags": [
          "Ai job"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiJobController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Destroy for ai job. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "aiJob",
            "in": "path",
            "required": true,
            "description": "Ai job identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/ai-jobs/{aiJob}/cancel": {
      "post": {
        "summary": "Cancel ai job",
        "operationId": "POST_api_ai_jobs__aiJob__cancel",
        "tags": [
          "Ai job"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiJobController@cancel",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Cancel for ai job. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "aiJob",
            "in": "path",
            "required": true,
            "description": "Ai job identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/faq-bots": {
      "get": {
        "summary": "List faq bot",
        "operationId": "GET_api_faq_bots",
        "tags": [
          "Faq bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FaqBotController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Index for faq bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create faq bot",
        "operationId": "POST_api_faq_bots",
        "tags": [
          "Faq bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FaqBotController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Store for faq bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:120."
                  },
                  "entries": {
                    "type": "array",
                    "items": {},
                    "description": "Entries. Required. Limits: min:1."
                  }
                },
                "required": [
                  "name",
                  "entries"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/faq-bots/{faqBot}": {
      "get": {
        "summary": "Get faq bot",
        "operationId": "GET_api_faq_bots__faqBot_",
        "tags": [
          "Faq bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FaqBotController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Show for faq bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "faqBot",
            "in": "path",
            "required": true,
            "description": "Faq bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update faq bot",
        "operationId": "PUT_api_faq_bots__faqBot_",
        "tags": [
          "Faq bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FaqBotController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Update for faq bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "faqBot",
            "in": "path",
            "required": true,
            "description": "Faq bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:120."
                  },
                  "entries": {
                    "type": "array",
                    "items": {},
                    "description": "Entries. Required. Limits: min:1."
                  }
                },
                "required": [
                  "name",
                  "entries"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete faq bot",
        "operationId": "DELETE_api_faq_bots__faqBot_",
        "tags": [
          "Faq bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FaqBotController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Destroy for faq bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "faqBot",
            "in": "path",
            "required": true,
            "description": "Faq bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/faq-bots/{faqBot}/ask": {
      "post": {
        "summary": "Ask faq bot",
        "operationId": "POST_api_faq_bots__faqBot__ask",
        "tags": [
          "Faq bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FaqBotController@ask",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Ask for faq bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "faqBot",
            "in": "path",
            "required": true,
            "description": "Faq bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Message. Required. Limits: max:2000."
                  }
                },
                "required": [
                  "message"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/knowledge-bots": {
      "get": {
        "summary": "List knowledge bot",
        "operationId": "GET_api_knowledge_bots",
        "tags": [
          "Knowledge bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\KnowledgeBotController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Index for knowledge bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create knowledge bot",
        "operationId": "POST_api_knowledge_bots",
        "tags": [
          "Knowledge bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\KnowledgeBotController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Store for knowledge bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:120."
                  },
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "Document. Required. Limits: max:20480."
                  }
                },
                "required": [
                  "name",
                  "document"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/knowledge-bots/{knowledgeBot}": {
      "get": {
        "summary": "Get knowledge bot",
        "operationId": "GET_api_knowledge_bots__knowledgeBot_",
        "tags": [
          "Knowledge bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\KnowledgeBotController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Show for knowledge bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "knowledgeBot",
            "in": "path",
            "required": true,
            "description": "Knowledge bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete knowledge bot",
        "operationId": "DELETE_api_knowledge_bots__knowledgeBot_",
        "tags": [
          "Knowledge bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\KnowledgeBotController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Destroy for knowledge bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "knowledgeBot",
            "in": "path",
            "required": true,
            "description": "Knowledge bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/knowledge-bots/{knowledgeBot}/document": {
      "post": {
        "summary": "Replace document knowledge bot",
        "operationId": "POST_api_knowledge_bots__knowledgeBot__document",
        "tags": [
          "Knowledge bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\KnowledgeBotController@replaceDocument",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Replace document for knowledge bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "knowledgeBot",
            "in": "path",
            "required": true,
            "description": "Knowledge bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "Document. Required. Limits: max:20480."
                  }
                },
                "required": [
                  "document"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/knowledge-bots/{knowledgeBot}/ask": {
      "post": {
        "summary": "Ask knowledge bot",
        "operationId": "POST_api_knowledge_bots__knowledgeBot__ask",
        "tags": [
          "Knowledge bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\KnowledgeBotController@ask",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Ask for knowledge bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "knowledgeBot",
            "in": "path",
            "required": true,
            "description": "Knowledge bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Message. Required. Limits: max:2000."
                  }
                },
                "required": [
                  "message"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/product-bots": {
      "get": {
        "summary": "List product bot",
        "operationId": "GET_api_product_bots",
        "tags": [
          "Product bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\ProductBotController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Index for product bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create product bot",
        "operationId": "POST_api_product_bots",
        "tags": [
          "Product bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\ProductBotController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Store for product bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "catalog": {
                    "type": "string",
                    "format": "binary",
                    "description": "Catalog. Required. Limits: max:10240."
                  }
                },
                "required": [
                  "catalog"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/product-bots/{productBot}": {
      "get": {
        "summary": "Get product bot",
        "operationId": "GET_api_product_bots__productBot_",
        "tags": [
          "Product bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\ProductBotController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Show for product bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "productBot",
            "in": "path",
            "required": true,
            "description": "Product bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update product bot",
        "operationId": "PUT_api_product_bots__productBot_",
        "tags": [
          "Product bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\ProductBotController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Update for product bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "productBot",
            "in": "path",
            "required": true,
            "description": "Product bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete product bot",
        "operationId": "DELETE_api_product_bots__productBot_",
        "tags": [
          "Product bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\ProductBotController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Destroy for product bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "productBot",
            "in": "path",
            "required": true,
            "description": "Product bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/product-bots/{productBot}/catalog": {
      "post": {
        "summary": "Replace catalog product bot",
        "operationId": "POST_api_product_bots__productBot__catalog",
        "tags": [
          "Product bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\ProductBotController@replaceCatalog",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Replace catalog for product bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "productBot",
            "in": "path",
            "required": true,
            "description": "Product bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "catalog": {
                    "type": "string",
                    "format": "binary",
                    "description": "Catalog. Required. Limits: max:10240."
                  }
                },
                "required": [
                  "catalog"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/product-bots/{productBot}/reset": {
      "post": {
        "summary": "Reset conversation product bot",
        "operationId": "POST_api_product_bots__productBot__reset",
        "tags": [
          "Product bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\ProductBotController@resetConversation",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Reset conversation for product bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "productBot",
            "in": "path",
            "required": true,
            "description": "Product bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/product-bots/{productBot}/ask": {
      "post": {
        "summary": "Ask product bot",
        "operationId": "POST_api_product_bots__productBot__ask",
        "tags": [
          "Product bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\ProductBotController@ask",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Ask for product bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "productBot",
            "in": "path",
            "required": true,
            "description": "Product bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Message. Required. Limits: max:2000."
                  }
                },
                "required": [
                  "message"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/intake-bots": {
      "get": {
        "summary": "List intake bot",
        "operationId": "GET_api_intake_bots",
        "tags": [
          "Intake bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\IntakeBotController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Index for intake bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create intake bot",
        "operationId": "POST_api_intake_bots",
        "tags": [
          "Intake bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\IntakeBotController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Store for intake bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "Document. Required. Limits: max:20480."
                  }
                },
                "required": [
                  "document"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/intake-bots/{intakeBot}": {
      "get": {
        "summary": "Get intake bot",
        "operationId": "GET_api_intake_bots__intakeBot_",
        "tags": [
          "Intake bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\IntakeBotController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Show for intake bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "intakeBot",
            "in": "path",
            "required": true,
            "description": "Intake bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update intake bot",
        "operationId": "PUT_api_intake_bots__intakeBot_",
        "tags": [
          "Intake bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\IntakeBotController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Update for intake bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "intakeBot",
            "in": "path",
            "required": true,
            "description": "Intake bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete intake bot",
        "operationId": "DELETE_api_intake_bots__intakeBot_",
        "tags": [
          "Intake bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\IntakeBotController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Destroy for intake bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "intakeBot",
            "in": "path",
            "required": true,
            "description": "Intake bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/intake-bots/{intakeBot}/document": {
      "post": {
        "summary": "Replace document intake bot",
        "operationId": "POST_api_intake_bots__intakeBot__document",
        "tags": [
          "Intake bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\IntakeBotController@replaceDocument",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Replace document for intake bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "intakeBot",
            "in": "path",
            "required": true,
            "description": "Intake bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "document": {
                    "type": "string",
                    "format": "binary",
                    "description": "Document. Required. Limits: max:20480."
                  }
                },
                "required": [
                  "document"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/intake-bots/{intakeBot}/reset": {
      "post": {
        "summary": "Reset conversation intake bot",
        "operationId": "POST_api_intake_bots__intakeBot__reset",
        "tags": [
          "Intake bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\IntakeBotController@resetConversation",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Reset conversation for intake bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "intakeBot",
            "in": "path",
            "required": true,
            "description": "Intake bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/intake-bots/{intakeBot}/ask": {
      "post": {
        "summary": "Ask intake bot",
        "operationId": "POST_api_intake_bots__intakeBot__ask",
        "tags": [
          "Intake bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\IntakeBotController@ask",
        "x-auth-middleware": [
          "api",
          "autoappy.session"
        ],
        "description": "Ask for intake bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "intakeBot",
            "in": "path",
            "required": true,
            "description": "Intake bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": "Message. Required. Limits: max:2000."
                  }
                },
                "required": [
                  "message"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/bot-examples": {
      "get": {
        "summary": "List bot example",
        "operationId": "GET_api_orchestration_bot_examples",
        "tags": [
          "Bot example"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\BotExampleController@index",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Index for bot example. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create bot example",
        "operationId": "POST_api_orchestration_bot_examples",
        "tags": [
          "Bot example"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\BotExampleController@store",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Store for bot example. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "adapter": {
                    "type": "string",
                    "description": "Adapter. Required. "
                  }
                },
                "required": [
                  "adapter"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/usage": {
      "get": {
        "summary": "Organisation ai usage",
        "operationId": "GET_api_orchestration_usage",
        "tags": [
          "Ai usage"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiUsageController@organisation",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Organisation for ai usage. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/library": {
      "get": {
        "summary": "List ai library",
        "operationId": "GET_api_orchestration_library",
        "tags": [
          "Ai library"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiLibraryController@index",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Index for ai library. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "collection",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Collection. Optional. ",
              "enum": [
                "bots",
                "sources"
              ]
            },
            "description": "Collection. Optional. "
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Type. Optional. Limits: max:40."
            },
            "description": "Type. Optional. Limits: max:40."
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Search. Optional. Limits: max:160."
            },
            "description": "Search. Optional. Limits: max:160."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Page. Optional. Limits: min:1."
            },
            "description": "Page. Optional. Limits: min:1."
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Per page. Optional. Limits: min:1, max:100."
            },
            "description": "Per page. Optional. Limits: min:1, max:100."
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/history": {
      "get": {
        "summary": "List flow history",
        "operationId": "GET_api_orchestration_history",
        "tags": [
          "Flow history"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FlowHistoryController@index",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Index for flow history. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Search. Optional. Limits: max:160."
            },
            "description": "Search. Optional. Limits: max:160."
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Source. Optional. ",
              "enum": [
                "live",
                "preview"
              ]
            },
            "description": "Source. Optional. "
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "From. Optional. "
            },
            "description": "From. Optional. "
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "To. Optional. "
            },
            "description": "To. Optional. "
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Cursor. Optional. Limits: max:1000."
            },
            "description": "Cursor. Optional. Limits: max:1000."
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/history/{conversation}": {
      "get": {
        "summary": "All show flow history",
        "operationId": "GET_api_orchestration_history__conversation_",
        "tags": [
          "Flow history"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FlowHistoryController@allShow",
        "x-auth-middleware": [
          "api"
        ],
        "description": "All show for flow history. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/history/{conversation}/turns/{turn}": {
      "get": {
        "summary": "All path flow history",
        "operationId": "GET_api_orchestration_history__conversation__turns__turn_",
        "tags": [
          "Flow history"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FlowHistoryController@allPath",
        "x-auth-middleware": [
          "api"
        ],
        "description": "All path for flow history. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "turn",
            "in": "path",
            "required": true,
            "description": "Turn identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/sales-sources": {
      "get": {
        "summary": "Sales sources orchestration",
        "operationId": "GET_api_orchestration_sales_sources",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@salesSources",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Sales sources for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/bots": {
      "get": {
        "summary": "List bots",
        "description": "\n\nLookup `bot_id`: read `data[].id` as the value and `data[].name` as the label. Use identifiers only within their authorised workspace.",
        "operationId": "ai_get_api_orchestration_bots",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channel_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                },
                "examples": {
                  "bot_id": {
                    "summary": "Lookup fields for bot_id",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "data": [
                        {
                          "id": "example-bot_id",
                          "name": "Example bot id"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Bots & channels"
        ],
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@bots",
        "x-auth-middleware": [
          "api"
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Save bot orchestration",
        "operationId": "POST_api_orchestration_bots",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@saveBot",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Save bot for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:120."
                  },
                  "description": {
                    "type": "string",
                    "description": "Description. Required. Limits: max:1000."
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {},
                    "description": "Capabilities. Required. Limits: min:1, max:10."
                  },
                  "adapter": {
                    "type": "string",
                    "description": "Adapter. Required. ",
                    "enum": [
                      "'.implode('",
                      "'",
                      " config('orchestration.adapters'))"
                    ]
                  },
                  "active": {
                    "type": "string",
                    "description": "Active. Required. "
                  },
                  "expected_version": {
                    "type": "string",
                    "description": "Expected version. Optional. "
                  },
                  "source_id": {
                    "type": "string",
                    "description": "Source id. Optional. "
                  },
                  "instructions": {
                    "type": "string",
                    "description": "Instructions. Optional. Limits: max:4000."
                  },
                  "memory": {
                    "type": "string",
                    "description": "Memory. Optional. "
                  },
                  "sales": {
                    "type": "string",
                    "description": "Sales. Optional. "
                  },
                  "handoff": {
                    "type": "string",
                    "description": "Handoff. Optional. "
                  },
                  "creation_id": {
                    "type": "string",
                    "description": "Creation id. Optional. "
                  },
                  "flow": {
                    "type": "string",
                    "description": "Flow. Optional. "
                  },
                  "webhook_secrets": {
                    "type": "array",
                    "items": {},
                    "description": "Webhook secrets. Optional. Limits: max:60."
                  }
                },
                "required": [
                  "name",
                  "description",
                  "capabilities",
                  "adapter",
                  "active"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/bots/{bot}/history": {
      "get": {
        "summary": "List flow history",
        "operationId": "GET_api_orchestration_bots__bot__history",
        "tags": [
          "Flow history"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FlowHistoryController@index",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Index for flow history. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Search. Optional. Limits: max:160."
            },
            "description": "Search. Optional. Limits: max:160."
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Source. Optional. ",
              "enum": [
                "live",
                "preview"
              ]
            },
            "description": "Source. Optional. "
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "From. Optional. "
            },
            "description": "From. Optional. "
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "To. Optional. "
            },
            "description": "To. Optional. "
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Cursor. Optional. Limits: max:1000."
            },
            "description": "Cursor. Optional. Limits: max:1000."
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/bots/{bot}/history/{conversation}": {
      "get": {
        "summary": "Get flow history",
        "operationId": "GET_api_orchestration_bots__bot__history__conversation_",
        "tags": [
          "Flow history"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FlowHistoryController@show",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Show for flow history. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "before_sequence",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "description": "Before sequence. Optional. Limits: min:1."
            },
            "description": "Before sequence. Optional. Limits: min:1."
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/bots/{bot}/history/{conversation}/turns/{turn}": {
      "get": {
        "summary": "Path flow history",
        "operationId": "GET_api_orchestration_bots__bot__history__conversation__turns__turn_",
        "tags": [
          "Flow history"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\FlowHistoryController@path",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Path for flow history. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "turn",
            "in": "path",
            "required": true,
            "description": "Turn identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/bots/{bot}": {
      "get": {
        "summary": "Get bot",
        "description": "",
        "operationId": "ai_get_api_orchestration_bots_bot",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Bots & channels"
        ],
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@bot",
        "x-auth-middleware": [
          "api"
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Save bot orchestration",
        "operationId": "PUT_api_orchestration_bots__bot_",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@saveBot",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Save bot for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:120."
                  },
                  "description": {
                    "type": "string",
                    "description": "Description. Required. Limits: max:1000."
                  },
                  "capabilities": {
                    "type": "array",
                    "items": {},
                    "description": "Capabilities. Required. Limits: min:1, max:10."
                  },
                  "adapter": {
                    "type": "string",
                    "description": "Adapter. Required. ",
                    "enum": [
                      "'.implode('",
                      "'",
                      " config('orchestration.adapters'))"
                    ]
                  },
                  "active": {
                    "type": "string",
                    "description": "Active. Required. "
                  },
                  "expected_version": {
                    "type": "string",
                    "description": "Expected version. Optional. "
                  },
                  "source_id": {
                    "type": "string",
                    "description": "Source id. Optional. "
                  },
                  "instructions": {
                    "type": "string",
                    "description": "Instructions. Optional. Limits: max:4000."
                  },
                  "memory": {
                    "type": "string",
                    "description": "Memory. Optional. "
                  },
                  "sales": {
                    "type": "string",
                    "description": "Sales. Optional. "
                  },
                  "handoff": {
                    "type": "string",
                    "description": "Handoff. Optional. "
                  },
                  "creation_id": {
                    "type": "string",
                    "description": "Creation id. Optional. "
                  },
                  "flow": {
                    "type": "string",
                    "description": "Flow. Optional. "
                  },
                  "webhook_secrets": {
                    "type": "array",
                    "items": {},
                    "description": "Webhook secrets. Optional. Limits: max:60."
                  }
                },
                "required": [
                  "name",
                  "description",
                  "capabilities",
                  "adapter",
                  "active"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/bots/{bot}/preview": {
      "get": {
        "summary": "Preview memory bot orchestration",
        "operationId": "GET_api_orchestration_bots__bot__preview",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@previewMemoryBot",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Preview memory bot for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "person_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Person id. Required. "
            },
            "description": "Person id. Required. "
          },
          {
            "name": "event_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Event id. Required. "
            },
            "description": "Event id. Required. "
          },
          {
            "name": "message",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Message. Required. Limits: max:4000."
            },
            "description": "Message. Required. Limits: max:4000."
          },
          {
            "name": "choice_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Choice id. Optional. Limits: max:200."
            },
            "description": "Choice id. Optional. Limits: max:200."
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Preview memory bot orchestration",
        "operationId": "POST_api_orchestration_bots__bot__preview",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@previewMemoryBot",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Preview memory bot for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "person_id": {
                    "type": "string",
                    "description": "Person id. Required. "
                  },
                  "event_id": {
                    "type": "string",
                    "description": "Event id. Required. "
                  },
                  "message": {
                    "type": "string",
                    "description": "Message. Required. Limits: max:4000."
                  },
                  "choice_id": {
                    "type": "string",
                    "description": "Choice id. Optional. Limits: max:200."
                  }
                },
                "required": [
                  "person_id",
                  "event_id",
                  "message"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/channels": {
      "get": {
        "summary": "List channels",
        "description": "\n\nLookup `channel_id`: read `data[].id` as the value and `data[].name` as the label. Use identifiers only within their authorised workspace.",
        "operationId": "ai_get_api_orchestration_channels",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                },
                "examples": {
                  "channel_id": {
                    "summary": "Lookup fields for channel_id",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "data": [
                        {
                          "id": "example-channel_id",
                          "name": "Example channel id"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Bots & channels"
        ],
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@channels",
        "x-auth-middleware": [
          "api"
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Save channel orchestration",
        "operationId": "POST_api_orchestration_channels",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@saveChannel",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Save channel for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:120."
                  },
                  "kind": {
                    "type": "string",
                    "description": "Kind. Required. Limits: max:50."
                  },
                  "active": {
                    "type": "string",
                    "description": "Active. Required. "
                  },
                  "expected_version": {
                    "type": "string",
                    "description": "Expected version. Optional. "
                  },
                  "policy": {
                    "type": "string",
                    "description": "Policy. Required. "
                  }
                },
                "required": [
                  "name",
                  "kind",
                  "active",
                  "policy"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/channels/{channel}": {
      "get": {
        "summary": "Get channel",
        "description": "",
        "operationId": "ai_get_api_orchestration_channels_channel",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "channel",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Bots & channels"
        ],
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@channel",
        "x-auth-middleware": [
          "api"
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Save channel orchestration",
        "operationId": "PUT_api_orchestration_channels__channel_",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@saveChannel",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Save channel for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "channel",
            "in": "path",
            "required": true,
            "description": "Channel identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:120."
                  },
                  "kind": {
                    "type": "string",
                    "description": "Kind. Required. Limits: max:50."
                  },
                  "active": {
                    "type": "string",
                    "description": "Active. Required. "
                  },
                  "expected_version": {
                    "type": "string",
                    "description": "Expected version. Optional. "
                  },
                  "policy": {
                    "type": "string",
                    "description": "Policy. Required. "
                  }
                },
                "required": [
                  "name",
                  "kind",
                  "active",
                  "policy"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/contact-fields": {
      "get": {
        "summary": "Contact fields orchestration",
        "operationId": "GET_api_orchestration_contact_fields",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@contactFields",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Contact fields for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Contact fields orchestration",
        "operationId": "PUT_api_orchestration_contact_fields",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@contactFields",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Contact fields for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/channels/{channel}/people/{subject}/seed": {
      "post": {
        "summary": "Seed person memory orchestration",
        "operationId": "POST_api_orchestration_channels__channel__people__subject__seed",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@seedPersonMemory",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Seed person memory for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "channel",
            "in": "path",
            "required": true,
            "description": "Channel identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject",
            "in": "path",
            "required": true,
            "description": "Subject identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/channels/{channel}/events": {
      "post": {
        "summary": "Submit conversation event",
        "description": "202 queued/processing; 200 for other states/duplicate. Deduplicated per conversation/event ID and payload. This does not prove answer completion or delivery.",
        "operationId": "ai_post_api_orchestration_channels_channel_events",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "channel",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          }
        ],
        "responses": {
          "202": {
            "description": "Accepted asynchronously; read turn status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "conversation_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "session_id": {
                          "type": "string",
                          "nullable": true
                        },
                        "event_id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer"
                        },
                        "mode": {
                          "type": "string"
                        },
                        "decision": {
                          "type": "object",
                          "properties": {}
                        },
                        "delivery_status": {
                          "type": "string"
                        },
                        "error_code": {
                          "type": "string",
                          "nullable": true
                        },
                        "result": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "Existing or non-pending turn.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "conversation_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "session_id": {
                          "type": "string",
                          "nullable": true
                        },
                        "event_id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer"
                        },
                        "mode": {
                          "type": "string"
                        },
                        "decision": {
                          "type": "object",
                          "properties": {}
                        },
                        "delivery_status": {
                          "type": "string"
                        },
                        "error_code": {
                          "type": "string",
                          "nullable": true
                        },
                        "result": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contract_version": {
                    "type": "string",
                    "enum": [
                      "1.0"
                    ]
                  },
                  "conversation_id": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "event_id": {
                    "type": "string",
                    "maxLength": 160
                  },
                  "subject_id": {
                    "type": "string",
                    "maxLength": 160,
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9_.:-]*$"
                  },
                  "initial_mode": {
                    "type": "string",
                    "enum": [
                      "auto",
                      "human",
                      "assisted",
                      "external"
                    ]
                  },
                  "message": {
                    "type": "object",
                    "properties": {
                      "role": {
                        "type": "string",
                        "enum": [
                          "user",
                          "human"
                        ]
                      },
                      "text": {
                        "type": "string",
                        "maxLength": 4000
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "choice_id": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "unsupported_type": {
                        "type": "string",
                        "maxLength": 40
                      }
                    },
                    "required": [
                      "role",
                      "text",
                      "at"
                    ]
                  },
                  "context": {
                    "type": "object",
                    "properties": {}
                  },
                  "history": {
                    "type": "array",
                    "maxItems": 40,
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "user",
                            "assistant",
                            "human"
                          ]
                        },
                        "text": {
                          "type": "string",
                          "maxLength": 4000
                        }
                      },
                      "required": [
                        "role",
                        "text"
                      ]
                    }
                  }
                },
                "required": [
                  "contract_version",
                  "conversation_id",
                  "event_id",
                  "message"
                ]
              },
              "example": {
                "contract_version": "1.0",
                "conversation_id": "example-session",
                "event_id": "example-event-1",
                "subject_id": "customer:example",
                "message": {
                  "role": "user",
                  "text": "Hello",
                  "at": "2026-09-22T10:00:00Z"
                }
              }
            }
          }
        },
        "tags": [
          "Conversation events"
        ],
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@accept",
        "x-auth-middleware": [
          "api"
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/channels/{channel}/people/{subject}/memory": {
      "get": {
        "summary": "Read person memory",
        "description": "",
        "operationId": "ai_get_api_orchestration_channels_channel_people_subject_memory",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "channel",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          },
          {
            "name": "subject",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revision": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "object",
                      "properties": {}
                    },
                    "schema": {
                      "type": "object",
                      "properties": {}
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    },
                    "scope": {
                      "type": "string",
                      "enum": [
                        "person"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Memory"
        ],
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@personMemory",
        "x-auth-middleware": [
          "api"
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Person memory orchestration",
        "operationId": "PUT_api_orchestration_channels__channel__people__subject__memory",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@personMemory",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Person memory for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "channel",
            "in": "path",
            "required": true,
            "description": "Channel identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subject",
            "in": "path",
            "required": true,
            "description": "Subject identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/turns/{turn}": {
      "get": {
        "summary": "Read turn result",
        "description": "",
        "operationId": "ai_get_api_orchestration_turns_turn",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "turn",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "conversation_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "session_id": {
                          "type": "string",
                          "nullable": true
                        },
                        "event_id": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "revision": {
                          "type": "integer"
                        },
                        "mode": {
                          "type": "string"
                        },
                        "decision": {
                          "type": "object",
                          "properties": {}
                        },
                        "delivery_status": {
                          "type": "string"
                        },
                        "error_code": {
                          "type": "string",
                          "nullable": true
                        },
                        "result": {
                          "type": "object",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Turns"
        ],
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@turn",
        "x-auth-middleware": [
          "api"
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/conversations": {
      "get": {
        "summary": "Conversations orchestration",
        "operationId": "GET_api_orchestration_conversations",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "examples": {
                  "conversation_id": {
                    "summary": "Lookup fields for conversation_id",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "data": [
                        {
                          "external_id": "example-conversation_id"
                        }
                      ]
                    }
                  },
                  "lookup_conversation_id": {
                    "summary": "Lookup fields for lookup_conversation_id",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "data": [
                        {
                          "id": "example-lookup_conversation_id",
                          "external_id": "Example lookup conversation id"
                        }
                      ]
                    }
                  },
                  "subject_id": {
                    "summary": "Lookup fields for subject_id",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "data": [
                        {
                          "subject_ref": "example-subject_id"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@conversations",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Conversations for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. \n\nLookup `conversation_id`: read `data[].external_id` as the value and `data[].external_id` as the label. Use identifiers only within their authorised workspace.\n\nLookup `lookup_conversation_id`: read `data[].id` as the value and `data[].external_id` as the label. Use identifiers only within their authorised workspace.\n\nLookup `subject_id`: read `data[].subject_ref` as the value and `data[].subject_ref` as the label. Use identifiers only within their authorised workspace.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/conversations/{conversation}": {
      "get": {
        "summary": "Conversation orchestration",
        "operationId": "GET_api_orchestration_conversations__conversation_",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                },
                "examples": {
                  "turn_id": {
                    "summary": "Lookup fields for turn_id",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "turns": [
                        {
                          "id": "example-turn_id",
                          "event_id": "Example turn id"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@conversation",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Conversation for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. \n\nLookup `turn_id`: read `turns[].id` as the value and `turns[].event_id` as the label. Use identifiers only within their authorised workspace.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "summary",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Summary."
            },
            "description": "Summary."
          },
          {
            "name": "before_sequence",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Before sequence."
            },
            "description": "Before sequence."
          },
          {
            "name": "compact",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Compact."
            },
            "description": "Compact."
          },
          {
            "name": "after_event",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "After event."
            },
            "description": "After event."
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/orchestration/conversations/{conversation}/control": {
      "post": {
        "summary": "Control orchestration",
        "operationId": "POST_api_orchestration_conversations__conversation__control",
        "tags": [
          "Orchestration"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrchestrationController@control",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Control for orchestration. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "description": "Mode. Required. ",
                    "enum": [
                      "auto",
                      "human",
                      "assisted",
                      "external"
                    ]
                  },
                  "expected_revision": {
                    "type": "integer",
                    "description": "Expected revision. Required. Limits: min:1."
                  },
                  "bot_id": {
                    "type": "string",
                    "description": "Bot id. Optional. "
                  },
                  "command_id": {
                    "type": "string",
                    "description": "Command id. Optional. "
                  }
                },
                "required": [
                  "mode",
                  "expected_revision"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/v1/models": {
      "get": {
        "summary": "List models (OpenAI-compatible)",
        "description": "Models this key can use: `autoappy` (the default Auto Appy model), `autoappy/<installed model>` and `assistant/<id>` for the organisation's assistants. A read or write AI key works.",
        "operationId": "ai_get_v1_models",
        "tags": [
          "OpenAI-compatible"
        ],
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID. OpenAI SDKs can send it as OpenAI-Organization instead (organization=...)."
          },
          {
            "name": "OpenAI-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Alias of X-AutoAppy-Workspace for OpenAI SDKs."
          }
        ],
        "responses": {
          "200": {
            "description": "Models",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "object": {
                            "type": "string"
                          },
                          "owned_by": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "autoappy",
                      "object": "model",
                      "owned_by": "autoappy",
                      "name": "Auto Appy model (default: Qwen 3.5 · 9B)"
                    },
                    {
                      "id": "autoappy/qwen3.5:9b",
                      "object": "model",
                      "owned_by": "autoappy",
                      "name": "Qwen 3.5 · 9B"
                    },
                    {
                      "id": "assistant/00000000-0000-4000-8000-000000000001",
                      "object": "model",
                      "owned_by": "organisation",
                      "name": "Sales helper"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "nullable": true
                        },
                        "param": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Key, organisation or application access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "nullable": true
                        },
                        "param": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "summary": "Create a chat completion (OpenAI-compatible)",
        "description": "Same request and response shapes as OpenAI's Chat Completions, so OpenAI SDKs work with base URL `https://aiapi.autoappy.com/v1`. Needs an AI key with write access. Raw `autoappy` models receive exactly your messages; `assistant/<id>` adds that assistant's instructions and notes first. With `stream: true` the answer arrives as server-sent `chat.completion.chunk` events ending with `data: [DONE]`. `reasoning_effort` low/medium/high lets thinking models reason first (streamed as `reasoning_content`). Message text is not stored unless `store: true`; only metadata (model, tokens, time, key prefix) is logged. Each answer counts as one action (2 credits on Auto Appy models, 1 on connected provider models).",
        "operationId": "ai_post_v1_chat_completions",
        "tags": [
          "OpenAI-compatible"
        ],
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID. OpenAI SDKs can send it as OpenAI-Organization instead (organization=...)."
          },
          {
            "name": "OpenAI-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Alias of X-AutoAppy-Workspace for OpenAI SDKs."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "messages"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "example": "autoappy"
                  },
                  "messages": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 200,
                    "items": {
                      "type": "object",
                      "required": [
                        "role",
                        "content"
                      ],
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "system",
                            "developer",
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "text"
                                    ]
                                  },
                                  "text": {
                                    "type": "string"
                                  }
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  },
                  "temperature": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 2
                  },
                  "top_p": {
                    "type": "number"
                  },
                  "max_tokens": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 4096
                  },
                  "max_completion_tokens": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 4096
                  },
                  "stream": {
                    "type": "boolean"
                  },
                  "stream_options": {
                    "type": "object",
                    "properties": {
                      "include_usage": {
                        "type": "boolean"
                      }
                    }
                  },
                  "reasoning_effort": {
                    "type": "string",
                    "enum": [
                      "none",
                      "minimal",
                      "low",
                      "medium",
                      "high"
                    ]
                  },
                  "store": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "model": "autoappy",
                "messages": [
                  {
                    "role": "system",
                    "content": "Reply in under 40 words."
                  },
                  {
                    "role": "user",
                    "content": "Write a friendly reply to a price enquiry."
                  }
                ],
                "temperature": 0.7
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Completion (or an event stream when stream is true)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "id": "chatcmpl-abc",
                  "object": "chat.completion",
                  "created": 1790900000,
                  "model": "autoappy/qwen3.5:9b",
                  "choices": [
                    {
                      "index": 0,
                      "message": {
                        "role": "assistant",
                        "content": "Thanks for asking! ..."
                      },
                      "finish_reason": "stop"
                    }
                  ],
                  "usage": {
                    "prompt_tokens": 42,
                    "completion_tokens": 31,
                    "total_tokens": 73
                  },
                  "autoappy": {
                    "timing": {
                      "first_token_ms": 900,
                      "total_ms": 2800,
                      "tokens_per_second": 17.5
                    },
                    "request_id": "…",
                    "thread_id": null
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (OpenAI-style error).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "nullable": true
                        },
                        "param": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, expired or revoked key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "nullable": true
                        },
                        "param": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Read-only key, or no AI access.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "nullable": true
                        },
                        "param": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown model (code model_not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "nullable": true
                        },
                        "param": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too many requests.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "nullable": true
                        },
                        "param": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "The model could not answer; nothing was billed.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "nullable": true
                        },
                        "param": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "The Auto Appy model server is unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string",
                          "nullable": true
                        },
                        "param": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/audio/speech": {
      "post": {
        "summary": "Create speech (OpenAI-compatible text to speech)",
        "description": "Same request as OpenAI's `audio.speech.create`, so OpenAI SDKs work with base URL `https://aiapi.autoappy.com/v1`. Needs an AI key with write access. Runs on Auto Appy servers. `autoappy-tts` (also `tts-1`) uses the Fast model, Kokoro-82M: about a fifth of real time, Hindi, Hinglish, English and six more languages. `autoappy-tts-expressive` (also `tts-1-hd`, `gpt-4o-mini-tts`) uses Chatterbox Multilingual: more natural, 23 languages, cloned voices, slower than real time, up to 600 characters per request. `voice` takes an OpenAI name (alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer, verse map to similar Fast voices), a voice name such as `Priya` or `Arjun`, an id like `kokoro:hf_alpha`, or `custom:<id>` for a cloned voice the key owner may use. The answer is the audio file; `X-Audio-Seconds` and `X-Generation-Ms` report its length and how long it took. Text is not stored; only metadata (model, characters, time, key prefix) is logged. Counts as one action: 1 credit (Fast) or 3 (Expressive).",
        "operationId": "ai_post_v1_audio_speech",
        "tags": [
          "OpenAI-compatible"
        ],
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID. OpenAI SDKs can send it as OpenAI-Organization instead (organization=...)."
          },
          {
            "name": "OpenAI-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Alias of X-AutoAppy-Workspace for OpenAI SDKs."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "model",
                  "input",
                  "voice"
                ],
                "properties": {
                  "model": {
                    "type": "string",
                    "example": "autoappy-tts",
                    "enum": [
                      "autoappy-tts",
                      "tts-1",
                      "autoappy-tts-expressive",
                      "tts-1-hd",
                      "gpt-4o-mini-tts",
                      "gpt-4o-tts"
                    ]
                  },
                  "input": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096,
                    "example": "नमस्ते Priya जी, आपका order ship हो गया है।"
                  },
                  "voice": {
                    "type": "string",
                    "maxLength": 80,
                    "example": "Priya"
                  },
                  "response_format": {
                    "type": "string",
                    "enum": [
                      "mp3",
                      "wav",
                      "opus",
                      "ogg"
                    ],
                    "default": "mp3"
                  },
                  "speed": {
                    "type": "number",
                    "minimum": 0.5,
                    "maximum": 2,
                    "default": 1,
                    "description": "Fast model only."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The audio.",
            "headers": {
              "X-Audio-Seconds": {
                "schema": {
                  "type": "number"
                }
              },
              "X-Generation-Ms": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "audio/mpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "audio/wav": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "audio/ogg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, unknown voice, or text too long for an expressive voice (code input_too_long).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Read-only key, or no AI access in this organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown model (code model_not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "The voice server failed or did not finish in time.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/audio/transcriptions": {
      "post": {
        "summary": "Transcribe audio (OpenAI-compatible speech to text)",
        "description": "Same request as OpenAI's audio API (multipart form), so OpenAI SDKs work with base URL `https://aiapi.autoappy.com/v1`. Needs an AI key with write access. Runs on Auto Appy servers with Whisper: `whisper-1` / `autoappy-stt` use large-v3 turbo (about twice as fast as the recording, strong Hindi, Hinglish and English); `autoappy-stt-accurate` uses large-v3 (best for noisy calls, slower than real time). Requests must finish within about a minute, so send recordings of a few minutes; the Voice studio in the app handles recordings up to an hour. Audio and text are not stored; only metadata is logged. Counts as one action: 3 credits (5 for accurate). The text stays in the spoken language; Hindi is written in Devanagari.",
        "operationId": "ai_post_v1_audio_transcriptions",
        "tags": [
          "OpenAI-compatible"
        ],
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID. OpenAI SDKs can send it as OpenAI-Organization instead (organization=...)."
          },
          {
            "name": "OpenAI-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Alias of X-AutoAppy-Workspace for OpenAI SDKs."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "model"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Audio or video, up to 25 MB: mp3, m4a, wav, ogg, webm, mp4, flac."
                  },
                  "model": {
                    "type": "string",
                    "example": "whisper-1",
                    "enum": [
                      "whisper-1",
                      "autoappy-stt",
                      "gpt-4o-transcribe",
                      "gpt-4o-mini-transcribe",
                      "autoappy-stt-accurate",
                      "whisper-large-v3"
                    ]
                  },
                  "language": {
                    "type": "string",
                    "maxLength": 5,
                    "example": "hi",
                    "description": "ISO-639-1 code; leave empty to detect."
                  },
                  "prompt": {
                    "type": "string",
                    "maxLength": 400,
                    "description": "Names and words to spell correctly."
                  },
                  "response_format": {
                    "type": "string",
                    "enum": [
                      "json",
                      "text",
                      "verbose_json",
                      "srt",
                      "vtt"
                    ],
                    "default": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The text. `json` gives {\"text\"}; `verbose_json` adds language, duration and timed segments; `text`, `srt` and `vtt` are plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "language": {
                      "type": "string"
                    },
                    "duration": {
                      "type": "number"
                    },
                    "segments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "start": {
                            "type": "number"
                          },
                          "end": {
                            "type": "number"
                          },
                          "text": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, unknown voice, or text too long for an expressive voice (code input_too_long).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Read-only key, or no AI access in this organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown model (code model_not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "The voice server failed or did not finish in time.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/audio/translations": {
      "post": {
        "summary": "Translate audio into English text (OpenAI-compatible)",
        "description": "Same request as OpenAI's audio API (multipart form), so OpenAI SDKs work with base URL `https://aiapi.autoappy.com/v1`. Needs an AI key with write access. Runs on Auto Appy servers with Whisper: `whisper-1` / `autoappy-stt` use large-v3 turbo (about twice as fast as the recording, strong Hindi, Hinglish and English); `autoappy-stt-accurate` uses large-v3 (best for noisy calls, slower than real time). Requests must finish within about a minute, so send recordings of a few minutes; the Voice studio in the app handles recordings up to an hour. Audio and text are not stored; only metadata is logged. Counts as one action: 3 credits (5 for accurate). Any spoken language is written out in English.",
        "operationId": "ai_post_v1_audio_translations",
        "tags": [
          "OpenAI-compatible"
        ],
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID. OpenAI SDKs can send it as OpenAI-Organization instead (organization=...)."
          },
          {
            "name": "OpenAI-Organization",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Alias of X-AutoAppy-Workspace for OpenAI SDKs."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "required": [
                  "file",
                  "model"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Audio or video, up to 25 MB: mp3, m4a, wav, ogg, webm, mp4, flac."
                  },
                  "model": {
                    "type": "string",
                    "example": "whisper-1",
                    "enum": [
                      "whisper-1",
                      "autoappy-stt",
                      "gpt-4o-transcribe",
                      "gpt-4o-mini-transcribe",
                      "autoappy-stt-accurate",
                      "whisper-large-v3"
                    ]
                  },
                  "language": {
                    "type": "string",
                    "maxLength": 5,
                    "example": "hi",
                    "description": "ISO-639-1 code; leave empty to detect."
                  },
                  "prompt": {
                    "type": "string",
                    "maxLength": 400,
                    "description": "Names and words to spell correctly."
                  },
                  "response_format": {
                    "type": "string",
                    "enum": [
                      "json",
                      "text",
                      "verbose_json",
                      "srt",
                      "vtt"
                    ],
                    "default": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The text. `json` gives {\"text\"}; `verbose_json` adds language, duration and timed segments; `text`, `srt` and `vtt` are plain text.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "language": {
                      "type": "string"
                    },
                    "duration": {
                      "type": "number"
                    },
                    "segments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer"
                          },
                          "start": {
                            "type": "number"
                          },
                          "end": {
                            "type": "number"
                          },
                          "text": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              },
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input, unknown voice, or text too long for an expressive voice (code input_too_long).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Read-only key, or no AI access in this organisation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown model (code model_not_found).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "The voice server failed or did not finish in time.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "message": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string"
                        },
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Standalone API guide",
    "url": "https://ai.autoappy.com/api/guide.md"
  },
  "tags": [
    {
      "name": "Ai job"
    },
    {
      "name": "Ai library"
    },
    {
      "name": "Ai usage"
    },
    {
      "name": "Auto appy auth"
    },
    {
      "name": "Bot"
    },
    {
      "name": "Bot example"
    },
    {
      "name": "Bots & channels"
    },
    {
      "name": "Conversation events"
    },
    {
      "name": "Faq bot"
    },
    {
      "name": "Flow history"
    },
    {
      "name": "Intake bot"
    },
    {
      "name": "Knowledge bot"
    },
    {
      "name": "Memory"
    },
    {
      "name": "Orchestration"
    },
    {
      "name": "Product bot"
    },
    {
      "name": "Turns"
    }
  ]
}
