{
  "openapi": "3.1.0",
  "info": {
    "title": "InduQT API",
    "version": "1.0.0",
    "summary": "Machine data, connectors, recordings and AI insights.",
    "description": "Push and query industrial machine data, connect live sources, record events and get AI insights.\n\nEvery resource belongs to one account. A key only sees its own account's data; ids from another account answer 404.\n\nDocs: https://induqt.ai/developers",
    "contact": {
      "name": "InduQT support",
      "email": "support@induqt.ai",
      "url": "https://induqt.ai/developers"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://induqt.ai/terms"
    },
    "termsOfService": "https://induqt.ai/terms"
  },
  "externalDocs": {
    "description": "Developer docs",
    "url": "https://induqt.ai/docs/api"
  },
  "servers": [
    {
      "url": "https://api.induqt.ai",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Sites",
      "description": "Plants and buildings. Every machine and connector belongs to one site."
    },
    {
      "name": "Machines",
      "description": "Equipment at a site, and its signals."
    },
    {
      "name": "Data",
      "description": "Writing readings in and reading them back."
    },
    {
      "name": "Recordings & insights",
      "description": "Windows of machine data kept for playback and AI analysis."
    },
    {
      "name": "Decision engine",
      "description": "Troubleshooting decisions: rules first, a fast model choosing among the rules’ candidates, safety veto last; outcomes and readouts."
    },
    {
      "name": "Connectors",
      "description": "Live sources InduQT pulls from: MQTT, OPC UA, Azure IoT Hub / Event Hubs, CSV/JSON URLs."
    },
    {
      "name": "API keys",
      "description": "Bearer keys with read, write and ingest scopes."
    },
    {
      "name": "Diagnosis",
      "description": "AI diagnosis from a description, files and machine data."
    }
  ],
  "paths": {
    "/v1/sites": {
      "get": {
        "operationId": "list-sites",
        "tags": [
          "Sites"
        ],
        "summary": "List the account’s sites with machine and connector counts.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#list-sites"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "location": {
                            "type": "string"
                          },
                          "timezone": {
                            "type": "string"
                          },
                          "machines": {
                            "type": "number"
                          },
                          "connectors": {
                            "type": "number"
                          },
                          "lastDataAt": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "sites": [
                    {
                      "id": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                      "name": "Pleasanton plant",
                      "location": "Pleasanton, CA",
                      "timezone": "America/Los_Angeles",
                      "machines": 4,
                      "connectors": 2,
                      "lastDataAt": "2026-10-27T03:12:09Z",
                      "createdAt": "2026-10-27T02:58:41Z"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "create-site",
        "tags": [
          "Sites"
        ],
        "summary": "Create a site (a plant or building).",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#create-site"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "machines": {
                      "type": "number"
                    },
                    "connectors": {
                      "type": "number"
                    },
                    "lastDataAt": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                  "name": "Pleasanton plant",
                  "location": "Pleasanton, CA",
                  "timezone": "America/Los_Angeles",
                  "machines": 4,
                  "connectors": 2,
                  "lastDataAt": "2026-10-27T03:12:09Z",
                  "createdAt": "2026-10-27T02:58:41Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "1–80 characters, unique in the account."
                  },
                  "location": {
                    "type": "string",
                    "description": "Free text, e.g. city and state."
                  },
                  "timezone": {
                    "type": "string",
                    "description": "IANA zone used to read local-time files. Default UTC."
                  },
                  "industry": {
                    "type": "string",
                    "enum": [
                      "manufacturing",
                      "food_beverage",
                      "chemicals",
                      "pharma",
                      "power_utilities",
                      "buildings"
                    ],
                    "description": "Selects the decision engine’s industry thresholds."
                  },
                  "policy": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Site overrides for the decision engine: aiEnabled, minConfidence, normalNeedsConfidence, notifyFrom."
                  }
                },
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Pleasanton plant",
                "location": "Pleasanton, CA",
                "timezone": "America/Los_Angeles"
              }
            }
          }
        }
      }
    },
    "/v1/sites/{siteId}": {
      "get": {
        "operationId": "get-site",
        "tags": [
          "Sites"
        ],
        "summary": "A site with its machines and connectors.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#get-site"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "machines": {
                      "type": "number"
                    },
                    "connectors": {
                      "type": "number"
                    },
                    "lastDataAt": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "machineList": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "siteId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "externalId": {
                            "type": "string"
                          },
                          "family": {
                            "type": "string"
                          },
                          "make": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "signals": {
                            "type": "number"
                          },
                          "lastDataAt": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "connectorList": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                  "name": "Pleasanton plant",
                  "location": "Pleasanton, CA",
                  "timezone": "America/Los_Angeles",
                  "machines": 4,
                  "connectors": 2,
                  "lastDataAt": "2026-10-27T03:12:09Z",
                  "createdAt": "2026-10-27T02:58:41Z",
                  "machineList": [
                    {
                      "id": "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0",
                      "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                      "name": "Boiler B-101",
                      "externalId": "B-101",
                      "family": "boilers",
                      "make": "Cleaver-Brooks",
                      "model": "CBEX Elite",
                      "signals": 12,
                      "lastDataAt": "2026-10-27T03:12:09Z"
                    }
                  ],
                  "connectorList": [
                    {
                      "id": "44c0aa11-2b3c-4d5e-8f60-718293a4b5c6",
                      "type": "mqtt",
                      "name": "Boiler house broker",
                      "status": "connected"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "description": "Site id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "operationId": "update-site",
        "tags": [
          "Sites"
        ],
        "summary": "Rename a site or change its location or time zone.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#update-site"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "location": {
                      "type": "string"
                    },
                    "timezone": {
                      "type": "string"
                    },
                    "machines": {
                      "type": "number"
                    },
                    "connectors": {
                      "type": "number"
                    },
                    "lastDataAt": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                  "name": "Pleasanton plant",
                  "location": "Pleasanton, CA",
                  "timezone": "America/Los_Angeles",
                  "machines": 4,
                  "connectors": 2,
                  "lastDataAt": "2026-10-27T03:12:09Z",
                  "createdAt": "2026-10-27T02:58:41Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "description": "Site id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New name."
                  },
                  "location": {
                    "type": "string",
                    "description": "New location."
                  },
                  "timezone": {
                    "type": "string",
                    "description": "IANA zone."
                  }
                }
              },
              "example": {
                "timezone": "America/Chicago"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-site",
        "tags": [
          "Sites"
        ],
        "summary": "Delete an empty site. Move or delete its machines and connectors first.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#delete-site"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "siteId",
            "in": "path",
            "required": true,
            "description": "Site id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/machines": {
      "get": {
        "operationId": "list-machines",
        "tags": [
          "Machines"
        ],
        "summary": "List machines, optionally for one site.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#list-machines"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "machines": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "siteId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "externalId": {
                            "type": "string"
                          },
                          "family": {
                            "type": "string"
                          },
                          "make": {
                            "type": "string"
                          },
                          "model": {
                            "type": "string"
                          },
                          "signals": {
                            "type": "number"
                          },
                          "lastDataAt": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "machines": [
                    {
                      "id": "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0",
                      "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                      "name": "Boiler B-101",
                      "externalId": "B-101",
                      "family": "boilers",
                      "make": "Cleaver-Brooks",
                      "model": "CBEX Elite",
                      "signals": 12,
                      "lastDataAt": "2026-10-27T03:12:09Z"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "siteId",
            "in": "query",
            "required": false,
            "description": "Only machines at this site.",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "operationId": "create-machine",
        "tags": [
          "Machines"
        ],
        "summary": "Add a machine to a site. Counts towards the plan’s machine allowance.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#create-machine"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "siteId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "family": {
                      "type": "string"
                    },
                    "make": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "signals": {
                      "type": "number"
                    },
                    "lastDataAt": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0",
                  "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                  "name": "Boiler B-101",
                  "externalId": "B-101",
                  "family": "boilers",
                  "make": "Cleaver-Brooks",
                  "model": "CBEX Elite",
                  "signals": 12,
                  "lastDataAt": "2026-10-27T03:12:09Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "siteId": {
                    "type": "string",
                    "description": "The site it belongs to."
                  },
                  "name": {
                    "type": "string",
                    "description": "Display name, e.g. Boiler B-101."
                  },
                  "family": {
                    "type": "string",
                    "enum": [
                      "boilers",
                      "vfd",
                      "compressors",
                      "cnc",
                      "servo",
                      "chillers",
                      "pumps",
                      "conveyors",
                      "other"
                    ],
                    "description": "Equipment family; selects the knowledge base for AI insights."
                  },
                  "externalId": {
                    "type": "string",
                    "description": "Your id for the machine (tag prefix, asset number, MQTT device id). Ingest can address the machine by it. Unique per site."
                  },
                  "make": {
                    "type": "string",
                    "description": "Manufacturer."
                  },
                  "model": {
                    "type": "string",
                    "description": "Model."
                  }
                },
                "required": [
                  "siteId",
                  "name",
                  "family"
                ]
              },
              "example": {
                "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                "name": "Boiler B-101",
                "family": "boilers",
                "externalId": "B-101",
                "make": "Cleaver-Brooks",
                "model": "CBEX Elite"
              }
            }
          }
        }
      }
    },
    "/v1/machines/{machineId}": {
      "get": {
        "operationId": "get-machine",
        "tags": [
          "Machines"
        ],
        "summary": "A machine with its signals and latest values.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#get-machine"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "siteId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "family": {
                      "type": "string"
                    },
                    "make": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "signals": {
                      "type": "number"
                    },
                    "lastDataAt": {
                      "type": "string"
                    },
                    "signalList": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "units": {
                            "type": "string"
                          },
                          "normalLow": {
                            "type": "number"
                          },
                          "normalHigh": {
                            "type": "number"
                          },
                          "lastValue": {
                            "type": "number"
                          },
                          "lastAt": {
                            "type": "string"
                          },
                          "outOfRange": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0",
                  "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                  "name": "Boiler B-101",
                  "externalId": "B-101",
                  "family": "boilers",
                  "make": "Cleaver-Brooks",
                  "model": "CBEX Elite",
                  "signals": 12,
                  "lastDataAt": "2026-10-27T03:12:09Z",
                  "signalList": [
                    {
                      "key": "steam_pressure",
                      "name": "Steam pressure",
                      "units": "psig",
                      "normalLow": 90,
                      "normalHigh": 125,
                      "lastValue": 112.4,
                      "lastAt": "2026-10-27T03:12:09Z",
                      "outOfRange": false
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "path",
            "required": true,
            "description": "Machine id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "operationId": "update-machine",
        "tags": [
          "Machines"
        ],
        "summary": "Update a machine’s details or move it to another site.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#update-machine"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "siteId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "externalId": {
                      "type": "string"
                    },
                    "family": {
                      "type": "string"
                    },
                    "make": {
                      "type": "string"
                    },
                    "model": {
                      "type": "string"
                    },
                    "signals": {
                      "type": "number"
                    },
                    "lastDataAt": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0",
                  "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                  "name": "Boiler B-101",
                  "externalId": "B-101",
                  "family": "boilers",
                  "make": "Cleaver-Brooks",
                  "model": "CBEX Elite",
                  "signals": 12,
                  "lastDataAt": "2026-10-27T03:12:09Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "path",
            "required": true,
            "description": "Machine id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name."
                  },
                  "siteId": {
                    "type": "string",
                    "description": "Move to this site."
                  },
                  "externalId": {
                    "type": "string",
                    "description": "Your id."
                  },
                  "make": {
                    "type": "string",
                    "description": "Manufacturer."
                  },
                  "model": {
                    "type": "string",
                    "description": "Model."
                  }
                }
              },
              "example": {
                "model": "CBEX Elite 800"
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-machine",
        "tags": [
          "Machines"
        ],
        "summary": "Delete a machine. Its stored readings stop being queryable.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#delete-machine"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "path",
            "required": true,
            "description": "Machine id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/machines/{machineId}/signals/{key}": {
      "patch": {
        "operationId": "update-signal",
        "tags": [
          "Machines"
        ],
        "summary": "Name a signal, set its units and normal operating band.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#update-signal"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "units": {
                      "type": "string"
                    },
                    "normalLow": {
                      "type": "number"
                    },
                    "normalHigh": {
                      "type": "number"
                    },
                    "lastValue": {
                      "type": "number"
                    },
                    "lastAt": {
                      "type": "string"
                    },
                    "outOfRange": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "key": "steam_pressure",
                  "name": "Steam pressure",
                  "units": "psig",
                  "normalLow": 90,
                  "normalHigh": 125,
                  "lastValue": 112.4,
                  "lastAt": "2026-10-27T03:12:09Z",
                  "outOfRange": false
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "path",
            "required": true,
            "description": "Machine id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "description": "Signal key as ingested.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Display name."
                  },
                  "units": {
                    "type": "string",
                    "description": "Units."
                  },
                  "normalLow": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Lower edge of the normal band."
                  },
                  "normalHigh": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "description": "Upper edge of the normal band."
                  }
                }
              },
              "example": {
                "name": "Steam pressure",
                "units": "psig",
                "normalLow": 90,
                "normalHigh": 125
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-signal",
        "tags": [
          "Machines"
        ],
        "summary": "Remove a signal from a machine, e.g. a tag that is no longer sent.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#delete-signal"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "path",
            "required": true,
            "description": "Machine id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "description": "Signal key.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/ingest": {
      "post": {
        "operationId": "ingest",
        "tags": [
          "Data"
        ],
        "summary": "Send readings: one machine at a time or a batch of up to 5,000 readings (1 MB).",
        "description": "Requires an API key with the `ingest` scope.\n\nUse a key with the ingest scope. A site-scoped key can only write to that site.\n\nUnknown machines are counted in rejected with a reason in errors[]; if nothing is accepted the response is 400.\n\nReadings for the same machine, signal and timestamp overwrite each other, so retries are safe.\n\nRate limit: 600 requests a minute per key. Batch when sending more than a few readings a second.",
        "x-induqt-scope": "ingest",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#ingest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "number"
                    },
                    "rejected": {
                      "type": "number"
                    },
                    "machines": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "accepted": 4,
                  "rejected": 0,
                  "machines": [
                    "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "machine": {
                    "type": "string",
                    "description": "Machine id or its externalId. Required unless each reading names its machine."
                  },
                  "siteId": {
                    "type": "string",
                    "description": "Needed to resolve an externalId when the key is not tied to one site."
                  },
                  "ts": {
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "integer",
                        "description": "Epoch milliseconds."
                      }
                    ],
                    "description": "Reading time. Default: time received."
                  },
                  "values": {
                    "type": "string",
                    "description": "Signal key → value. Keys: letters, digits, _ . - (max 64). Booleans become 0/1; numeric strings are parsed."
                  },
                  "readings": {
                    "type": "array",
                    "items": {},
                    "description": "Batch form: [{ machine?, ts?, values }]."
                  },
                  "autoCreate": {
                    "type": "boolean",
                    "description": "Create a machine (family \"other\") for an unknown externalId at the site. Counts towards the plan."
                  }
                }
              },
              "example": {
                "machine": "B-101",
                "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                "ts": "2026-10-27T03:12:09Z",
                "values": {
                  "steam_pressure": 112.4,
                  "steam_flow": 2.1,
                  "flue_o2": 3.2,
                  "stack_temp": 410
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploads": {
      "post": {
        "operationId": "create-upload",
        "tags": [
          "Data"
        ],
        "summary": "Get a pre-signed URL to upload one file (CSV, XLSX, photo or PDF, up to 20 MB) for an import or a diagnosis.",
        "description": "Requires an API key with the `write` scope.\n\nPUT the file body to uploadUrl with the returned headers within 15 minutes, then pass uploadId to an import or diagnosis.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#create-upload"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uploadId": {
                      "type": "string"
                    },
                    "uploadUrl": {
                      "type": "string"
                    },
                    "expiresOn": {
                      "type": "string"
                    },
                    "headers": {
                      "type": "object",
                      "properties": {
                        "x-ms-blob-type": {
                          "type": "string"
                        },
                        "Content-Type": {
                          "type": "string"
                        }
                      }
                    }
                  }
                },
                "example": {
                  "uploadId": "f3b0c1d2-…",
                  "uploadUrl": "https://induqtprodst.blob.core.windows.net/uploads/…?sv=…",
                  "expiresOn": "2026-10-27T03:27:09Z",
                  "headers": {
                    "x-ms-blob-type": "BlockBlob",
                    "Content-Type": "text/csv"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileName": {
                    "type": "string",
                    "description": "File name, e.g. b101-2026-10-20.csv."
                  },
                  "contentType": {
                    "type": "string",
                    "description": "text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, image/jpeg, image/png, application/pdf…"
                  },
                  "size": {
                    "type": "integer",
                    "description": "Size in bytes, up to 20,971,520."
                  }
                },
                "required": [
                  "fileName",
                  "contentType",
                  "size"
                ]
              },
              "example": {
                "fileName": "b101-2026-10-20.csv",
                "contentType": "text/csv",
                "size": 48213
              }
            }
          }
        }
      }
    },
    "/v1/machines/{machineId}/imports": {
      "post": {
        "operationId": "import-file",
        "tags": [
          "Data"
        ],
        "summary": "Load a CSV or Excel file of history into a machine.",
        "description": "Requires an API key with the `write` scope.\n\nFirst row is the header; one column is the time, every numeric column becomes a signal.\n\nUp to 20 MB and 500,000 rows per file.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#import-file"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "rows": {
                      "type": "number"
                    },
                    "signals": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "rows": 1440,
                  "signals": [
                    "steam_pressure",
                    "steam_flow",
                    "flue_o2"
                  ],
                  "from": "2026-10-20T00:00:00Z",
                  "to": "2026-10-20T23:59:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "path",
            "required": true,
            "description": "Machine id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uploadId": {
                    "type": "string",
                    "description": "From POST /v1/uploads after PUTting the file to the returned URL."
                  },
                  "url": {
                    "type": "string",
                    "description": "Or a public https link to a CSV/XLSX: a Google Sheets “Publish to web” CSV link, a Google Drive or OneDrive download link."
                  },
                  "timeColumn": {
                    "type": "string",
                    "description": "Column with timestamps. Default: detected."
                  },
                  "timezone": {
                    "type": "string",
                    "description": "For timestamps without a zone. Default: the site’s."
                  }
                }
              },
              "example": {
                "uploadId": "f3b0…",
                "timeColumn": "Timestamp"
              }
            }
          }
        }
      }
    },
    "/v1/machines/{machineId}/data": {
      "get": {
        "operationId": "query-data",
        "tags": [
          "Data"
        ],
        "summary": "Readings for a time window, averaged into evenly spaced points.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#query-data"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "machineId": {
                      "type": "string"
                    },
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    },
                    "bucketSeconds": {
                      "type": "number"
                    },
                    "series": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "units": {
                            "type": "string"
                          },
                          "normalLow": {
                            "type": "number"
                          },
                          "normalHigh": {
                            "type": "number"
                          },
                          "points": {
                            "type": "array",
                            "items": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ],
                              "minItems": 2,
                              "maxItems": 2
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "machineId": "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0",
                  "from": "2026-10-27T02:12:09Z",
                  "to": "2026-10-27T03:12:09Z",
                  "bucketSeconds": 12,
                  "series": [
                    {
                      "key": "steam_pressure",
                      "name": "Steam pressure",
                      "units": "psig",
                      "normalLow": 90,
                      "normalHigh": 125,
                      "points": [
                        [
                          "2026-10-27T02:12:00Z",
                          111.9
                        ]
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "path",
            "required": true,
            "description": "Machine id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Start. Default: 1 hour before `to`.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "End. Default: now.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "signals",
            "in": "query",
            "required": false,
            "description": "Default: all signals (up to 20).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "points",
            "in": "query",
            "required": false,
            "description": "Points per signal, 10–2000. Default 300.",
            "schema": {
              "type": "integer",
              "minimum": 10,
              "maximum": 2000,
              "default": 300
            }
          }
        ]
      }
    },
    "/v1/machines/{machineId}/latest": {
      "get": {
        "operationId": "latest",
        "tags": [
          "Data"
        ],
        "summary": "The latest value of every signal, with out-of-band flags.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#latest"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "machineId": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string"
                    },
                    "signals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "units": {
                            "type": "string"
                          },
                          "normalLow": {
                            "type": "number"
                          },
                          "normalHigh": {
                            "type": "number"
                          },
                          "lastValue": {
                            "type": "number"
                          },
                          "lastAt": {
                            "type": "string"
                          },
                          "outOfRange": {
                            "type": "boolean"
                          }
                        }
                      }
                    },
                    "attention": {
                      "type": "array",
                      "items": {}
                    }
                  }
                },
                "example": {
                  "machineId": "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0",
                  "at": "2026-10-27T03:12:09Z",
                  "signals": [
                    {
                      "key": "steam_pressure",
                      "name": "Steam pressure",
                      "units": "psig",
                      "normalLow": 90,
                      "normalHigh": 125,
                      "lastValue": 112.4,
                      "lastAt": "2026-10-27T03:12:09Z",
                      "outOfRange": false
                    }
                  ],
                  "attention": []
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "path",
            "required": true,
            "description": "Machine id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/machines/{machineId}/recordings": {
      "post": {
        "operationId": "create-recording",
        "tags": [
          "Recordings & insights"
        ],
        "summary": "Record a window of a machine’s data: a past window, or start now and stop later.",
        "description": "Requires an API key with the `write` scope.\n\nstatus is recording until stopped, then ready. The data is copied when the recording closes, so it plays back even after raw data ages out.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#create-recording"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "machineId": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "9a1e3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                  "machineId": "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0",
                  "name": "Low steam pressure, night shift",
                  "status": "ready",
                  "from": "2026-10-27T01:00:00Z",
                  "to": "2026-10-27T03:00:00Z"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "path",
            "required": true,
            "description": "Machine id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "e.g. “Low steam pressure, night shift”."
                  },
                  "from": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Start. Default: now (live recording)."
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time",
                    "description": "End. Omit to keep recording until stopped (max 24 h)."
                  },
                  "note": {
                    "type": "string",
                    "description": "What happened, in the operator’s words. Used by the AI."
                  }
                },
                "required": [
                  "name"
                ]
              },
              "example": {
                "name": "Low steam pressure, night shift",
                "from": "2026-10-27T01:00:00Z",
                "to": "2026-10-27T03:00:00Z",
                "note": "Pressure sagged below 95 psig twice; burner stayed at high fire."
              }
            }
          }
        }
      }
    },
    "/v1/recordings/{recordingId}/stop": {
      "post": {
        "operationId": "stop-recording",
        "tags": [
          "Recordings & insights"
        ],
        "summary": "Stop a live recording.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#stop-recording"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "9a1e3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                  "status": "ready"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Recording id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/recordings": {
      "get": {
        "operationId": "list-recordings",
        "tags": [
          "Recordings & insights"
        ],
        "summary": "List recordings, optionally for one machine.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#list-recordings"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recordings": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "machineId": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "from": {
                            "type": "string"
                          },
                          "to": {
                            "type": "string"
                          },
                          "insights": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "recordings": [
                    {
                      "id": "9a1e3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                      "machineId": "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0",
                      "name": "Low steam pressure, night shift",
                      "status": "ready",
                      "from": "…",
                      "to": "…",
                      "insights": true
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "query",
            "required": false,
            "description": "Only this machine.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/recordings/{recordingId}": {
      "get": {
        "operationId": "get-recording",
        "tags": [
          "Recordings & insights"
        ],
        "summary": "Everything needed to play a recording back: the data, events and AI insights.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#get-recording"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recording": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "from": {
                          "type": "string"
                        },
                        "to": {
                          "type": "string"
                        }
                      }
                    },
                    "series": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "key": {
                            "type": "string"
                          },
                          "points": {
                            "type": "array",
                            "items": {
                              "type": "array",
                              "prefixItems": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "number"
                                }
                              ],
                              "minItems": 2,
                              "maxItems": 2
                            }
                          }
                        }
                      }
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "at": {
                            "type": "string"
                          },
                          "signal": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "value": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "insights": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "firstMovers": {
                          "type": "array",
                          "items": {}
                        },
                        "causes": {
                          "type": "array",
                          "items": {}
                        },
                        "checks": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    }
                  }
                },
                "example": {
                  "recording": {
                    "id": "9a1e3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
                    "name": "…",
                    "status": "ready",
                    "from": "…",
                    "to": "…"
                  },
                  "series": [
                    {
                      "key": "steam_pressure",
                      "points": [
                        [
                          "…",
                          112.1
                        ]
                      ]
                    }
                  ],
                  "events": [
                    {
                      "at": "…",
                      "signal": "steam_pressure",
                      "kind": "below_normal",
                      "value": 88.2
                    }
                  ],
                  "insights": {
                    "summary": "…",
                    "firstMovers": [],
                    "causes": [],
                    "checks": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Recording id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/recordings/{recordingId}/analyze": {
      "post": {
        "operationId": "analyze-recording",
        "tags": [
          "Recordings & insights"
        ],
        "summary": "Run the AI analysis on a recording: which signal moved first, likely causes, next checks.",
        "description": "Requires an API key with the `write` scope.\n\nCounts as one AI diagnosis against the plan.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#analyze-recording"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "summary": {
                      "type": "string"
                    },
                    "confidence": {
                      "type": "string"
                    },
                    "firstMovers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "signal": {
                            "type": "string"
                          },
                          "at": {
                            "type": "string"
                          },
                          "direction": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "causes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "likelihood": {
                            "type": "string"
                          },
                          "why": {
                            "type": "string"
                          },
                          "check": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "summary": "Steam pressure fell after feedwater flow dropped…",
                  "confidence": "medium",
                  "firstMovers": [
                    {
                      "signal": "feedwater_flow",
                      "at": "…",
                      "direction": "down"
                    }
                  ],
                  "causes": [
                    {
                      "title": "Feedwater pump cavitation",
                      "likelihood": "medium",
                      "why": "…",
                      "check": "…"
                    }
                  ],
                  "sources": [
                    {
                      "title": "…",
                      "url": "…"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "description": "Recording id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/machines/{machineId}/decisions": {
      "post": {
        "operationId": "evaluate-machine",
        "tags": [
          "Decision engine"
        ],
        "summary": "Run the decision engine on a window of a machine’s data: rules first, a fast model choosing among the rules’ candidates, safety veto last.",
        "description": "Requires an API key with the `write` scope.\n\nThe AI is only asked when the rules find an event, and may only choose among the rules’ candidate ids. Invalid or low-confidence answers fall back to the rules.\n\nDecisions also run automatically when a signal leaves its normal band (at most every 30 minutes per machine) and when a recording is analysed.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#evaluate-machine"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string"
                    },
                    "severity": {
                      "type": "string"
                    },
                    "causes": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "confidence": {
                            "type": "number"
                          },
                          "matched": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "source": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "nextCheck": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "text": {
                          "type": "string"
                        },
                        "safety": {
                          "type": "string"
                        },
                        "note": {
                          "type": "string"
                        }
                      }
                    },
                    "firstMovers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "signal": {
                            "type": "string"
                          },
                          "at": {
                            "type": "string"
                          },
                          "move": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "rationale": {
                      "type": "string"
                    },
                    "source": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string"
                        },
                        "causes": {
                          "type": "string"
                        },
                        "nextCheck": {
                          "type": "string"
                        }
                      }
                    },
                    "notify": {
                      "type": "boolean"
                    },
                    "vetoes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "rules": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string"
                        },
                        "severity": {
                          "type": "string"
                        },
                        "topCause": {
                          "type": "string"
                        }
                      }
                    },
                    "ai": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string"
                        },
                        "topCause": {
                          "type": "string"
                        },
                        "model": {
                          "type": "string"
                        },
                        "ms": {
                          "type": "number"
                        },
                        "error": {}
                      }
                    }
                  }
                },
                "example": {
                  "id": "d1c2e3f4-…",
                  "kind": "fault",
                  "severity": "critical",
                  "causes": [
                    {
                      "id": "feedwater_supply",
                      "title": "Feedwater supply problem (pump, suction, deaerator, feed valve)",
                      "confidence": 0.92,
                      "matched": [
                        "feedwater_flow down",
                        "drum_level down"
                      ],
                      "source": "ai"
                    }
                  ],
                  "nextCheck": {
                    "id": "feed_pump",
                    "text": "Check feedwater pump discharge pressure and amps…",
                    "safety": "qualified",
                    "note": "Qualified personnel only, following the manufacturer’s procedure."
                  },
                  "firstMovers": [
                    {
                      "signal": "feedwater_flow",
                      "at": "…",
                      "move": "down"
                    }
                  ],
                  "rationale": "…",
                  "source": {
                    "kind": "ai",
                    "causes": "ai",
                    "nextCheck": "ai"
                  },
                  "notify": true,
                  "vetoes": [
                    "critical_signal_forces_critical"
                  ],
                  "rules": {
                    "kind": "fault",
                    "severity": "critical",
                    "topCause": "feedwater_supply"
                  },
                  "ai": {
                    "kind": "fault",
                    "topCause": "feedwater_supply",
                    "model": "google/gemini-2.5-flash-lite",
                    "ms": 1112,
                    "error": null
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "path",
            "required": true,
            "description": "Machine id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Default: 2 hours before to."
                  },
                  "to": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Default: now."
                  },
                  "note": {
                    "type": "string",
                    "description": "What the operator saw."
                  }
                }
              },
              "example": {
                "note": "Pressure sagging since the shift change"
              }
            }
          }
        }
      }
    },
    "/v1/decisions": {
      "get": {
        "operationId": "list-decisions",
        "tags": [
          "Decision engine"
        ],
        "summary": "Recent decisions: live detections, recording analyses and manual runs.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#list-decisions"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "decisions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "machineId": {
                            "type": "string"
                          },
                          "machineName": {
                            "type": "string"
                          },
                          "trigger": {
                            "type": "string"
                          },
                          "family": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string"
                          },
                          "severity": {
                            "type": "string"
                          },
                          "final": {
                            "type": "object",
                            "properties": {}
                          },
                          "vetoes": {
                            "type": "array",
                            "items": {}
                          },
                          "outcome": {},
                          "createdAt": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "decisions": [
                    {
                      "id": "d1c2e3f4-…",
                      "machineId": "…",
                      "machineName": "Boiler B-101",
                      "trigger": "live",
                      "family": "boilers",
                      "kind": "fault",
                      "severity": "critical",
                      "final": {},
                      "vetoes": [],
                      "outcome": null,
                      "createdAt": "…"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "machineId",
            "in": "query",
            "required": false,
            "description": "Only this machine.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "siteId",
            "in": "query",
            "required": false,
            "description": "Only this site.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1–200, default 50.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/v1/decisions/{decisionId}": {
      "get": {
        "operationId": "get-decision",
        "tags": [
          "Decision engine"
        ],
        "summary": "One decision with its audit trail: the canonical state, the rules’ answer, the AI’s answer, the policy and the vetoes.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#get-decision"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "state": {
                      "type": "string"
                    },
                    "rules": {
                      "type": "object",
                      "properties": {}
                    },
                    "ai": {
                      "type": "object",
                      "properties": {}
                    },
                    "final": {
                      "type": "object",
                      "properties": {}
                    },
                    "policy": {
                      "type": "object",
                      "properties": {}
                    },
                    "vetoes": {
                      "type": "array",
                      "items": {}
                    },
                    "engineVersion": {
                      "type": "string"
                    },
                    "catalogVersion": {
                      "type": "string"
                    },
                    "stateVersion": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "d1c2e3f4-…",
                  "state": "v: s1 | family: boilers | …",
                  "rules": {},
                  "ai": {},
                  "final": {},
                  "policy": {},
                  "vetoes": [],
                  "engineVersion": "e1",
                  "catalogVersion": "c1",
                  "stateVersion": "s1"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "decisionId",
            "in": "path",
            "required": true,
            "description": "Decision id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/decisions/{decisionId}/outcome": {
      "post": {
        "operationId": "record-outcome",
        "tags": [
          "Decision engine"
        ],
        "summary": "Record the confirmed root cause. These labels score rules against AI and train the engine.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#record-outcome"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "decisionId",
            "in": "path",
            "required": true,
            "description": "Decision id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "confirmedCause": {
                    "type": "string",
                    "description": "A hypothesis id from the family’s catalogue, no_fault or other."
                  },
                  "checkId": {
                    "type": "string",
                    "description": "The check that found it."
                  },
                  "note": {
                    "type": "string",
                    "description": "What was found."
                  }
                },
                "required": [
                  "confirmedCause"
                ]
              },
              "example": {
                "confirmedCause": "feedwater_supply",
                "checkId": "feed_pump",
                "note": "Suction strainer blocked."
              }
            }
          }
        }
      }
    },
    "/v1/decision-engine": {
      "get": {
        "operationId": "decision-criteria",
        "tags": [
          "Decision engine"
        ],
        "summary": "The engine’s criteria (no key needed): questions, equipment families, cause hypotheses with their signal evidence, checks with safety levels, signal role patterns and industry policies.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#decision-criteria"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "engineVersion": {
                      "type": "string"
                    },
                    "catalogVersion": {
                      "type": "string"
                    },
                    "questions": {
                      "type": "object",
                      "properties": {}
                    },
                    "families": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "hypotheses": {
                            "type": "array",
                            "items": {}
                          },
                          "checks": {
                            "type": "array",
                            "items": {}
                          }
                        }
                      }
                    },
                    "roles": {
                      "type": "array",
                      "items": {}
                    },
                    "policy": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                },
                "example": {
                  "engineVersion": "e1",
                  "catalogVersion": "c1",
                  "questions": {},
                  "families": [
                    {
                      "id": "boilers",
                      "hypotheses": [],
                      "checks": []
                    }
                  ],
                  "roles": [],
                  "policy": {}
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/v1/decision-engine/readout": {
      "get": {
        "operationId": "decision-readout",
        "tags": [
          "Decision engine"
        ],
        "summary": "How the engine performs for your account, by family, site or industry: rules vs AI agreement, vetoes, and top-1 accuracy of rules, AI and final answers against confirmed causes.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#decision-readout"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "groupBy": {
                      "type": "string"
                    },
                    "days": {
                      "type": "number"
                    },
                    "groups": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "group": {
                            "type": "string"
                          },
                          "decisions": {
                            "type": "number"
                          },
                          "events": {
                            "type": "number"
                          },
                          "aiAnswered": {
                            "type": "number"
                          },
                          "kindAgreePct": {
                            "type": "string"
                          },
                          "topCauseAgreePct": {
                            "type": "string"
                          },
                          "vetoed": {
                            "type": "number"
                          },
                          "labelled": {
                            "type": "number"
                          },
                          "finalTop1Pct": {
                            "type": "string"
                          },
                          "rulesTop1Pct": {
                            "type": "string"
                          },
                          "aiTop1Pct": {
                            "type": "string"
                          },
                          "aiMsAvg": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "groupBy": "family",
                  "days": 30,
                  "groups": [
                    {
                      "group": "boilers",
                      "decisions": 42,
                      "events": 17,
                      "aiAnswered": 17,
                      "kindAgreePct": "94.1",
                      "topCauseAgreePct": "82.4",
                      "vetoed": 3,
                      "labelled": 9,
                      "finalTop1Pct": "88.9",
                      "rulesTop1Pct": "77.8",
                      "aiTop1Pct": "88.9",
                      "aiMsAvg": "1040"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "groupBy",
            "in": "query",
            "required": false,
            "description": "Default family.",
            "schema": {
              "type": "string",
              "enum": [
                "family",
                "site",
                "industry"
              ]
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "description": "1–365, default 30.",
            "schema": {
              "type": "integer"
            }
          }
        ]
      }
    },
    "/v1/connectors/{connectorId}": {
      "get": {
        "operationId": "get-connector",
        "tags": [
          "Connectors"
        ],
        "summary": "One connector and its status. Secrets are never returned.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#get-connector"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "hasSecrets": {
                      "type": "boolean"
                    },
                    "lastError": {},
                    "lastMessageAt": {
                      "type": "string"
                    },
                    "messagesTotal": {
                      "type": "number"
                    }
                  }
                },
                "example": {
                  "id": "44c0aa11-2b3c-4d5e-8f60-718293a4b5c6",
                  "type": "mqtt",
                  "name": "Boiler house broker",
                  "status": "connected",
                  "hasSecrets": true,
                  "lastError": null,
                  "lastMessageAt": "…",
                  "messagesTotal": 17280
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "connectorId",
            "in": "path",
            "required": true,
            "description": "Connector id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "operationId": "update-connector",
        "tags": [
          "Connectors"
        ],
        "summary": "Change settings, or pause and resume with { \"enabled\": false }.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#update-connector"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "id": "44c0aa11-2b3c-4d5e-8f60-718293a4b5c6",
                  "status": "paused"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "connectorId",
            "in": "path",
            "required": true,
            "description": "Connector id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name."
                  },
                  "enabled": {
                    "type": "boolean",
                    "description": "Pause or resume."
                  },
                  "config": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Replaces the settings; omitted secrets are kept."
                  },
                  "mapping": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Replaces the mapping."
                  }
                }
              },
              "example": {
                "enabled": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete-connector",
        "tags": [
          "Connectors"
        ],
        "summary": "Delete a connector.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#delete-connector"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "connectorId",
            "in": "path",
            "required": true,
            "description": "Connector id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/connectors": {
      "post": {
        "operationId": "create-connector",
        "tags": [
          "Connectors"
        ],
        "summary": "Connect a live data source to a site: MQTT broker, OPC UA server, Azure IoT Hub / Event Hubs, or a CSV/JSON URL polled on a schedule.",
        "description": "Requires an API key with the `write` scope.\n\nLive connectors need the Plant Monitor or Enterprise plan. File imports and the ingest API work on every plan.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#create-connector"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "siteId": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "lastError": {},
                    "lastMessageAt": {}
                  }
                },
                "example": {
                  "id": "44c0aa11-2b3c-4d5e-8f60-718293a4b5c6",
                  "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                  "type": "mqtt",
                  "name": "Boiler house broker",
                  "status": "pending",
                  "lastError": null,
                  "lastMessageAt": null
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "siteId": {
                    "type": "string",
                    "description": "Site the data belongs to."
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "mqtt",
                      "opcua",
                      "eventhub",
                      "http_pull"
                    ],
                    "description": "Source type; see Connectors."
                  },
                  "name": {
                    "type": "string",
                    "description": "Display name."
                  },
                  "config": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "Type-specific settings. Passwords and connection strings are encrypted at rest and never returned."
                  },
                  "mapping": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "How messages map to machines and signals."
                  }
                },
                "required": [
                  "siteId",
                  "type",
                  "name",
                  "config"
                ]
              },
              "example": {
                "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                "type": "mqtt",
                "name": "Boiler house broker",
                "config": {
                  "url": "mqtts://broker.example.com:8883",
                  "topic": "plant/+/telemetry",
                  "username": "induqt"
                },
                "mapping": {
                  "machineFrom": "topic",
                  "topicLevel": 1,
                  "autoCreate": true
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "list-connectors",
        "tags": [
          "Connectors"
        ],
        "summary": "List connectors and their status.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#list-connectors"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "connectors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "type": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string"
                          },
                          "lastMessageAt": {
                            "type": "string"
                          },
                          "messages24h": {
                            "type": "number"
                          },
                          "lastError": {}
                        }
                      }
                    }
                  }
                },
                "example": {
                  "connectors": [
                    {
                      "id": "44c0aa11-2b3c-4d5e-8f60-718293a4b5c6",
                      "type": "mqtt",
                      "name": "Boiler house broker",
                      "status": "connected",
                      "lastMessageAt": "…",
                      "messages24h": 17280,
                      "lastError": null
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "siteId",
            "in": "query",
            "required": false,
            "description": "Only this site.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/api-keys": {
      "get": {
        "operationId": "list-keys",
        "tags": [
          "API keys"
        ],
        "summary": "List API keys (never the secret).",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#list-keys"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "prefix": {
                            "type": "string"
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "siteId": {
                            "type": "string"
                          },
                          "lastUsedAt": {
                            "type": "string"
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "keys": [
                    {
                      "id": "7d2e1f00-3a4b-4c5d-9e6f-a1b2c3d4e5f6",
                      "name": "Node-RED line 2",
                      "prefix": "iq_live_7Hk2",
                      "scopes": [
                        "ingest"
                      ],
                      "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e",
                      "lastUsedAt": "…",
                      "createdAt": "…"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      },
      "post": {
        "operationId": "create-key",
        "tags": [
          "API keys"
        ],
        "summary": "Create a key. The secret is shown once.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#create-key"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "key": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "scopes": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "example": {
                  "id": "7d2e1f00-3a4b-4c5d-9e6f-a1b2c3d4e5f6",
                  "key": "iq_live_7Hk2…(shown once)",
                  "name": "Node-RED line 2",
                  "scopes": [
                    "ingest"
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "What uses it."
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "read",
                        "write",
                        "ingest"
                      ]
                    },
                    "description": "What it may do."
                  },
                  "siteId": {
                    "type": "string",
                    "description": "Limit the key to one site."
                  }
                },
                "required": [
                  "name",
                  "scopes"
                ]
              },
              "example": {
                "name": "Node-RED line 2",
                "scopes": [
                  "ingest"
                ],
                "siteId": "6f1c2c0e-4b1a-4c55-9d0e-1f2a3b4c5d6e"
              }
            }
          }
        }
      }
    },
    "/v1/api-keys/{keyId}": {
      "delete": {
        "operationId": "delete-key",
        "tags": [
          "API keys"
        ],
        "summary": "Revoke a key immediately.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#delete-key"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    }
                  }
                },
                "example": {
                  "ok": true
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "description": "Key id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/diagnoses/{diagnosisId}": {
      "get": {
        "operationId": "get-diagnosis",
        "tags": [
          "Diagnosis"
        ],
        "summary": "A diagnosis and its result.",
        "description": "Requires an API key with the `read` scope.",
        "x-induqt-scope": "read",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#get-diagnosis"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "equipment": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "causes": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "…",
                  "status": "done",
                  "equipment": "boilers",
                  "result": {
                    "summary": "…",
                    "causes": []
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "parameters": [
          {
            "name": "diagnosisId",
            "in": "path",
            "required": true,
            "description": "Diagnosis id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/diagnoses": {
      "post": {
        "operationId": "diagnose",
        "tags": [
          "Diagnosis"
        ],
        "summary": "Ask for a diagnosis from a description, uploaded files and optionally a machine.",
        "description": "Requires an API key with the `write` scope.",
        "x-induqt-scope": "write",
        "externalDocs": {
          "url": "https://induqt.ai/docs/api#diagnose"
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "summary": {
                          "type": "string"
                        },
                        "causes": {
                          "type": "array",
                          "items": {}
                        }
                      }
                    }
                  }
                },
                "example": {
                  "id": "…",
                  "status": "done",
                  "result": {
                    "summary": "…",
                    "causes": []
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "equipment": {
                    "type": "string",
                    "description": "Family, e.g. boilers."
                  },
                  "description": {
                    "type": "string",
                    "description": "Symptom or alarm."
                  },
                  "uploadIds": {
                    "type": "array",
                    "items": {},
                    "description": "Photos, manuals, trend files."
                  },
                  "machineId": {
                    "type": "string",
                    "description": "Link to a machine."
                  }
                },
                "required": [
                  "equipment"
                ]
              },
              "example": {
                "equipment": "boilers",
                "description": "RM7800 lockout, fault 29 after pre-purge",
                "machineId": "0b7d9a12-7c3e-4f10-a2b4-c5d6e7f8a9b0"
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "iq_live_…",
        "description": "API key from Settings → API keys, sent as Authorization: Bearer iq_live_…. Scopes: read, write, ingest. See https://induqt.ai/docs/authentication."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable message."
          },
          "code": {
            "type": "string",
            "description": "Stable machine-readable code, when there is one."
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The body or a parameter is invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "name is required"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Missing, malformed or revoked API key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "invalid api key"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key lacks the scope, is limited to another site, or the plan does not allow this.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "this key does not have the write scope"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such resource in this account.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "not found"
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "Rate limit exceeded. Back off and retry.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "error": "rate limit exceeded"
            }
          }
        }
      }
    }
  }
}