{
  "openapi": "3.0.3",
  "info": {
    "title": "Inaya Network Public API",
    "version": "v1",
    "description": "Every public/v1 request needs Authorization: Bearer <api key>. An org owner/admin issues a key from the Business Workspace's API Keys settings (src/app/api/orgs/api-keys/route.js), or Terraform can be pointed at one via INAYA_API_KEY. The key resolves to exactly one organization server-side (requireApiKey() in src/lib/api-keys.js) -- no request body or query parameter can ever point it at a different org."
  },
  "servers": [
    {
      "url": "https://app.inaya.network",
      "description": "Production"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "An Inaya org API key. See /docs/api."
      }
    }
  },
  "paths": {
    "/api/public/v1/evidence": {
      "get": {
        "summary": "Fetch the evidence trail for one business record.",
        "operationId": "get_evidence",
        "tags": [
          "/api/public/v1/evidence"
        ],
        "parameters": [
          {
            "name": "recordType",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The record's type, e.g. INVOICE, PURCHASE_ORDER."
          },
          {
            "name": "recordId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The record's id."
          }
        ],
        "responses": {
          "200": {
            "description": "The record's evidence trail (getEvidenceTrail()) -- the same tamper-evident audit chain data the Business Workspace's own Audit Trail view reads.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/audit/verify": {
      "get": {
        "summary": "Verify the calling organization's full audit-chain integrity.",
        "operationId": "get_audit-verify",
        "tags": [
          "/api/public/v1/audit"
        ],
        "responses": {
          "200": {
            "description": "A pass/fail integrity result over the org's entire audit chain (verifyOrgEvidenceIntegrity()).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/permissions/check": {
      "get": {
        "summary": "Check whether a named permission gate is enabled for the calling organization.",
        "operationId": "get_permissions-check",
        "tags": [
          "/api/public/v1/permissions"
        ],
        "parameters": [
          {
            "name": "gate",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "One of 17 gate names, e.g. canManageFinance, canAccessAudit, canManageGovernment -- see orgGates.js for the full list."
          }
        ],
        "responses": {
          "200": {
            "description": "{ gate, allowed }. Note: an API key always resolves a synthetic owner-level membership, so this checks that a capability exists and is enabled for the org, not a specific human's individual role.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/storage/resources": {
      "get": {
        "summary": "List or create storage resources (volumes / file shares).",
        "operationId": "get_storage-resources-list-create",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "\"volume\" or \"fileShare\"."
          },
          {
            "name": "tag.<key>",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Any number of tag.<key>=<value> params filter by tag."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { resources: [...] }. POST: { resource: {...} }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "List or create storage resources (volumes / file shares).",
        "operationId": "post_storage-resources-list-create",
        "tags": [
          "/api/public/v1/storage"
        ],
        "responses": {
          "200": {
            "description": "GET: { resources: [...] }. POST: { resource: {...} }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "description": "Creates a resource -- see the Storage Control Plane product guide for the full field meanings."
                  },
                  "name": {
                    "description": "Creates a resource -- see the Storage Control Plane product guide for the full field meanings."
                  },
                  "region": {
                    "description": "Creates a resource -- see the Storage Control Plane product guide for the full field meanings."
                  },
                  "capacity": {
                    "description": "Creates a resource -- see the Storage Control Plane product guide for the full field meanings."
                  },
                  "performanceProfile": {
                    "description": "Creates a resource -- see the Storage Control Plane product guide for the full field meanings."
                  },
                  "tags": {
                    "description": "Creates a resource -- see the Storage Control Plane product guide for the full field meanings."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/storage/resources/{resourceId}": {
      "get": {
        "summary": "Read, expand the capacity of, or delete one storage resource.",
        "operationId": "get_storage-resource-detail",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resourceId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { resource }. PATCH: { requestedGB }. DELETE: { deleted: true }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "summary": "Read, expand the capacity of, or delete one storage resource.",
        "operationId": "patch_storage-resource-detail",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resourceId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { resource }. PATCH: { requestedGB }. DELETE: { deleted: true }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "description": "action must be \"expand\"; capacity is increase-only, a decrease is rejected with a 400."
                  },
                  "newCapacityGB": {
                    "description": "action must be \"expand\"; capacity is increase-only, a decrease is rejected with a 400."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Read, expand the capacity of, or delete one storage resource.",
        "operationId": "delete_storage-resource-detail",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The resourceId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { resource }. PATCH: { requestedGB }. DELETE: { deleted: true }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/storage/snapshots": {
      "get": {
        "summary": "List or create point-in-time snapshots of a storage resource.",
        "operationId": "get_snapshots-list-create",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "resourceId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "The source inaya_storage_resource id."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { snapshots: [...] }. POST: { snapshot: {...} } -- a real, incremental, independently-verifiable capture; see the Storage Control Plane guide.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "List or create point-in-time snapshots of a storage resource.",
        "operationId": "post_snapshots-list-create",
        "tags": [
          "/api/public/v1/storage"
        ],
        "responses": {
          "200": {
            "description": "GET: { snapshots: [...] }. POST: { snapshot: {...} } -- a real, incremental, independently-verifiable capture; see the Storage Control Plane guide.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/storage/snapshots/{snapshotId}": {
      "get": {
        "summary": "Read or delete one snapshot.",
        "operationId": "get_snapshot-detail",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "snapshotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The snapshotId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { snapshot }. DELETE: { deleted: true }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Read or delete one snapshot.",
        "operationId": "delete_snapshot-detail",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "snapshotId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The snapshotId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { snapshot }. DELETE: { deleted: true }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/storage/backup-policies": {
      "get": {
        "summary": "List or create a tag-selector-scoped automated backup policy.",
        "operationId": "get_backup-policies-list-create",
        "tags": [
          "/api/public/v1/storage"
        ],
        "responses": {
          "200": {
            "description": "GET: { policies: [...] }. POST: { policy: {...} }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "List or create a tag-selector-scoped automated backup policy.",
        "operationId": "post_backup-policies-list-create",
        "tags": [
          "/api/public/v1/storage"
        ],
        "responses": {
          "200": {
            "description": "GET: { policies: [...] }. POST: { policy: {...} }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "description": "tagSelector is a {key: value} map; notificationPolicy is \"onFailure\" (default), \"always\", or \"never\"."
                  },
                  "tagSelector": {
                    "description": "tagSelector is a {key: value} map; notificationPolicy is \"onFailure\" (default), \"always\", or \"never\"."
                  },
                  "notificationPolicy": {
                    "description": "tagSelector is a {key: value} map; notificationPolicy is \"onFailure\" (default), \"always\", or \"never\"."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/storage/backup-policies/{policyId}": {
      "get": {
        "summary": "Read, pause/resume, or delete one backup policy.",
        "operationId": "get_backup-policy-detail",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The policyId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { policy }. PATCH: { policy }. DELETE: { deleted: true } (soft delete).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "summary": "Read, pause/resume, or delete one backup policy.",
        "operationId": "patch_backup-policy-detail",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The policyId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { policy }. PATCH: { policy }. DELETE: { deleted: true } (soft delete).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "description": "true to resume, false to pause."
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Read, pause/resume, or delete one backup policy.",
        "operationId": "delete_backup-policy-detail",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The policyId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { policy }. PATCH: { policy }. DELETE: { deleted: true } (soft delete).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/storage/backup-plans": {
      "get": {
        "summary": "List or create a schedule + retention rule under a backup policy.",
        "operationId": "get_backup-plans-list-create",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "policyId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter to one policy's plans."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { plans: [...] } (each with a computed health field). POST: { plan: {...} }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "List or create a schedule + retention rule under a backup policy.",
        "operationId": "post_backup-plans-list-create",
        "tags": [
          "/api/public/v1/storage"
        ],
        "responses": {
          "200": {
            "description": "GET: { plans: [...] } (each with a computed health field). POST: { plan: {...} }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "policyId": {
                    "description": "frequency is one of daily/weekly/monthly/longTerm."
                  },
                  "frequency": {
                    "description": "frequency is one of daily/weekly/monthly/longTerm."
                  },
                  "retentionCount": {
                    "description": "frequency is one of daily/weekly/monthly/longTerm."
                  },
                  "priority": {
                    "description": "frequency is one of daily/weekly/monthly/longTerm."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/storage/backup-plans/{planId}": {
      "get": {
        "summary": "Read or delete one backup plan.",
        "operationId": "get_backup-plan-detail",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The planId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { plan } (with health). DELETE: { deleted: true } (soft delete).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Read or delete one backup plan.",
        "operationId": "delete_backup-plan-detail",
        "tags": [
          "/api/public/v1/storage"
        ],
        "parameters": [
          {
            "name": "planId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The planId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { plan } (with health). DELETE: { deleted: true } (soft delete).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/support/tickets": {
      "get": {
        "summary": "List a customer's tickets or create one. Needs a support API key with tickets:read / tickets:write.",
        "operationId": "get_support-tickets",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "customerEmail, status, limit, skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "customerEmail is only used by a service (unbound) key; a customer-bound key always acts as its own customer. status is open or resolved."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { tickets: [...], total }. POST: 201 { ticket, duplicate } in the customer-safe shape (public messages and customer-facing status only).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "List a customer's tickets or create one. Needs a support API key with tickets:read / tickets:write.",
        "operationId": "post_support-tickets",
        "tags": [
          "/api/public/v1/support"
        ],
        "responses": {
          "200": {
            "description": "GET: { tickets: [...], total }. POST: 201 { ticket, duplicate } in the customer-safe shape (public messages and customer-facing status only).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "description": "customerEmail is required for a service key and forbidden to differ from the bound customer for a bound key. Send an Idempotency-Key header (8-100 characters): a retry returns the first ticket instead of creating another. Priority is decided by policy, not by the caller."
                  },
                  "description": {
                    "description": "customerEmail is required for a service key and forbidden to differ from the bound customer for a bound key. Send an Idempotency-Key header (8-100 characters): a retry returns the first ticket instead of creating another. Priority is decided by policy, not by the caller."
                  },
                  "type": {
                    "description": "customerEmail is required for a service key and forbidden to differ from the bound customer for a bound key. Send an Idempotency-Key header (8-100 characters): a retry returns the first ticket instead of creating another. Priority is decided by policy, not by the caller."
                  },
                  "category": {
                    "description": "customerEmail is required for a service key and forbidden to differ from the bound customer for a bound key. Send an Idempotency-Key header (8-100 characters): a retry returns the first ticket instead of creating another. Priority is decided by policy, not by the caller."
                  },
                  "customerEmail": {
                    "description": "customerEmail is required for a service key and forbidden to differ from the bound customer for a bound key. Send an Idempotency-Key header (8-100 characters): a retry returns the first ticket instead of creating another. Priority is decided by policy, not by the caller."
                  },
                  "linkedInvoiceNumber": {
                    "description": "customerEmail is required for a service key and forbidden to differ from the bound customer for a bound key. Send an Idempotency-Key header (8-100 characters): a retry returns the first ticket instead of creating another. Priority is decided by policy, not by the caller."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/support/tickets/{ticketId}": {
      "get": {
        "summary": "Read one ticket as its customer would see it.",
        "operationId": "get_support-ticket-detail",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ticketId."
          }
        ],
        "responses": {
          "200": {
            "description": "{ ticket } with public messages, attachments and the customer-facing status. Internal notes, routing, SLA internals and AI output are never included. A ticket the key may not see is a 404.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/support/tickets/{ticketId}/replies": {
      "post": {
        "summary": "Add a customer reply to a ticket (tickets:write).",
        "operationId": "post_support-ticket-replies",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ticketId."
          }
        ],
        "responses": {
          "200": {
            "description": "201 { message }. A reply on a closed ticket is refused (409) with a path to a follow-up request; a reply on a solved ticket reopens it.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "description": "Plain text. Markup is not stored."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/support/tickets/{ticketId}/close": {
      "post": {
        "summary": "Mark a ticket resolved on behalf of its customer (tickets:write).",
        "operationId": "post_support-ticket-close",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ticketId."
          }
        ],
        "responses": {
          "200": {
            "description": "{ ticket } with the customer-facing status SOLVED. The customer may reopen it inside the reopen window.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/support/tickets/{ticketId}/reopen": {
      "post": {
        "summary": "Reopen a solved ticket (tickets:write).",
        "operationId": "post_support-ticket-reopen",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ticketId."
          }
        ],
        "responses": {
          "200": {
            "description": "{ ticket }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "description": "Short text recorded in the audit trail."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/support/tickets/{ticketId}/attachments": {
      "post": {
        "summary": "Attach a file to a ticket (attachments:write).",
        "operationId": "post_support-ticket-attachments",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The ticketId."
          }
        ],
        "responses": {
          "200": {
            "description": "201 { attachment: { id, filename, contentType, sizeBytes } }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "description": "Up to 4 MB after decoding. Executables and scripts are refused; files are stored encrypted and are policy-checked only (there is no antivirus engine)."
                  },
                  "contentBase64": {
                    "description": "Up to 4 MB after decoding. Executables and scripts are refused; files are stored encrypted and are policy-checked only (there is no antivirus engine)."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/support/knowledge": {
      "get": {
        "summary": "Search published knowledge-base articles a customer may read (knowledge:read).",
        "operationId": "get_support-knowledge",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "q, limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Search text and result count."
          }
        ],
        "responses": {
          "200": {
            "description": "{ results: [{ slug, title, summary, snippet }] }. Read one article at /api/public/v1/support/knowledge/{slug}.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/support/invoices": {
      "get": {
        "summary": "Read-only list of the customer's invoices from your Finance records (invoices:read).",
        "operationId": "get_support-invoices",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "customerEmail",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Service keys only."
          }
        ],
        "responses": {
          "200": {
            "description": "{ invoices: [{ invoiceNumber, issueDate, dueDate, status, currency, total }] }. Only the customer's own CRM contact is ever read; nothing is copied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/support/queues": {
      "get": {
        "summary": "List active queue names (queues:read).",
        "operationId": "get_support-queues",
        "tags": [
          "/api/public/v1/support"
        ],
        "responses": {
          "200": {
            "description": "{ queues: [{ id, name, description }] }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/support/ideas": {
      "post": {
        "summary": "Submit an idea on behalf of a bound customer (ideas:write; customer-bound keys only).",
        "operationId": "post_support-ideas",
        "tags": [
          "/api/public/v1/support"
        ],
        "responses": {
          "200": {
            "description": "201 { idea }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "description": "Ideas are private unless the organization enables voting and the customer opts in."
                  },
                  "description": {
                    "description": "Ideas are private unless the organization enables voting and the customer opts in."
                  },
                  "expectedBenefit": {
                    "description": "Ideas are private unless the organization enables voting and the customer opts in."
                  },
                  "communityVisible": {
                    "description": "Ideas are private unless the organization enables voting and the customer opts in."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/support/ai/chat": {
      "post": {
        "summary": "Ask the AI assistant a question as a bound customer (ai:chat).",
        "operationId": "post_support-ai-chat",
        "tags": [
          "/api/public/v1/support"
        ],
        "responses": {
          "200": {
            "description": "{ sessionId, reply: { text, citations, handoffOffered } }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "message": {
                    "description": "The assistant answers only from published articles the customer may read and cites them. If it cannot answer, handoffOffered is true."
                  },
                  "sessionId": {
                    "description": "The assistant answers only from published articles the customer may read and cites them. If it cannot answer, handoffOffered is true."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/support/events": {
      "get": {
        "summary": "Ordered feed of support events for a service key (events:read).",
        "operationId": "get_support-events",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "since, limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO timestamp cursor and page size (max 200)."
          }
        ],
        "responses": {
          "200": {
            "description": "{ events: [{ id, type, createdAt, ticketId, data }] }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/support/uploads": {
      "post": {
        "summary": "Start a large attachment upload (attachments:write). Files up to 25 MB are sent in 3 MB chunks.",
        "operationId": "post_support-uploads",
        "tags": [
          "/api/public/v1/support"
        ],
        "responses": {
          "200": {
            "description": "{ uploadId, chunkBytes, chunks, filename }. Then PUT /api/public/v1/support/uploads/{uploadId}?index=N with the raw bytes of chunk N (chunkBytes each, the last one shorter), and POST /api/public/v1/support/uploads/{uploadId} to assemble, scan and store the file. A file that fails the malware scan is refused with reasonCode MALWARE_DETECTED.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ticketId": {
                    "description": "Type and size are checked before any bytes are sent. sha256 (hex) is optional and, when given, verified after assembly."
                  },
                  "filename": {
                    "description": "Type and size are checked before any bytes are sent. sha256 (hex) is optional and, when given, verified after assembly."
                  },
                  "size": {
                    "description": "Type and size are checked before any bytes are sent. sha256 (hex) is optional and, when given, verified after assembly."
                  },
                  "sha256": {
                    "description": "Type and size are checked before any bytes are sent. sha256 (hex) is optional and, when given, verified after assembly."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/support/uploads/{uploadId}": {
      "put": {
        "summary": "Send one chunk (PUT ?index=N) or complete the upload (POST).",
        "operationId": "put_support-upload-chunk",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The uploadId."
          }
        ],
        "responses": {
          "200": {
            "description": "PUT: { received: N }. POST: { attachment: { id, filename, contentType, sizeBytes } }, or 409 with the list of chunks received if some are missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Send one chunk (PUT ?index=N) or complete the upload (POST).",
        "operationId": "post_support-upload-chunk",
        "tags": [
          "/api/public/v1/support"
        ],
        "parameters": [
          {
            "name": "uploadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The uploadId."
          }
        ],
        "responses": {
          "200": {
            "description": "PUT: { received: N }. POST: { attachment: { id, filename, contentType, sizeBytes } }, or 409 with the list of chunks received if some are missing.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/integrations/identity/status": {
      "get": {
        "summary": "Sync status for the organization: providers, events waiting or failed, unfinished revocations, last drift report. Needs identity:read.",
        "operationId": "get_identity-status",
        "tags": [
          "/api/integrations/identity/status"
        ],
        "responses": {
          "200": {
            "description": "{ providers, events: { pending, failed, stale }, revocations: { unfinished }, identities: { active, disabledOrRevoked }, lastDriftReport }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/integrations/identity/users/{user}": {
      "get": {
        "summary": "One person's membership, linked external identities and every grant with its source (external baseline, manual override, existing, temporary). Needs identity:read.",
        "operationId": "get_identity-user",
        "tags": [
          "/api/integrations/identity/users"
        ],
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The user."
          }
        ],
        "responses": {
          "200": {
            "description": "{ user: { email, membership, externalIdentities, access: { effective, grants[] } } }. No secrets.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/integrations/identity/users/provision": {
      "post": {
        "summary": "Apply one lifecycle event (create, update, disable, enable, department or group change) for a provider, or preview it with dryRun. Needs identity:provision.",
        "operationId": "post_identity-user-provision",
        "tags": [
          "/api/integrations/identity/users"
        ],
        "responses": {
          "200": {
            "description": "{ status: PROCESSED | DUPLICATE | STALE | PENDING | UNRESOLVED | DRY_RUN, runId, state }. With dryRun: { plan, liveMutation: false }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerId": {
                    "description": "event follows the canonical schema (type, subject.externalId, ...). Repeating an eventId is a no-op. Send Idempotency-Key on the request."
                  },
                  "event": {
                    "description": "event follows the canonical schema (type, subject.externalId, ...). Repeating an eventId is a no-op. Send Idempotency-Key on the request."
                  },
                  "dryRun": {
                    "description": "event follows the canonical schema (type, subject.externalId, ...). Repeating an eventId is a no-op. Send Idempotency-Key on the request."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/integrations/identity/users/{user}/revoke": {
      "post": {
        "summary": "Revoke (mode full) or restrict (mode restrict) a person's access now. Frozen first, then sessions, credentials, permissions, sharing and break-glass are ended and each is verified. Needs identity:revoke.",
        "operationId": "post_identity-user-revoke",
        "tags": [
          "/api/integrations/identity/users"
        ],
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The user."
          }
        ],
        "responses": {
          "200": {
            "description": "{ revocation: { state: REVOCATION_COMPLETE | REVOCATION_PARTIAL | REVOCATION_FAILED, steps } }. The last active owner cannot be revoked (409 LAST_OWNER).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "description": "mode is full or restrict. With dryRun the Digital Twin impact preview is returned and nothing changes."
                  },
                  "mode": {
                    "description": "mode is full or restrict. With dryRun the Digital Twin impact preview is returned and nothing changes."
                  },
                  "dryRun": {
                    "description": "mode is full or restrict. With dryRun the Digital Twin impact preview is returned and nothing changes."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/integrations/identity/users/{user}/restore": {
      "post": {
        "summary": "Restore a revoked or restricted person. Access is re-derived from the source, not from the old snapshot. Needs a signed-in owner or admin; a service credential is refused.",
        "operationId": "post_identity-user-restore",
        "tags": [
          "/api/integrations/identity/users"
        ],
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The user."
          }
        ],
        "responses": {
          "200": {
            "description": "{ restored, from, rederived, pendingApproval[] }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/integrations/identity/dry-run": {
      "post": {
        "summary": "Show exactly what an event would do, without changing anything. Needs identity:read.",
        "operationId": "post_identity-dry-run",
        "tags": [
          "/api/integrations/identity/dry-run"
        ],
        "responses": {
          "200": {
            "description": "{ status: DRY_RUN, plan, liveMutation: false, text } where text is exportable and ends with LIVE MUTATION: NO.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerId": {
                    "description": "The provider and the event to evaluate."
                  },
                  "event": {
                    "description": "The provider and the event to evaluate."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/integrations/identity/reconcile": {
      "post": {
        "summary": "Post a directory export in chunks (snapshotId, users, last) and get a drift report when the last chunk arrives. Reports only; nothing is deleted. Needs identity:reconcile.",
        "operationId": "post_identity-reconcile",
        "tags": [
          "/api/integrations/identity/reconcile"
        ],
        "responses": {
          "200": {
            "description": "{ received, chunk, complete } and, on the last chunk, { report: { summary: { MATCH, DRIFT, CONFLICT, UNRESOLVED }, findings[] } }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerId": {
                    "description": "Up to 1000 users per request; set last true on the final chunk."
                  },
                  "snapshotId": {
                    "description": "Up to 1000 users per request; set last true on the final chunk."
                  },
                  "users": {
                    "description": "Up to 1000 users per request; set last true on the final chunk."
                  },
                  "last": {
                    "description": "Up to 1000 users per request; set last true on the final chunk."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/integrations/identity/mappings": {
      "get": {
        "summary": "List or create group/attribute mappings. POST needs identity:mapping. Owner can never be granted; admin is privileged and needs a human approval.",
        "operationId": "get_identity-mappings",
        "tags": [
          "/api/integrations/identity/mappings"
        ],
        "responses": {
          "200": {
            "description": "GET: { mappings[] }. POST: 201 { mapping }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "List or create group/attribute mappings. POST needs identity:mapping. Owner can never be granted; admin is privileged and needs a human approval.",
        "operationId": "post_identity-mappings",
        "tags": [
          "/api/integrations/identity/mappings"
        ],
        "responses": {
          "200": {
            "description": "GET: { mappings[] }. POST: 201 { mapping }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "providerId": {
                    "description": "match is { type: group, value } or { type: attribute, attribute, value }; grants are department, project or role grants."
                  },
                  "name": {
                    "description": "match is { type: group, value } or { type: attribute, attribute, value }; grants are department, project or role grants."
                  },
                  "match": {
                    "description": "match is { type: group, value } or { type: attribute, attribute, value }; grants are department, project or role grants."
                  },
                  "grants": {
                    "description": "match is { type: group, value } or { type: attribute, attribute, value }; grants are department, project or role grants."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/shares": {
      "get": {
        "summary": "List shares, or create a link share (or a share with a member). Needs the Advanced Sharing feature enabled for the organization.",
        "operationId": "get_shares-list-create",
        "tags": [
          "/api/public/v1/shares"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "active, expired, revoked or exhausted."
          },
          {
            "name": "documentId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Only shares of this document."
          },
          {
            "name": "limit, before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page size (max 100) and a cursor."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { shares[], next }. POST: 201 with the share; the link token is returned once and never listed again.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "List shares, or create a link share (or a share with a member). Needs the Advanced Sharing feature enabled for the organization.",
        "operationId": "post_shares-list-create",
        "tags": [
          "/api/public/v1/shares"
        ],
        "responses": {
          "200": {
            "description": "GET: { shares[], next }. POST: 201 with the share; the link token is returned once and never listed again.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "documentId": {
                    "description": "A link share. With memberEmail and permission it is a share with a member instead."
                  },
                  "expiresAt or expirationPreset": {
                    "description": "A link share. With memberEmail and permission it is a share with a member instead."
                  },
                  "options": {
                    "description": "A link share. With memberEmail and permission it is a share with a member instead."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/shares/{shareId}": {
      "get": {
        "summary": "Read the access events of one share, or revoke it.",
        "operationId": "get_shares-item",
        "tags": [
          "/api/public/v1/shares"
        ],
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The shareId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { events[] } with masked addresses. DELETE: the revoked share.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Read the access events of one share, or revoke it.",
        "operationId": "delete_shares-item",
        "tags": [
          "/api/public/v1/shares"
        ],
        "parameters": [
          {
            "name": "shareId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The shareId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { events[] } with masked addresses. DELETE: the revoked share.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/file-requests": {
      "get": {
        "summary": "List file requests (metadata only). Creating a request needs a browser, because its key pair must never exist on a server.",
        "operationId": "get_file-requests-list",
        "tags": [
          "/api/public/v1/file-requests"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by status."
          }
        ],
        "responses": {
          "200": {
            "description": "{ requests[] } without keys.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/file-requests/{requestId}": {
      "get": {
        "summary": "Inspect one request and its uploads, or revoke it.",
        "operationId": "get_file-requests-item",
        "tags": [
          "/api/public/v1/file-requests"
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The requestId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: the request and its uploads list (no keys, no content). DELETE: the revoked request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "summary": "Inspect one request and its uploads, or revoke it.",
        "operationId": "delete_file-requests-item",
        "tags": [
          "/api/public/v1/file-requests"
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The requestId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: the request and its uploads list (no keys, no content). DELETE: the revoked request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/governance/policies": {
      "get": {
        "summary": "Read governance, DLP or classification policies. Changes stay in the app, behind approvals.",
        "operationId": "get_governance-policies",
        "tags": [
          "/api/public/v1/governance"
        ],
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "governance, dlp or classification."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Policy status."
          }
        ],
        "responses": {
          "200": {
            "description": "{ policies[] }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/governance/dlp-events": {
      "get": {
        "summary": "Read data-loss decisions with masked addresses.",
        "operationId": "get_governance-dlp-events",
        "tags": [
          "/api/public/v1/governance"
        ],
        "parameters": [
          {
            "name": "decision",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by decision."
          },
          {
            "name": "limit, before",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Page size (max 200) and a cursor."
          }
        ],
        "responses": {
          "200": {
            "description": "{ events[] }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/classification/{documentId}": {
      "get": {
        "summary": "Classification history for a document, or evaluate the rules for it (a dry run unless dryRun is false).",
        "operationId": "get_classification-document",
        "tags": [
          "/api/public/v1/classification"
        ],
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The documentId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { history[] }. POST: the evaluation result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Classification history for a document, or evaluate the rules for it (a dry run unless dryRun is false).",
        "operationId": "post_classification-document",
        "tags": [
          "/api/public/v1/classification"
        ],
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The documentId."
          }
        ],
        "responses": {
          "200": {
            "description": "GET: { history[] }. POST: the evaluation result.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "dryRun": {
                    "description": "Defaults to true."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/devices": {
      "get": {
        "summary": "Device inventory for the organization. Needs the Device Control feature.",
        "operationId": "get_devices-list",
        "tags": [
          "/api/public/v1/devices"
        ],
        "responses": {
          "200": {
            "description": "{ devices[] }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/devices/{deviceId}": {
      "get": {
        "summary": "Read one device, or apply an action (trust, block, revoke, sign out, wipe app data, and so on).",
        "operationId": "get_devices-item",
        "tags": [
          "/api/public/v1/devices"
        ],
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The deviceId."
          }
        ],
        "responses": {
          "200": {
            "description": "The device after the action.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Read one device, or apply an action (trust, block, revoke, sign out, wipe app data, and so on).",
        "operationId": "post_devices-item",
        "tags": [
          "/api/public/v1/devices"
        ],
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The deviceId."
          }
        ],
        "responses": {
          "200": {
            "description": "The device after the action.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "description": "One of the supported device actions."
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/public/v1/endpoint-backup/health": {
      "get": {
        "summary": "Endpoint backup health overview. Needs the Endpoint Backup feature.",
        "operationId": "get_endpoint-backup-health",
        "tags": [
          "/api/public/v1/endpoint-backup"
        ],
        "responses": {
          "200": {
            "description": "{ profiles[], summary }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/compliance/summary": {
      "get": {
        "summary": "Readiness overview by control family. Readiness only: never a certification. Needs the Compliance Readiness feature.",
        "operationId": "get_compliance-summary",
        "tags": [
          "/api/public/v1/compliance"
        ],
        "responses": {
          "200": {
            "description": "{ catalog, totals, families[], disclaimer }.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/public/v1/compliance/controls": {
      "get": {
        "summary": "Control status with computed evidence state. Read-only.",
        "operationId": "get_compliance-controls",
        "tags": [
          "/api/public/v1/compliance"
        ],
        "parameters": [
          {
            "name": "family, implementation, evidence, responsibility, owner, q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filters."
          }
        ],
        "responses": {
          "200": {
            "description": "{ controls[] } with implementation, responsibility, owner, evidence state and exceptions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key."
          },
          "403": {
            "description": "The API key's organization does not have access to this capability."
          },
          "404": {
            "description": "The requested resource does not exist, or does not belong to this API key's organization."
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  }
}
