{
  "openapi": "3.0.1",
  "info": {
    "title": "SignersChoice Public API",
    "description": "The SignersChoice Public API lets external systems integrate with SignersChoice.\n\nAuthenticate once with your client credentials to obtain a bearer token, then call the\nresource endpoints with that token. Access is scoped to the organization the credentials\nbelong to, so no organization identifier is ever sent on a request.\n\nAll requests and responses are JSON, and all endpoints are served over HTTPS.",
    "contact": {
      "name": "SignersChoice Support",
      "email": "support@signerschoice.com"
    },
    "version": "v1"
  },
  "paths": {
    "/v1/auth/token": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Exchange client credentials for a JWT access token",
        "requestBody": {
          "description": "Token request with client credentials",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR, INVALID_JSON)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Invalid client credentials (INVALID_CLIENT)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "The body is not application/json (UNSUPPORTED_MEDIA_TYPE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many failed attempts - client locked out (CLIENT_LOCKED_OUT)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "The token service is temporarily unavailable (SERVICE_UNAVAILABLE)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "post-v1-auth-token",
        "security": []
      }
    },
    "/v1/files/{fileId}/documents": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get the documents of a file",
        "description": "Example: GET /v1/files/{fileId}/documents\r\n            \r\nUse `versions[].documentVersionId` to download a document and `id` to rename or delete it.\r\n            \r\nRequires the `Documents.List` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "File ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Documents retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListDocumentsResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired access token, or invalid sender header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Sender is not allowed, or the token does not have the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Documents could not be retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get-v1-files-fileid-documents",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Documents.List"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Upload documents to a file",
        "description": "Form fields:\r\n            \r\n    files: [binary]                                   (1-10 files, max 20 MB each, file name max 78 characters)\r\n    documentsInfo[0].displayName: \"Deed.pdf\"          (1-255 characters, no < > : \" | \\ / ? *)\r\n    documentsInfo[0].documentTypeId: 1                (1-12, or 13 = Underwriter Approval Letter)\r\n    documentsInfo[0].mimeType: \"application/pdf\"      (optional)\r\n            \r\n`documentsInfo[i]` describes `files[i]`. Allowed types: .pdf .doc .docx .txt .jpg .jpeg .png.\r\n            \r\nWhen some files cannot be stored the response is still 201 and lists them in `failed`.\r\n            \r\nRequires the `Documents.Upload` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "File ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "Files": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "binary"
                    },
                    "description": "The files to upload (max 10, 20 MB each)."
                  },
                  "DocumentsInfo": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/DocumentInfoDto"
                    },
                    "description": "Metadata for each file, in the same order as SignersChoice.Public.Api.Documents.DTOs.Request.UploadDocumentsRequestDto.Files."
                  }
                }
              },
              "encoding": {
                "Files": {
                  "style": "form"
                },
                "DocumentsInfo": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "At least one document was uploaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadDocumentsResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR), or none of the documents could be uploaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired access token, or invalid sender header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Sender is not allowed, or the token does not have the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "File is archived and read-only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "413": {
            "description": "Request is too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Documents could not be uploaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "post-v1-files-fileid-documents",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Documents.Upload"
            ]
          }
        ]
      }
    },
    "/v1/files/{fileId}/documents/download": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Get download links for documents of a file",
        "description": "Example body:\r\n            \r\n    { \"documents\": [ { \"documentVersionId\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\" } ] }\r\n            \r\nThe URLs are read-only and expire after about 10 minutes. Request new links instead of storing them.\r\n            \r\nRequires the `Documents.Download` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "File ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Document versions to download (1-20)",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DownloadDocumentsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Download links generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DownloadDocumentsResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (VALIDATION_ERROR)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired access token, or invalid sender header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Sender is not allowed, or the token does not have the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "File or document version not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Download links could not be generated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "post-v1-files-fileid-documents-download",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Documents.Download"
            ]
          }
        ]
      }
    },
    "/v1/files": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "4.3.1 Create a file with its property, participants and team sharing",
        "description": "Requires the `Files.Create` scope. Send `statusId = 1` to save a Draft (only\r\n`fileNumber` is mandatory); otherwise loan purpose, closing date, title insurance and the\r\nproperty address are required, exactly as in the web portal.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFileRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "File created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed, or the file was rejected by a business rule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "post-v1-files",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Files.Create"
            ]
          }
        ],
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      },
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "4.3.2 List the files of the caller's organization",
        "description": "Requires the `Files.List` scope. Org admins see every file of the organization; other users\r\nsee the files they created and files shared with their teams (same as the web dashboard).",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Page",
            "in": "query",
            "description": "Page number (1-based, default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Records per page (default 20, max 100)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Search",
            "in": "query",
            "description": "Search text: file number, property address, client name or participant name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Status",
            "in": "query",
            "description": "Comma-separated status names to include: Draft, Created, Active, Completed, Cancelled, Archived",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ExcludeStatus",
            "in": "query",
            "description": "Comma-separated status names to exclude (same values as `status`)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SigningType",
            "in": "query",
            "description": "Comma-separated signing types: Mobile, RON, eSign, IPEN",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortBy",
            "in": "query",
            "description": "Sort column: lastUpdated (default), dateCreated, closingDate, fileNumber, status",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortDirection",
            "in": "query",
            "description": "Sort direction: asc or desc (default)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ClosingDateFrom",
            "in": "query",
            "description": "Only files with closing date >= this date (ISO 8601, e.g. 2025-07-01)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ClosingDateTo",
            "in": "query",
            "description": "Only files with closing date <= this date (ISO 8601, e.g. 2025-07-31)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Files retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListFilesResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get-v1-files",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Files.List"
            ]
          }
        ]
      }
    },
    "/v1/files/{fileId}": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "4.3.3 Get a file with its properties, participants, documents, signings and teams",
        "description": "Requires the `Files.Retrieve` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The file does not exist in the caller's organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get-v1-files-fileid",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Files.Retrieve"
            ]
          }
        ]
      },
      "put": {
        "tags": [
          "Files"
        ],
        "summary": "4.3.4 Update a file (only the fields supplied are changed)",
        "description": "Requires the `Files.Update` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFileRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateFileResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed, or the update was rejected by a business rule",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The file does not exist in the caller's organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "put-v1-files-fileid",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Files.Update"
            ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Files"
        ],
        "summary": "4.3.6 Delete a file",
        "description": "Requires the `Files.Cancel` scope (there is no separate delete scope).",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "File deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteFileResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "The file could not be deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The file does not exist in the caller's organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "delete-v1-files-fileid",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Files.Cancel"
            ]
          }
        ]
      }
    },
    "/v1/files/{fileId}/transition": {
      "post": {
        "tags": [
          "Files"
        ],
        "summary": "4.3.5 Change the file status: `complete`, `cancel`, `reopen` or `restore`",
        "description": "Requires `Files.Cancel` for `cancel` and `Files.Update` for the other actions.\r\n`restore` is only allowed for the file owner, a team manager or an org admin.\r\nUse GET /v1/files/{fileId}/action-eligibility to see which actions are currently allowed.\r\nA transition that is not allowed in the file's current state returns 409 with the reason.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FileTransitionRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status changed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileTransitionResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid action",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The file does not exist in the caller's organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The action is not allowed in the file's current state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileTransitionResponseDto"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "post-v1-files-fileid-transition"
      }
    },
    "/v1/files/{fileId}/action-eligibility": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "4.3.7 Which status changes are currently allowed on the file",
        "description": "Requires the `Files.Retrieve` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Eligibility retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileActionEligibilityResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The file does not exist in the caller's organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get-v1-files-fileid-action-eligibility",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Files.Retrieve"
            ]
          }
        ]
      }
    },
    "/v1/files/{fileId}/activities": {
      "get": {
        "tags": [
          "Files"
        ],
        "summary": "4.3.8 Activity log of the file (newest first)",
        "description": "Requires the `Files.Retrieve` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PageNumber",
            "in": "query",
            "description": "Page number (1-based, default 1)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "PageSize",
            "in": "query",
            "description": "Records per page (default 20, max 100)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "SigningSessionId",
            "in": "query",
            "description": "Limit the activities to a single signing session (GUID). Omit for file-wide activities.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "DateFrom",
            "in": "query",
            "description": "Only activities on/after this date (ISO 8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "DateTo",
            "in": "query",
            "description": "Only activities on/before this date (ISO 8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "SortColumn",
            "in": "query",
            "description": "Sort column: occurredAt (default), actorName, description",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "SortDirection",
            "in": "query",
            "description": "Sort direction: asc or desc (default desc — newest first)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Activities retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetFileActivitiesResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The file does not exist in the caller's organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get-v1-files-fileid-activities",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Files.Retrieve"
            ]
          }
        ]
      }
    },
    "/v1/files/{fileId}/teams": {
      "put": {
        "tags": [
          "Files"
        ],
        "summary": "Replace the teams a file is shared with",
        "description": "Requires the `Teams.ShareFiles` scope and, as in the web portal, sharing rights on the file\r\n(file owner, a manager of a team the file is shared with, or an org admin).\r\nThe list replaces the current teams: teams not in the list are removed and new teams are added.\r\nSend `\"teamIds\": []` to stop sharing the file with any team. Every team must be an active\r\nteam of the caller's organization (see GET /v1/teams).",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ManageFileTeamsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File teams updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManageFileTeamsResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Validation failed, or a team is not an active team of the organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The sender cannot change the sharing of this file, or the token lacks Teams.ShareFiles",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "The file does not exist in the caller's organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "The file is archived and read-only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "put-v1-files-fileid-teams",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Teams.ShareFiles"
            ]
          }
        ]
      }
    },
    "/health": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "Liveness probe - is the service running?",
        "responses": {
          "200": {
            "description": "Service is alive",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "operationId": "get-health",
        "security": []
      }
    },
    "/health/user/liveness": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "User gRPC service liveness probe - is the User service running?",
        "responses": {
          "200": {
            "description": "User service is alive",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "503": {
            "description": "User service is not alive",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        },
        "operationId": "get-health-user-liveness",
        "security": []
      }
    },
    "/health/user/ready": {
      "get": {
        "tags": [
          "Health"
        ],
        "summary": "User gRPC service readiness probe - is the User service ready to accept requests?",
        "responses": {
          "200": {
            "description": "User service is ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserReadinessResponseDto"
                }
              }
            }
          },
          "503": {
            "description": "User service is not ready",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserReadinessResponseDto"
                }
              }
            }
          }
        },
        "operationId": "get-health-user-ready",
        "security": []
      }
    },
    "/v1/files/{fileId}/participants": {
      "get": {
        "tags": [
          "Participants"
        ],
        "summary": "Get the participants of a file",
        "description": "Example: GET /v1/files/{fileId}/participants\r\n            \r\nParticipants entered in SignersChoice with a single name field have empty first/last names and\r\nthe full name in `name`.\r\n            \r\nRequires the `Files.Retrieve` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "File ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Participants retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListParticipantsResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired access token, or invalid sender header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Sender cannot view this file (can_view), sender is not allowed, or the token does not have the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Participants could not be retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get-v1-files-fileid-participants",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Files.Retrieve"
            ]
          }
        ]
      },
      "post": {
        "tags": [
          "Participants"
        ],
        "summary": "Add a participant to a file",
        "description": "Example: POST /v1/files/{fileId}/participants\r\n            \r\n    {\r\n      \"firstName\": \"Jane\",\r\n      \"lastName\": \"Smith\",\r\n      \"roleId\": 2,\r\n      \"typeId\": 1,\r\n      \"email\": \"jane@example.com\",\r\n      \"phone\": \"5559876543\",\r\n      \"hasSsn\": false\r\n    }\r\n            \r\nRequires the `Participants.Add` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "File ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Participant details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ParticipantRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Participant added",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AddParticipantResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid participant details (VALIDATION_ERROR)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired access token, or invalid sender header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Sender cannot edit this file (can_edit), sender is not allowed, or the token does not have the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "File not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "File is archived and read-only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Participant could not be added",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "post-v1-files-fileid-participants",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Participants.Add"
            ]
          }
        ]
      }
    },
    "/v1/files/{fileId}/participants/{participantId}": {
      "put": {
        "tags": [
          "Participants"
        ],
        "summary": "Update a participant of a file",
        "description": "Example: PUT /v1/files/{fileId}/participants/{participantId}\r\n            \r\nRequires the `Participants.Update` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "File ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "participantId",
            "in": "path",
            "description": "Participant ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Participant details",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ParticipantRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Participant updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParticipantActionResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Invalid participant details (VALIDATION_ERROR)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired access token, or invalid sender header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Sender cannot edit this file (can_edit), sender is not allowed, or the token does not have the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "File or participant not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "File is archived and read-only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Participant could not be updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "put-v1-files-fileid-participants-participantid",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Participants.Update"
            ]
          }
        ]
      },
      "delete": {
        "tags": [
          "Participants"
        ],
        "summary": "Remove a participant from a file",
        "description": "Example: DELETE /v1/files/{fileId}/participants/{participantId}\r\n            \r\nRequires the `Participants.Remove` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "description": "File ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "participantId",
            "in": "path",
            "description": "Participant ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Participant removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ParticipantActionResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired access token, or invalid sender header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Sender cannot edit this file (can_edit), sender is not allowed, or the token does not have the required scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "File or participant not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "File is archived and read-only",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Participant could not be removed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "delete-v1-files-fileid-participants-participantid",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Participants.Remove"
            ]
          }
        ]
      }
    },
    "/v1/teams": {
      "get": {
        "tags": [
          "Teams"
        ],
        "summary": "List the active teams of the caller's organization",
        "description": "Requires the `Teams.List` scope.",
        "responses": {
          "200": {
            "description": "Teams retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListTeamsResponseDto"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid access token or sender",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Sender is not allowed, or the token does not have the Teams.List scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Teams could not be retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get-v1-teams",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Teams.List"
            ]
          }
        ],
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ]
      }
    },
    "/v1/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Search the active users of the caller's organization by name or email",
        "description": "The search is case-insensitive and matches part of the first name, last name,\r\nfull name (\"First Last\") or email. Only users who are active in the organization are returned.\r\n            \r\nExample: GET /v1/users?search=jane\r\n            \r\nRequires the `Users.Search` scope.",
        "parameters": [
          {
            "name": "X-Sender-Id",
            "in": "header",
            "required": true,
            "description": "ID of the user the request is made on behalf of (see `GET /v1/users`). The user must be an active member of the organization in your access token; the request is attributed to this user and is subject to their permissions.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Text to search for in the user's first name, last name, full name or email (case-insensitive, partial match)",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Users retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListUsersResponseDto"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid search text (VALIDATION_ERROR)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or expired access token, or invalid sender header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Sender is not allowed, or the token does not have the Users.Search scope",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "503": {
            "description": "Users could not be retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "get-v1-users",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "clientCredentials": [
              "Users.Search"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "AddParticipantResponseDto": {
        "type": "object",
        "properties": {
          "participant": {
            "$ref": "#/components/schemas/ParticipantIdDto"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for adding a participant to a file"
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "The HTTP status code (same value as the response status code).",
            "format": "int32"
          },
          "code": {
            "type": "string",
            "description": "Stable, machine-readable error code (UPPER_SNAKE_CASE), e.g. VALIDATION_ERROR, TOKEN_EXPIRED,\r\nINSUFFICIENT_SCOPE, SENDER_INACTIVE, NOT_FOUND. Integrations should branch on this value.",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Human-readable, user-friendly description of the error.",
            "nullable": true
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiErrorDetail"
            },
            "description": "Field level errors (validation). Omitted when there are none.",
            "nullable": true
          },
          "traceId": {
            "type": "string",
            "description": "Identifier of the request. Quote it when contacting support so the request can be found in the logs.",
            "nullable": true
          },
          "timestamp": {
            "type": "string",
            "description": "When the error occurred (UTC, ISO 8601).",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Describes what went wrong."
      },
      "ApiErrorDetail": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "description": "The request field (as named in the JSON body / query string) the error refers to.\r\nOmitted when the error is not tied to a single field (e.g. malformed request body).",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "What is wrong with the field.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A single field level error."
      },
      "ApiErrorResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Always false for an error response."
          },
          "error": {
            "$ref": "#/components/schemas/ApiError"
          }
        },
        "additionalProperties": false,
        "description": "The single error format returned by EVERY Public API endpoint (including the token endpoint)\r\nfor every non-success status code (4xx and 5xx).\r\n\r\n\r\nExample:\r\n```\r\n{\r\n  \"success\": false,\r\n  \"error\": {\r\n    \"status\": 400,\r\n    \"code\": \"VALIDATION_ERROR\",\r\n    \"message\": \"One or more fields are invalid. See 'details' for more information.\",\r\n    \"details\": [ { \"field\": \"search\", \"message\": \"The 'search' query parameter is required\" } ],\r\n    \"traceId\": \"00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01\",\r\n    \"timestamp\": \"2026-11-05T09:00:00Z\"\r\n  }\r\n}\r\n```\r\nNever put exception messages, stack traces, secrets, host names or other implementation details in it.\r\nBuild instances through SignersChoice.Public.Api.Errors.ApiErrors."
      },
      "CreateFileRequestDto": {
        "type": "object",
        "properties": {
          "fileNumber": {
            "type": "string",
            "description": "File number (required, max 50; letters, numbers, dashes, underscores and spaces)",
            "nullable": true
          },
          "loanPurposeId": {
            "type": "integer",
            "description": "Loan purpose ID (see GET /v1/reference/loan-purposes). Required unless the file is saved as a Draft.",
            "format": "int32",
            "nullable": true
          },
          "transactionTypeId": {
            "type": "integer",
            "description": "Transaction type ID. Optional; when omitted the loan purpose ID is used (same behaviour as the web portal).",
            "format": "int32",
            "nullable": true
          },
          "closingDate": {
            "type": "string",
            "description": "Expected closing date (ISO 8601, e.g. \"2025-07-01\" or \"2025-07-01T00:00:00Z\"). Required unless Draft; cannot be in the past.",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "description": "Client ID (optional, see GET /v1/reference/clients)",
            "format": "uuid",
            "nullable": true
          },
          "underwriterId": {
            "type": "string",
            "description": "Underwriter ID (optional, see GET /v1/reference/underwriters)",
            "format": "uuid",
            "nullable": true
          },
          "lenderId": {
            "type": "string",
            "description": "Lender ID (optional, see GET /v1/reference/lenders)",
            "format": "uuid",
            "nullable": true
          },
          "titleInsurance": {
            "type": "boolean",
            "description": "Whether the file has title insurance. Required (true/false) unless Draft.",
            "nullable": true
          },
          "texasCashOut": {
            "type": "boolean",
            "description": "Texas Cash Out refinance. Required when loanPurposeId = 2 (Refinance) and the property is in TX.\r\nWhen true, RON signings are not allowed on the file.",
            "nullable": true
          },
          "purchasePrice": {
            "type": "number",
            "description": "Purchase price (optional, >= 0)",
            "format": "double",
            "nullable": true
          },
          "loanAmount": {
            "type": "number",
            "description": "Loan amount (optional, >= 0)",
            "format": "double",
            "nullable": true
          },
          "statusId": {
            "type": "integer",
            "description": "File status ID. Defaults to 2 (Created). Use 1 to save a Draft, in which case only fileNumber is mandatory.",
            "format": "int32",
            "nullable": true
          },
          "property": {
            "$ref": "#/components/schemas/PropertyDto"
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileParticipantDto"
            },
            "description": "Participants to add to the file (optional)",
            "nullable": true
          },
          "teamIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Teams to share the file with (optional, see GET /v1/teams)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for POST /v1/files (Integration Guide 4.3.1).\r\n\r\n\r\nThe organization and the creating user are NEVER taken from the body: the organization comes from\r\nthe access token and the creating user from the validated `X-Sender-Id` header.\r\n"
      },
      "DeleteFileResponseDto": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "description": "The deleted file",
            "format": "uuid"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for DELETE /v1/files/{fileId} (4.3.6)"
      },
      "DocumentDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Document id (use it to rename or delete the document).",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "description": "Name shown in SignersChoice.",
            "nullable": true
          },
          "documentTypeId": {
            "type": "integer",
            "description": "Document type id.",
            "format": "int32"
          },
          "statusId": {
            "type": "integer",
            "description": "Document status id.",
            "format": "int32"
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentVersionInfoDto"
            },
            "description": "Active versions of the document (use documentVersionId to download).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A document of a file."
      },
      "DocumentInfoDto": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "description": "Name shown in SignersChoice (1-255 characters, no < > : \" | \\ / ? * or control characters).",
            "nullable": true
          },
          "documentTypeId": {
            "type": "integer",
            "description": "Document type id (1-12 general types, 13 = Underwriter Approval Letter).",
            "format": "int32"
          },
          "mimeType": {
            "type": "string",
            "description": "Optional MIME type. When omitted it is derived from the file extension.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Metadata for one uploaded file."
      },
      "DocumentVersionDto": {
        "type": "object",
        "properties": {
          "documentVersionId": {
            "type": "string",
            "description": "Document version ID (used by the Documents and Signings endpoints)",
            "format": "uuid"
          },
          "fileSize": {
            "type": "integer",
            "description": "Size in bytes",
            "format": "int64"
          },
          "mimeType": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A version of a file document"
      },
      "DocumentVersionInfoDto": {
        "type": "object",
        "properties": {
          "documentVersionId": {
            "type": "string",
            "description": "Document version id (use it to download the document).",
            "nullable": true
          },
          "mimeType": {
            "type": "string",
            "description": "MIME type of the stored content.",
            "nullable": true
          },
          "fileSize": {
            "type": "integer",
            "description": "Size of the stored content in bytes.",
            "format": "int64"
          },
          "createdAt": {
            "type": "string",
            "description": "When the version was created (ISO 8601).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A version of a document."
      },
      "DownloadDocumentItemDto": {
        "type": "object",
        "properties": {
          "documentVersionId": {
            "type": "string",
            "description": "Document version id, as returned by GET /v1/files/{fileId}/documents.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "One document version to download."
      },
      "DownloadDocumentsRequestDto": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DownloadDocumentItemDto"
            },
            "description": "The document versions to download (max 20).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Body for requesting download links: `{ \"documents\": [ { \"documentVersionId\": \"guid\" } ] }`"
      },
      "DownloadDocumentsResponseDto": {
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DownloadFileDto"
            },
            "description": "Download links, one per requested document version.",
            "nullable": true
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "POST /v1/files/{fileId}/documents/download"
      },
      "DownloadFileDto": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "description": "File name to save the document as (the document's display name).",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "description": "Content type of the document.",
            "nullable": true
          },
          "downloadUrl": {
            "type": "string",
            "description": "Short-lived (about 10 minutes), read-only download URL. Do not store it.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A download link for one document version."
      },
      "FailedUploadDto": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "description": "Position of the file in the request (0-based, same as documentsInfo[index]).",
            "format": "int32"
          },
          "fileName": {
            "type": "string",
            "description": "Name of the uploaded file.",
            "nullable": true
          },
          "error": {
            "type": "string",
            "description": "Reason the file could not be stored.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A file of an upload request that could not be stored."
      },
      "FileActionEligibilityResponseDto": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "description": "The file",
            "format": "uuid"
          },
          "canMarkComplete": {
            "type": "boolean",
            "description": "POST /transition with action \"complete\" is allowed"
          },
          "canCancel": {
            "type": "boolean",
            "description": "POST /transition with action \"cancel\" is allowed"
          },
          "canReopen": {
            "type": "boolean",
            "description": "POST /transition with action \"reopen\" is allowed"
          },
          "canRestore": {
            "type": "boolean",
            "description": "POST /transition with action \"restore\" is allowed"
          },
          "cancelBlockedReason": {
            "type": "string",
            "description": "Why cancel is not allowed (empty when allowed)",
            "nullable": true
          },
          "reopenBlockedReason": {
            "type": "string",
            "description": "Why reopen is not allowed (empty when allowed)",
            "nullable": true
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for GET /v1/files/{fileId}/action-eligibility (4.3.7)"
      },
      "FileActivityDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "activityTypeId": {
            "type": "integer",
            "format": "int32"
          },
          "activityTypeName": {
            "type": "string",
            "nullable": true
          },
          "activityCategory": {
            "type": "string",
            "description": "e.g. \"File\", \"Document\", \"Signing\", \"Participant\", \"RON\"",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "details": {
            "type": "string",
            "description": "Additional details (newline separated change lines)",
            "nullable": true
          },
          "occurredAt": {
            "type": "string",
            "description": "ISO 8601 UTC timestamp",
            "nullable": true
          },
          "isSystemGenerated": {
            "type": "boolean"
          },
          "userId": {
            "type": "string",
            "description": "Acting user ID (null for system)",
            "format": "uuid",
            "nullable": true
          },
          "actorName": {
            "type": "string",
            "description": "Acting user display name or \"System\"",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An entry of the file activity log"
      },
      "FileDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "File ID",
            "format": "uuid"
          },
          "fileNumber": {
            "type": "string",
            "description": "File number",
            "nullable": true
          },
          "statusId": {
            "type": "integer",
            "description": "File status ID (1 Draft, 2 Created, 3 Active, 4 Completed, 5 Cancelled)",
            "format": "int32"
          },
          "statusName": {
            "type": "string",
            "description": "File status name",
            "nullable": true
          },
          "transactionTypeId": {
            "type": "integer",
            "description": "Transaction type ID",
            "format": "int32",
            "nullable": true
          },
          "loanPurposeId": {
            "type": "integer",
            "description": "Loan purpose ID",
            "format": "int32",
            "nullable": true
          },
          "loanPurposeName": {
            "type": "string",
            "description": "Loan purpose name",
            "nullable": true
          },
          "closingDate": {
            "type": "string",
            "description": "Expected closing date (ISO 8601)",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "underwriterId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "underwriterName": {
            "type": "string",
            "nullable": true
          },
          "lenderId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "lenderName": {
            "type": "string",
            "nullable": true
          },
          "titleInsurance": {
            "type": "boolean",
            "nullable": true
          },
          "texasCashOut": {
            "type": "boolean",
            "nullable": true
          },
          "ronAllowed": {
            "type": "boolean",
            "description": "Whether RON signings can be created on this file (false for Texas Cash Out)",
            "nullable": true
          },
          "purchasePrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "loanAmount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "createdBy": {
            "type": "string",
            "description": "User who created the file",
            "format": "uuid",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "nullable": true
          },
          "properties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PropertyDetailDto"
            },
            "nullable": true
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileParticipantDetailDto"
            },
            "nullable": true
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileDocumentDto"
            },
            "nullable": true
          },
          "signingSessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SigningSessionSummaryDto"
            },
            "nullable": true
          },
          "fileTeams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileTeamDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Curated file details returned to Public API callers (create / retrieve / update).\r\nInternal fields (storage paths, document hashes, notary licence numbers, client tax IDs, ...)\r\nare deliberately not exposed."
      },
      "FileDocumentDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "File document ID",
            "format": "uuid"
          },
          "displayName": {
            "type": "string",
            "nullable": true
          },
          "originalFilename": {
            "type": "string",
            "nullable": true
          },
          "documentTypeId": {
            "type": "integer",
            "format": "int32"
          },
          "statusId": {
            "type": "integer",
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          },
          "versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentVersionDto"
            },
            "description": "Document versions (use documentVersionId when attaching documents to a signing)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Document summary returned in file responses (storage paths and hashes are not exposed)"
      },
      "FileParticipantDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "useSingleNameMode": {
            "type": "boolean"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "middleName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "typeId": {
            "type": "integer",
            "format": "int32"
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Phone as stored (US: national digits; other countries: E.164)",
            "nullable": true
          },
          "phoneE164": {
            "type": "string",
            "description": "SC-3560: E.164 phone, e.g. \"+12125551234\" (never includes the extension)",
            "nullable": true
          },
          "phoneCountryCode": {
            "type": "string",
            "description": "SC-3560: ISO country of the phone, e.g. \"US\", \"GB\"",
            "nullable": true
          },
          "phoneExtension": {
            "type": "string",
            "description": "SC-3560: phone extension (digits), if any",
            "nullable": true
          },
          "hasSsn": {
            "type": "boolean",
            "description": "Whether the participant has an SSN on file (null = not answered). The SSN itself is never exposed.",
            "nullable": true
          },
          "statusId": {
            "type": "integer",
            "format": "int32"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Participant details returned in file responses"
      },
      "FileParticipantDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Existing participant ID. Omit when creating. On update, supply it to modify an existing participant.",
            "format": "uuid",
            "nullable": true
          },
          "useSingleNameMode": {
            "type": "boolean",
            "description": "true = use `name` only; false (default) = use firstName / middleName / lastName"
          },
          "name": {
            "type": "string",
            "description": "Single name (2–100 chars). Required when useSingleNameMode is true.",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "description": "First name (2–50 chars). Required when useSingleNameMode is false.",
            "nullable": true
          },
          "middleName": {
            "type": "string",
            "description": "Middle name (optional, max 50 chars)",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Last name (2–50 chars). Required when useSingleNameMode is false.",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "description": "Participant role ID (see GET /v1/reference/participant-roles). 0 = no role.",
            "format": "int32"
          },
          "typeId": {
            "type": "integer",
            "description": "Participant type ID (see GET /v1/reference/participant-types). Required.",
            "format": "int32"
          },
          "email": {
            "type": "string",
            "description": "Email address (optional)",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Phone number (optional). Any format is accepted: \"(212) 555-1234\", \"2125551234\",\r\n\"+44 20 7946 0958\", \"+12125551234#204\" (extension after #, x or ext). Numbers without a\r\ncalling code are treated as US. Must be a valid number for its country.",
            "nullable": true
          },
          "hasSsn": {
            "type": "boolean",
            "description": "Whether the participant has an SSN on file. null = not answered.",
            "nullable": true
          },
          "isActive": {
            "type": "boolean",
            "description": "On update: set false to remove (soft delete) an existing participant. Defaults to true.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A participant supplied when creating or updating a file.\r\n\r\n\r\nUse `firstName`/`lastName` (and optional `middleName`) for a person, or set\r\n`useSingleNameMode = true` and supply `name` for an entity (e.g. a trust or company).\r\n"
      },
      "FileResponseDto": {
        "type": "object",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/FileDetailDto"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for POST /v1/files (4.3.1) and GET /v1/files/{fileId} (4.3.3)"
      },
      "FileSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fileNumber": {
            "type": "string",
            "nullable": true
          },
          "statusId": {
            "type": "integer",
            "description": "File status ID (1 Draft, 2 Created, 3 Active, 4 Completed, 5 Cancelled)",
            "format": "int32"
          },
          "statusName": {
            "type": "string",
            "nullable": true
          },
          "transactionTypeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "loanPurposeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "loanPurposeName": {
            "type": "string",
            "nullable": true
          },
          "closingDate": {
            "type": "string",
            "description": "Expected closing date (ISO 8601)",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "clientName": {
            "type": "string",
            "nullable": true
          },
          "propertyAddress": {
            "type": "string",
            "description": "Full address of the primary property",
            "nullable": true
          },
          "titleInsurance": {
            "type": "boolean",
            "nullable": true
          },
          "texasCashOut": {
            "type": "boolean",
            "nullable": true
          },
          "ronAllowed": {
            "type": "boolean",
            "nullable": true
          },
          "participantCount": {
            "type": "integer",
            "format": "int32"
          },
          "documentCount": {
            "type": "integer",
            "format": "int32"
          },
          "signingSessionCount": {
            "type": "integer",
            "format": "int32"
          },
          "createdBy": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "nullable": true
          },
          "fileTeams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileTeamDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Lightweight file row returned by GET /v1/files"
      },
      "FileTeamDto": {
        "type": "object",
        "properties": {
          "teamId": {
            "type": "string",
            "format": "uuid"
          },
          "teamName": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A team the file is shared with"
      },
      "FileTransitionRequestDto": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "description": "Lifecycle action: `complete` | `cancel` | `reopen` | `restore`.\r\nUse GET /v1/files/{fileId}/action-eligibility to find out which actions are currently allowed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for POST /v1/files/{fileId}/transition (Integration Guide 4.3.5)."
      },
      "FileTransitionResponseDto": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "Machine-readable reason when the transition was not applied (e.g. NotEligible, NotLifecycleManaged)",
            "nullable": true
          },
          "fileId": {
            "type": "string",
            "description": "The file",
            "format": "uuid"
          },
          "previousStatusId": {
            "type": "integer",
            "description": "Status before the transition",
            "format": "int32",
            "nullable": true
          },
          "newStatusId": {
            "type": "integer",
            "description": "Status after the transition",
            "format": "int32",
            "nullable": true
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for POST /v1/files/{fileId}/transition (4.3.5)"
      },
      "GetFileActivitiesResponseDto": {
        "type": "object",
        "properties": {
          "activities": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileActivityDto"
            },
            "description": "Activities on the requested page (newest first by default)",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "Total activities matching the filters",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "description": "Current page (1-based)",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "description": "Records per page",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages",
            "format": "int32"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for GET /v1/files/{fileId}/activities (4.3.8) — paginated activity log"
      },
      "ListDocumentsResponseDto": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentDto"
            },
            "description": "Active documents of the file.",
            "nullable": true
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "GET /v1/files/{fileId}/documents"
      },
      "ListFilesResponseDto": {
        "type": "object",
        "properties": {
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileSummaryDto"
            },
            "description": "Files on the requested page",
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "description": "Total files matching the filters (before pagination)",
            "format": "int32"
          },
          "page": {
            "type": "integer",
            "description": "Current page (1-based)",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "description": "Records per page",
            "format": "int32"
          },
          "totalPages": {
            "type": "integer",
            "description": "Total number of pages",
            "format": "int32"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for GET /v1/files (4.3.2) — paginated file list"
      },
      "ListParticipantsResponseDto": {
        "type": "object",
        "properties": {
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ParticipantDto"
            },
            "description": "Active participants of the file",
            "nullable": true
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for listing the participants of a file"
      },
      "ListTeamsResponseDto": {
        "type": "object",
        "properties": {
          "teams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeamDto"
            },
            "description": "Active teams",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "Number of teams returned",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Response for listing the active teams of the caller's organization"
      },
      "ListUsersResponseDto": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserDto"
            },
            "description": "Active users",
            "nullable": true
          },
          "total": {
            "type": "integer",
            "description": "Number of users returned",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Response for listing the active users of the caller's organization"
      },
      "ManageFileTeamsRequestDto": {
        "type": "object",
        "properties": {
          "teamIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Teams to share the file with (replaces the current list; empty removes all teams)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for PUT /v1/files/{fileId}/teams.\r\n\r\n\r\nReplaces the teams the file is shared with by the given list: teams not in the list are removed,\r\nnew teams are added. Send an empty list to stop sharing the file with any team.\r\nTeam IDs must be active teams of the caller's organization (see GET /v1/teams).\r\n"
      },
      "ManageFileTeamsResponseDto": {
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "description": "The file whose teams were updated",
            "format": "uuid"
          },
          "fileTeams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileTeamDto"
            },
            "description": "The teams the file is now shared with",
            "nullable": true
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for PUT /v1/files/{fileId}/teams"
      },
      "ParticipantActionResponseDto": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for participant update and remove operations"
      },
      "ParticipantDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Participant ID",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "description": "First name (empty for single-name participants)",
            "nullable": true
          },
          "middleName": {
            "type": "string",
            "description": "Middle name (optional)",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Last name (empty for single-name participants)",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Full name for participants entered with a single name field in SignersChoice.\r\nNull when the participant uses first/last name fields.",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "description": "Participant role ID",
            "format": "int32"
          },
          "typeId": {
            "type": "integer",
            "description": "Participant type ID",
            "format": "int32"
          },
          "email": {
            "type": "string",
            "description": "Email address",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Phone number",
            "nullable": true
          },
          "hasSsn": {
            "type": "boolean",
            "description": "Whether the participant has an SSN (null when not specified)",
            "nullable": true
          },
          "statusId": {
            "type": "integer",
            "description": "Participant status ID",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "A participant of a file"
      },
      "ParticipantIdDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Participant ID",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Identifier of a created participant"
      },
      "ParticipantRequestDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "description": "First name (required, 2–50 characters: letters, spaces, hyphens, apostrophes, periods)",
            "nullable": true
          },
          "middleName": {
            "type": "string",
            "description": "Middle name (optional, up to 50 characters)",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Last name (required, 2–50 characters: letters, spaces, hyphens, apostrophes, periods)",
            "nullable": true
          },
          "roleId": {
            "type": "integer",
            "description": "Participant role ID (optional; 0 = no role)",
            "format": "int32"
          },
          "typeId": {
            "type": "integer",
            "description": "Participant type ID (required)",
            "format": "int32"
          },
          "email": {
            "type": "string",
            "description": "Email address (optional; must be valid when provided)",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Phone number (required; 10 digits, formatting such as (555) 123-4567 is accepted and stored as digits)",
            "nullable": true
          },
          "hasSsn": {
            "type": "boolean",
            "description": "Whether the participant has an SSN (optional; null = not specified)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for adding (POST) or updating (PUT) a file participant"
      },
      "PropertyDetailDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "streetAddress": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "nullable": true
          },
          "county": {
            "type": "string",
            "nullable": true
          },
          "fullAddress": {
            "type": "string",
            "description": "Formatted single-line address",
            "nullable": true
          },
          "isPrimaryProperty": {
            "type": "boolean"
          }
        },
        "additionalProperties": false,
        "description": "Property details returned in file responses"
      },
      "PropertyDto": {
        "type": "object",
        "properties": {
          "streetAddress": {
            "type": "string",
            "description": "Street address. Letters, numbers, spaces and - . / , only (max 200)",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "description": "Unit / apartment (optional, letters and numbers only)",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City (max 100)",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "2-letter US state abbreviation (e.g. \"TX\")",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "5-digit ZIP code",
            "nullable": true
          },
          "county": {
            "type": "string",
            "description": "County (optional, max 100)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Property (subject address) of a file. Used on create and update."
      },
      "SigningSessionSummaryDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Signing session ID",
            "format": "uuid"
          },
          "sessionName": {
            "type": "string",
            "nullable": true
          },
          "signingTypeId": {
            "type": "integer",
            "description": "1 = Mobile, 2 = RON",
            "format": "int32"
          },
          "statusId": {
            "type": "integer",
            "description": "1 Created, 2 Scheduled, 3 InProgress, 4 Completed, 5 Cancelled, 6 ReadyToClose, 7 DidNotSign",
            "format": "int32"
          },
          "scheduledDate": {
            "type": "string",
            "nullable": true
          },
          "scheduledTime": {
            "type": "string",
            "nullable": true
          },
          "documentPackageTypeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "documentPackageTypeName": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "nullable": true
          },
          "updatedAt": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Signing session summary returned in file responses (full signing details come from the Signings endpoints)"
      },
      "TeamDto": {
        "type": "object",
        "properties": {
          "teamId": {
            "type": "string",
            "description": "Team ID",
            "nullable": true
          },
          "teamName": {
            "type": "string",
            "description": "Team name",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An active team of the caller's organization"
      },
      "TokenRequestDto": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string",
            "description": "The API client ID",
            "nullable": true
          },
          "client_secret": {
            "type": "string",
            "description": "The API client secret",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Token request DTO for client credentials authentication"
      },
      "TokenResponseDto": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string",
            "description": "The access token",
            "nullable": true
          },
          "token_type": {
            "type": "string",
            "description": "The token type - always \"Bearer\"",
            "nullable": true
          },
          "expires_in": {
            "type": "integer",
            "description": "Token expiration in seconds",
            "format": "int32"
          },
          "scope": {
            "type": "string",
            "description": "Granted scopes (space-separated)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Token response DTO following OAuth 2.0 specification"
      },
      "UpdateFileRequestDto": {
        "type": "object",
        "properties": {
          "fileNumber": {
            "type": "string",
            "description": "File number (max 50; letters, numbers, dashes, underscores and spaces)",
            "nullable": true
          },
          "loanPurposeId": {
            "type": "integer",
            "description": "Loan purpose ID",
            "format": "int32",
            "nullable": true
          },
          "transactionTypeId": {
            "type": "integer",
            "description": "Transaction type ID. When omitted and loanPurposeId is supplied, the loan purpose ID is used.",
            "format": "int32",
            "nullable": true
          },
          "closingDate": {
            "type": "string",
            "description": "Expected closing date (ISO 8601). Cannot be in the past.",
            "nullable": true
          },
          "clientId": {
            "type": "string",
            "description": "Client ID",
            "format": "uuid",
            "nullable": true
          },
          "underwriterId": {
            "type": "string",
            "description": "Underwriter ID",
            "format": "uuid",
            "nullable": true
          },
          "lenderId": {
            "type": "string",
            "description": "Lender ID",
            "format": "uuid",
            "nullable": true
          },
          "titleInsurance": {
            "type": "boolean",
            "description": "Title insurance. Omit to leave unchanged.",
            "nullable": true
          },
          "texasCashOut": {
            "type": "boolean",
            "description": "Texas Cash Out. Omit to leave unchanged.",
            "nullable": true
          },
          "purchasePrice": {
            "type": "number",
            "description": "Purchase price (>= 0)",
            "format": "double",
            "nullable": true
          },
          "loanAmount": {
            "type": "number",
            "description": "Loan amount (>= 0)",
            "format": "double",
            "nullable": true
          },
          "statusId": {
            "type": "integer",
            "description": "File status ID (e.g. move a Draft (1) to Created (2))",
            "format": "int32",
            "nullable": true
          },
          "property": {
            "$ref": "#/components/schemas/PropertyDto"
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileParticipantDto"
            },
            "description": "Participants. Entries with an `id` update the existing participant; entries without an id are added;\r\nset `isActive = false` on an existing participant to remove it.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for PUT /v1/files/{fileId} (Integration Guide 4.3.4).\r\nAll fields are optional; only supplied fields are changed. At least one field must be supplied."
      },
      "UpdateFileResponseDto": {
        "type": "object",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/FileDetailDto"
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response for PUT /v1/files/{fileId} (4.3.4)"
      },
      "UploadDocumentsResponseDto": {
        "type": "object",
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UploadedDocumentDto"
            },
            "description": "Documents that were created.",
            "nullable": true
          },
          "failed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FailedUploadDto"
            },
            "description": "Files that could not be stored. Omitted when every file was uploaded.",
            "nullable": true
          },
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation was successful"
          },
          "message": {
            "type": "string",
            "description": "Error message if the operation failed",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "POST /v1/files/{fileId}/documents"
      },
      "UploadedDocumentDto": {
        "type": "object",
        "properties": {
          "fileDocumentId": {
            "type": "string",
            "description": "Id of the new document.",
            "nullable": true
          },
          "documentVersionId": {
            "type": "string",
            "description": "Id of the new document version (use it to download).",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "description": "Display name of the new document.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "A document created by an upload."
      },
      "UserDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "User ID (can be used as the X-Sender-Id header value)",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "description": "User's first name in the organization",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "User's last name in the organization",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "User's email address",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "User's status in the organization. Always \"Active\" in this response.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "An active user of the caller's organization"
      },
      "UserHealthChecksResponseDto": {
        "type": "object",
        "properties": {
          "sql": {
            "type": "string",
            "nullable": true
          },
          "serviceBus": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Health checks for readiness response"
      },
      "UserReadinessResponseDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          },
          "checks": {
            "$ref": "#/components/schemas/UserHealthChecksResponseDto"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Response model for User gRPC service readiness health check endpoint"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT access token issued by `POST /v1/auth/token`.\n\nSend it as `Authorization: Bearer <token>`."
      },
      "clientCredentials": {
        "type": "oauth2",
        "description": "OAuth2 client-credentials flow. Exchange the `client_id` and `client_secret` issued to your integration for a short-lived access token.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/v1/auth/token",
            "scopes": {
              "Users.Search": "Search users within your organization",
              "Users.RetrieveCurrent": "Retrieve current user information (reserved — no endpoint uses this yet)",
              "Teams.List": "List the teams of your organization",
              "Teams.ShareFiles": "Share files with teams",
              "Files.Create": "Create files",
              "Files.Retrieve": "Retrieve file details, activities and participants",
              "Files.List": "List and search files",
              "Files.Update": "Update files and change their status",
              "Files.Cancel": "Cancel and delete files",
              "Participants.Add": "Add participants to files",
              "Participants.Update": "Update participant details",
              "Participants.Remove": "Remove participants from files",
              "Participants.RetrieveSigningLinks": "Retrieve signing links for participants (reserved — no endpoint uses this yet)",
              "Participants.ResendInvitations": "Resend invitations to participants (reserved — no endpoint uses this yet)",
              "Documents.Upload": "Upload documents",
              "Documents.Download": "Download documents",
              "Documents.List": "List documents",
              "Documents.Associate": "Associate documents to signing sessions (reserved — no endpoint uses this yet)",
              "Signings.Create": "Create signing sessions (reserved — no endpoint uses this yet)",
              "Signings.Retrieve": "Retrieve signing session status and details (reserved — no endpoint uses this yet)",
              "Signings.Cancel": "Cancel signing sessions (reserved — no endpoint uses this yet)",
              "Signings.Schedule": "Schedule signing sessions (reserved — no endpoint uses this yet)",
              "Evidence.RetrieveAuditEvents": "Retrieve audit events (reserved — no endpoint uses this yet)",
              "Evidence.RetrievePackages": "Retrieve evidence packages (reserved — no endpoint uses this yet)"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Auth",
      "description": "Exchange client credentials for a short-lived JWT access token. Every request to a resource endpoint must carry that token in an `Authorization: Bearer` header, plus the `X-Sender-Id` header identifying the user the call is made on behalf of.",
      "x-displayName": "Authentication"
    },
    {
      "name": "Teams",
      "description": "The active teams of the organization in your access token. Use the team IDs returned here to share files with teams.",
      "x-displayName": "Teams"
    },
    {
      "name": "Users",
      "description": "Search the active users of the organization in your access token. A user ID is what you send in the `X-Sender-Id` header.",
      "x-displayName": "Users"
    },
    {
      "name": "Files",
      "description": "A file is a transaction: its property, participants, documents, signings and the teams it is shared with. Every file endpoint is scoped to the organization in your access token and applies the same per-file permissions as the SignersChoice web portal. A file of another organization is reported as `404 Not Found`.",
      "x-displayName": "Files"
    },
    {
      "name": "Participants",
      "description": "The people taking part in a file — borrowers, sellers, agents and so on. Adding, updating and removing participants requires edit rights on the file.",
      "x-displayName": "Participants"
    },
    {
      "name": "Documents",
      "description": "Upload documents to a file, list them, and get short-lived download links. Uploads use `multipart/form-data`.",
      "x-displayName": "Documents"
    },
    {
      "name": "Health",
      "description": "Unauthenticated probes reporting whether the API and its upstream dependencies are reachable. Intended for monitoring rather than day-to-day integration.",
      "x-displayName": "Service health"
    }
  ],
  "servers": [
    {
      "url": "https://publicapi.dev.signerschoice.com",
      "description": "Development"
    },
    {
      "url": "https://publicapi.qa.signerschoice.com",
      "description": "QA"
    },
    {
      "url": "https://publicapi.uat.signerschoice.com",
      "description": "UAT"
    },
    {
      "url": "https://publicapi.signerschoice.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
