{
  "openapi": "3.1.1",
  "info": {
    "title": "DocJacket API",
    "description": "The DocJacket integration API. One `/api/v1` surface, capability-scoped by credential:\n\n- **Org API key** (`mcp_at_…`) — acts within a single organization. Mint one in DocJacket under **Settings → Advanced → API & AI Access**. Key scopes: `read` (GETs), `draft` (low-risk writes like completing a task), `actions` (side-effect writes like sending email).\n- **Reseller API key** (`rsk_…`) — cross-tenant provisioning for white-label partners.\n\nSend the key as a bearer token: `Authorization: Bearer <key>`.\n\nErrors use one envelope: `{ \"error\": { \"code\", \"message\", \"fields\"? } }`. Cross-tenant lookups return `404` (never disclosing existence).\n\n**Rate limits.** Per key, per minute, in a fixed window: **300 reads** (GET) and **60 writes** (POST/PUT/PATCH/DELETE). Exceeding a bucket returns `429` with a `Retry-After: 60` header and the standard error envelope (`code: \"rate_limited\"`); retry after the window resets.\n\n**Versioning & deprecation.** The API is **additive by default** — new fields and operations may appear at any time, so clients **must ignore unknown response fields** and not depend on property order. Changes that would break an existing client (removing/renaming a field, tightening a type, changing an error contract) ship only as a **new major version** at a new path (`/api/v2`); `/api/v1` is not broken in place. When a version is deprecated it remains available for at least **6 months** after the successor ships, and the retirement is announced in the release notes. Idempotency-Key is honored on side-effecting writes so retries are safe.\n\nStart with `GET /api/v1/health` (verifies your key), then `GET /api/v1/catalog` (lists every operation and whether your key can call it) and `GET /api/v1/usage` (your key's call volume, top operations, and error rate). The same key also works with AI agents via the DocJacket MCP server at `https://mcp.docjacket.com/mcp`.\n\n**Prefer reading over clicking?** Every operation is also listed on one statically rendered page — no JavaScript required, crawlable and quotable — at [help.docjacket.com/docs/api/reference](https://help.docjacket.com/docs/api/reference), alongside guides for [authentication, requests, webhooks, and the partner tier](https://help.docjacket.com/docs/api). The machine-readable spec is at [api.docjacket.com/openapi.json](https://api.docjacket.com/openapi.json).",
    "contact": {
      "name": "DocJacket API support",
      "url": "https://help.docjacket.com/docs/api",
      "email": "support@docjacket.com"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api.docjacket.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/v1/orgs": {
      "get": {
        "tags": [
          "Organizations (Partner)"
        ],
        "summary": "List your customer organizations",
        "description": "**Requires a partner key** (`Authorization: Bearer rsk_…`), not an organization key. Scoped to the organizations your partner account owns — one you do not own returns `404`, never `403`, so ownership is never disclosed. Never infer access to a tenant from an id obtained elsewhere.",
        "operationId": "ListOrgs",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "Organizations (Partner)"
        ],
        "summary": "Provision a customer organization",
        "description": "Creates a customer organization under your partner account with the given owner. Returns 409 when your account can't add customers right now, when the owner email already belongs to another organization, or when it belongs to one of your partner admin or coordinator logins.\n\n**Requires a partner key** (`Authorization: Bearer rsk_…`), not an organization key. Scoped to the organizations your partner account owns — one you do not own returns `404`, never `403`, so ownership is never disclosed. Never infer access to a tenant from an id obtained elsewhere.",
        "operationId": "CreateOrg",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrgRequest"
              },
              "example": {
                "name": "Peachtree Transaction Services",
                "owner": {
                  "email": "owner@example.com",
                  "firstName": "Jordan",
                  "lastName": "Rivera"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/orgs/{orgId}": {
      "get": {
        "tags": [
          "Organizations (Partner)"
        ],
        "summary": "Get a customer organization",
        "description": "**Requires a partner key** (`Authorization: Bearer rsk_…`), not an organization key. Scoped to the organizations your partner account owns — one you do not own returns `404`, never `403`, so ownership is never disclosed. Never infer access to a tenant from an id obtained elsewhere.",
        "operationId": "GetOrg",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/orgs/{orgId}/users": {
      "post": {
        "tags": [
          "Organizations (Partner)"
        ],
        "summary": "Invite a seat into an organization",
        "description": "Creates a pending invitation and returns a join URL on your brand's host (your verified custom domain, else your subdomain). Set `sendEmail` to true to also email the invitation. Returns 409 when the email is already a member, already has a pending invitation, or the organization's seat limit is reached.\n\n**Requires a partner key** (`Authorization: Bearer rsk_…`), not an organization key. Scoped to the organizations your partner account owns — one you do not own returns `404`, never `403`, so ownership is never disclosed. Never infer access to a tenant from an id obtained elsewhere.",
        "operationId": "AddSeat",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddSeatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/orgs/{orgId}/users/{userId}": {
      "delete": {
        "tags": [
          "Organizations (Partner)"
        ],
        "summary": "Remove a seat from an organization",
        "description": "**Requires a partner key** (`Authorization: Bearer rsk_…`), not an organization key. Scoped to the organizations your partner account owns — one you do not own returns `404`, never `403`, so ownership is never disclosed. Never infer access to a tenant from an id obtained elsewhere.",
        "operationId": "RemoveSeat",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/orgs/{orgId}/entitlements": {
      "get": {
        "tags": [
          "Organizations (Partner)"
        ],
        "summary": "Get an organization's plan, seats, and AI fair-use pool state",
        "description": "**Requires a partner key** (`Authorization: Bearer rsk_…`), not an organization key. Scoped to the organizations your partner account owns — one you do not own returns `404`, never `403`, so ownership is never disclosed. Never infer access to a tenant from an id obtained elsewhere.",
        "operationId": "GetOrgEntitlements",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/orgs/{orgId}/summary": {
      "get": {
        "tags": [
          "Organizations (Partner)"
        ],
        "summary": "Get an organization's activity summary (active deals, tasks due, last activity)",
        "description": "**Requires a partner key** (`Authorization: Bearer rsk_…`), not an organization key. Scoped to the organizations your partner account owns — one you do not own returns `404`, never `403`, so ownership is never disclosed. Never infer access to a tenant from an id obtained elsewhere.",
        "operationId": "GetOrgSummary",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        },
        "security": [
          {
            "PartnerApiKey": [ ]
          }
        ]
      }
    },
    "/api/v1/health": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "Check API key authentication and service health",
        "description": "**Requires the `read` scope.**",
        "operationId": "OrgHealth",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "ok": true,
                  "organizationId": "org-9fc8a1d2e3b4",
                  "scopes": [
                    "read",
                    "draft",
                    "actions"
                  ],
                  "databaseReachable": true,
                  "databaseError": null,
                  "apiVersion": "v1"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/catalog": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "List operations available to your API key",
        "description": "**Requires the `read` scope.**",
        "operationId": "OrgCatalog",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "operation": "list_transactions",
                      "method": "GET",
                      "path": "/api/v1/transactions",
                      "scope": "read",
                      "callable": true
                    },
                    {
                      "operation": "send_client_update",
                      "method": "POST",
                      "path": "/api/v1/transactions/{id}/emails/client-update",
                      "scope": "actions",
                      "callable": false
                    }
                  ],
                  "scopes": [
                    "read",
                    "draft"
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Get a transaction by ID",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetTransaction",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "List or search transactions",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListTransactions",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Apply a completed extraction — create a new transaction, or attach to an existing one via transactionId",
        "description": "**Requires the `actions` scope.**",
        "operationId": "ApplyExtraction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApplyExtractionRequest"
                  }
                ]
              },
              "example": {
                "extractionJobId": "6b1f9c4d-8e2a-4b7c-9f10-3d5a7e2c8b41",
                "transactionType": "Sale",
                "side": "Buyer",
                "overrides": {
                  "purchasePrice": 485000
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/contacts": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "List or search contacts",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListContacts",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 1
            }
          },
          {
            "name": "pageSize",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Create a contact",
        "description": "**Requires the `actions` scope.**",
        "operationId": "CreateContact",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreateContactRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/key-dates/upcoming": {
      "get": {
        "tags": [
          "Key Dates"
        ],
        "summary": "List upcoming key dates across active transactions",
        "description": "**Requires the `read` scope.**",
        "operationId": "UpcomingKeyDates",
        "parameters": [
          {
            "name": "horizonDays",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 14
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/key-dates": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "List key dates for a transaction",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetKeyDates",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Add key dates to a transaction (batch)",
        "description": "**Requires the `draft` scope.**",
        "operationId": "AddKeyDates",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AddKeyDatesRequest"
                  }
                ]
              },
              "example": {
                "keyDates": [
                  {
                    "keyDateType": "ClosingDate",
                    "dateValue": "2026-09-15T00:00:00Z",
                    "isCustom": false,
                    "label": null
                  },
                  {
                    "keyDateType": "InspectionDeadline",
                    "dateValue": "2026-08-22T00:00:00Z",
                    "isCustom": false,
                    "label": null
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/contacts/{contactId}": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Get a contact by ID",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetContact",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "activityLimit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/tasks": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "List open tasks",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListTasks",
        "parameters": [
          {
            "name": "transactionId",
            "in": "query",
            "schema": {
              "format": "uuid"
            }
          },
          {
            "name": "assignedTo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/tasks/{taskId}/complete": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Mark a task complete",
        "description": "Completes the task with the same side effects as the web app: dependent tasks re-date, key dates whose tasks are all done complete, workflow rules run and `task.completed` is published. DocJacket sends or holds the emails linked to the task itself; never send them again. With only the draft scope, every email a completion triggers waits in the user's Review queue for a person (heldFor: \"person\"). With the actions scope in an organization that lets an assistant release held email, they are held for your confirmation (heldFor: \"assistant\"). The completion emails this call triggers are held, not sent, and `completionEmailsHeld` is true with the actions scope in an organization that lets a connected assistant release held email (heldFor: \"assistant\") and, whatever the organization's setting, without the actions scope when the task has linked emails (heldFor: \"person\"): `heldEmails` lists their action ids (when it is empty, they appear in `GET /api/v1/emails/held` shortly). Never send them yourself. Show each with `GET /api/v1/emails/held/{actionId}`, release it with `POST /api/v1/emails/held/{actionId}/prepare-approval` and `POST /api/v1/emails/confirm`, or discard it. An email held for a person (heldFor: \"person\") carries the hold reason `person_must_approve`: no assistant can release it, and a team member approves it in DocJacket.\n\n**Requires the `draft` scope.**",
        "operationId": "CompleteTask",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CompleteTaskRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/activity": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Log an activity on a transaction",
        "description": "**Requires the `draft` scope.**",
        "operationId": "LogActivity",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/LogActivityRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/checklist": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Apply a checklist template to a transaction",
        "description": "**Requires the `draft` scope.**",
        "operationId": "ApplyChecklist",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApplyChecklistRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      },
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Get aggregate checklist status for a transaction",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetChecklistStatus",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/contact-roles": {
      "post": {
        "tags": [
          "Contacts"
        ],
        "summary": "Create a custom contact role",
        "description": "**Requires the `actions` scope.**",
        "operationId": "CreateContactRole",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreateContactRoleRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/email-templates": {
      "post": {
        "tags": [
          "Templates & Forms"
        ],
        "summary": "Create an email template",
        "description": "**Requires the `actions` scope.**",
        "operationId": "CreateEmailTemplate",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreateEmailTemplateRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      },
      "get": {
        "tags": [
          "Templates & Forms"
        ],
        "summary": "List email templates (org + system, active only)",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListEmailTemplates",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "audience",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stage",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "side",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/tasks/delete": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Delete tasks on one deal (kept 7 days for undo)",
        "description": "**Requires the `actions` scope.**",
        "operationId": "DeleteTasks",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DeleteTasksRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/transactions/resolve": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Resolve a property reference to ranked transaction matches",
        "description": "**Requires the `read` scope.**",
        "operationId": "ResolveTransactionByProperty",
        "parameters": [
          {
            "name": "property",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 3
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/contingencies": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "List open contingencies for a transaction",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListOpenContingencies",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/missing-documents": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "List documents missing against the purchase baseline",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetMissingDocuments",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/intake-status": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Get the intake-progress snapshot for a transaction",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetIntakeStatus",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/next-actions": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "Get the ranked next-actions feed (tasks + key dates)",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetNextActions",
        "parameters": [
          {
            "name": "transactionId",
            "in": "query",
            "schema": {
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/documents": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "List recently-uploaded documents with extraction state",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListDocuments",
        "parameters": [
          {
            "name": "transactionId",
            "in": "query",
            "schema": {
              "format": "uuid"
            }
          },
          {
            "name": "since",
            "in": "query",
            "schema": {
              "format": "date-time"
            }
          },
          {
            "name": "hasExtraction",
            "in": "query",
            "schema": { }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Upload a document (base64) and start extraction",
        "description": "**Requires the `actions` scope.**",
        "operationId": "UploadDocumentForExtraction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/UploadDocumentRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/documents/{documentId}/view-url": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get a short-lived presigned URL to view a document",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetDocumentViewUrl",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/extractions/{jobId}": {
      "get": {
        "tags": [
          "Extractions"
        ],
        "summary": "Get the state and results of an extraction job",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetExtractionResults",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/extractions/{jobId}/source-url": {
      "get": {
        "tags": [
          "Extractions"
        ],
        "summary": "Get a short-lived presigned URL to view an extraction's source PDF",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetExtractionSourceUrl",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/documents/classify": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Classify a document by filename and/or content preview",
        "description": "**Requires the `read` scope.**",
        "operationId": "ClassifyDocument",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ClassifyDocumentRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/notifications": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "List the signed-in user's notification inbox",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListNotifications",
        "parameters": [
          {
            "name": "unreadOnly",
            "in": "query",
            "schema": { }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/notifications/unread-count": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "Unread notification count for the signed-in user",
        "description": "**Requires the `read` scope.**",
        "operationId": "NotificationUnreadCount",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/conversations": {
      "get": {
        "tags": [
          "Messaging"
        ],
        "summary": "List the organization's message threads",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListConversations",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/conversations/{threadId}/messages": {
      "get": {
        "tags": [
          "Messaging"
        ],
        "summary": "List messages in a conversation thread",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListConversationMessages",
        "parameters": [
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Reply with an SMS in an existing conversation thread",
        "description": "**Requires the `actions` scope.**",
        "operationId": "SendConversationMessage",
        "parameters": [
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ReplyMessageRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/email-templates/{idOrSlug}": {
      "get": {
        "tags": [
          "Templates & Forms"
        ],
        "summary": "Get an email template by ID or slug",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetEmailTemplate",
        "parameters": [
          {
            "name": "idOrSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/merge-fields": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Get all merge field values for a transaction",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetMergeFields",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/render-template": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Render an email template against a transaction (preview-only)",
        "description": "**Requires the `read` scope.**",
        "operationId": "RenderEmailTemplate",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RenderTemplateRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/checklist-templates": {
      "get": {
        "tags": [
          "Templates & Forms"
        ],
        "summary": "List timeline/checklist templates (org + system)",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListChecklistTemplates",
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "side",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "transactionType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "complexity",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "activeOnly",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/form-links": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "List form links sent on a transaction",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListFormLinks",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/forms/{formId}": {
      "get": {
        "tags": [
          "Templates & Forms"
        ],
        "summary": "Get a form template with its field list",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetFormDefinition",
        "parameters": [
          {
            "name": "formId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/form-submissions": {
      "get": {
        "tags": [
          "Templates & Forms"
        ],
        "summary": "List form submissions (org-wide or per transaction)",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListFormSubmissions",
        "parameters": [
          {
            "name": "transactionId",
            "in": "query",
            "schema": {
              "format": "uuid"
            }
          },
          {
            "name": "formDefinitionId",
            "in": "query",
            "schema": {
              "format": "uuid"
            }
          },
          {
            "name": "formPurpose",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "pending_review"
            }
          },
          {
            "name": "since",
            "in": "query",
            "schema": {
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/form-submissions/{submissionId}": {
      "get": {
        "tags": [
          "Templates & Forms"
        ],
        "summary": "Get field-level detail for a form submission",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetFormSubmission",
        "parameters": [
          {
            "name": "submissionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/portal-link": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Get the active client-portal link for a transaction",
        "description": "Returns the deal's client portal link: the newest active, unexpired Buyer/Seller link not tied to one recipient, plus its iCal feed URL. Agent links and recipient-specific links are never returned. 404 not_found when the transaction has no such link.\n\n**Requires the `read` scope.**",
        "operationId": "GetPortalLink",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/disclosure-packages/{packageId}": {
      "get": {
        "tags": [
          "Disclosure Packages"
        ],
        "summary": "Get a disclosure package with items and recipients",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetDisclosurePackage",
        "parameters": [
          {
            "name": "packageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/disclosure-packages/{packageId}/activity": {
      "get": {
        "tags": [
          "Disclosure Packages"
        ],
        "summary": "Get the recipient-activity report for a disclosure package",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetDisclosureActivity",
        "parameters": [
          {
            "name": "packageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/contacts/search": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Fuzzy-search contacts by name, email, phone, or company",
        "description": "**Requires the `read` scope.**",
        "operationId": "SearchContacts",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contactType",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/contacts/by-email": {
      "get": {
        "tags": [
          "Contacts"
        ],
        "summary": "Find contacts by exact email, with their transactions",
        "description": "**Requires the `read` scope.**",
        "operationId": "FindContactByEmail",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/tasks": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Create a task on a transaction",
        "description": "**Requires the `draft` scope.**",
        "operationId": "CreateTask",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreateTaskRequest"
                  }
                ]
              },
              "example": {
                "title": "Order home inspection",
                "description": "Book the inspector and confirm access with the listing agent.",
                "dueDate": "2026-08-18T00:00:00Z",
                "priority": 4,
                "linkedMilestoneName": "InspectionDeadline",
                "assigneeUserId": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/key-dates/{keyDateType}": {
      "patch": {
        "tags": [
          "Transactions"
        ],
        "summary": "Update a key date on a transaction",
        "description": "**Requires the `draft` scope.**",
        "operationId": "UpdateKeyDate",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "keyDateType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/UpdateKeyDateRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/status-summary": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Save a status summary on a transaction",
        "description": "**Requires the `draft` scope.**",
        "operationId": "SaveStatusSummary",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/StatusSummaryRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/reminders": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Schedule a reminder on a transaction",
        "description": "**Requires the `actions` scope.**",
        "operationId": "CreateReminder",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreateReminderRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/tasks/{taskId}/reschedule": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Reschedule (postpone) a task's due date",
        "description": "**Requires the `draft` scope.**",
        "operationId": "RescheduleTask",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RescheduleTaskRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/tasks/{taskId}/assign": {
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Reassign a task to a team member",
        "description": "**Requires the `draft` scope.**",
        "operationId": "AssignTask",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AssignTaskRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/org/users": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "List the organization's assignable team members",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListOrgUsers",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/tasks/{taskId}/comments": {
      "get": {
        "tags": [
          "Tasks"
        ],
        "summary": "List a task's comment thread",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListTaskComments",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Tasks"
        ],
        "summary": "Add a comment to a task",
        "description": "**Requires the `draft` scope.**",
        "operationId": "CreateTaskComment",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreateTaskCommentRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/tasks/{taskId}/comments/{commentId}": {
      "delete": {
        "tags": [
          "Tasks"
        ],
        "summary": "Delete a task comment (author only)",
        "description": "**Requires the `draft` scope.**",
        "operationId": "DeleteTaskComment",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/contacts": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Link an existing contact to a transaction with a role",
        "description": "**Requires the `actions` scope.**",
        "operationId": "AddContactToTransaction",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/LinkContactRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/documents/upload-url": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Get a presigned PUT URL for a document upload",
        "description": "**Requires the `actions` scope.**",
        "operationId": "RequestUploadUrl",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/UploadUrlRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/extractions": {
      "post": {
        "tags": [
          "Extractions"
        ],
        "summary": "Start extraction from a presigned upload",
        "description": "**Requires the `actions` scope.**",
        "operationId": "KickOffExtraction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/KickOffExtractionRequest"
                  }
                ]
              },
              "example": {
                "uploadId": "d0f6b1a2-4c3e-4f1b-9a7d-2e5c8b0a1f34",
                "filename": "purchase-agreement.pdf",
                "state": "GA",
                "documentTypeHint": "PurchaseAgreement",
                "transactionId": null,
                "side": "Buyer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/documents/{documentId}/extract": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Start extraction for a document already in DocJacket",
        "description": "**Requires the `actions` scope.**",
        "operationId": "ExtractExistingDocument",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ExtractExistingRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/documents/{documentId}": {
      "patch": {
        "tags": [
          "Documents"
        ],
        "summary": "Rename or re-classify a document",
        "description": "**Requires the `draft` scope.**",
        "operationId": "UpdateDocument",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/UpdateDocumentRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      },
      "delete": {
        "tags": [
          "Documents"
        ],
        "summary": "Soft-delete a document",
        "description": "Available only in DocJacket's own apps. API keys and connected AI assistants get `403 client_not_allowed`.\n\n**Requires the `actions` scope.**",
        "operationId": "DeleteDocument",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/documents/types": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "List the canonical document-type vocabulary",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListDocumentTypes",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/documents/reorder": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Set the order of a transaction's documents",
        "description": "**Requires the `draft` scope.**",
        "operationId": "ReorderDocuments",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ReorderDocumentsRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/documents/{documentId}/versions": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Replace a document with a new uploaded version",
        "description": "**Requires the `draft` scope.**",
        "operationId": "ReplaceDocumentVersion",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ReplaceDocumentVersionRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/documents/{documentId}/split": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Split a multi-page PDF into separate documents",
        "description": "**Requires the `draft` scope.**",
        "operationId": "SplitDocument",
        "parameters": [
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SplitDocumentRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/draft-message": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Generate an AI message draft (never sends)",
        "description": "**Requires the `draft` scope.**",
        "operationId": "DraftMessage",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/MessageDraftRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/communications": {
      "get": {
        "tags": [
          "Messaging"
        ],
        "summary": "List every message for a transaction across channels (SMS + email + in-app)",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListCommunications",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/emails/client-update": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Prepare a status-update email to a deal party: review queue, or preview then confirm",
        "description": "**Requires the `actions` scope.**",
        "operationId": "SendClientUpdateEmail",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ClientUpdateEmailRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/emails/document-request": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Prepare a document-request email to a deal party: review queue, or preview then confirm",
        "description": "**Requires the `actions` scope.**",
        "operationId": "SendDocumentRequestEmail",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DocumentRequestEmailRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/emails/agent-followup": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Prepare a follow-up email to an agent or vendor: review queue, or preview then confirm",
        "description": "**Requires the `actions` scope.**",
        "operationId": "SendAgentFollowupEmail",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AgentFollowupEmailRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/emails/agent": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Prepare an email to an agent on the deal: review queue, or preview then confirm",
        "description": "**Requires the `actions` scope.**",
        "operationId": "SendEmailToAgent",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/AgentEmailRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/emails/confirm": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Send or discard a previewed email with its confirm code",
        "description": "**Requires the `actions` scope.**",
        "operationId": "ConfirmEmailSend",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ConfirmEmailRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/conversations": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Start a conversation by sending the first SMS on a deal",
        "description": "**Requires the `actions` scope.**",
        "operationId": "StartConversation",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/StartConversationRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/scheduled-messages": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Schedule an email to send later on a deal",
        "description": "**Requires the `actions` scope.**",
        "operationId": "ScheduleMessage",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ScheduleMessageRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      },
      "get": {
        "tags": [
          "Messaging"
        ],
        "summary": "List active scheduled messages on a deal",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListScheduledMessages",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/scheduled-messages/{messageId}": {
      "delete": {
        "tags": [
          "Messaging"
        ],
        "summary": "Cancel a pending scheduled message",
        "description": "**Requires the `actions` scope.**",
        "operationId": "CancelScheduledMessage",
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/messages": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Send an email on a deal (appears in the merged thread as channel=email)",
        "description": "**Requires the `actions` scope.**",
        "operationId": "SendMessage",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/SendEmailMessageRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/recipients": {
      "get": {
        "tags": [
          "Messaging"
        ],
        "summary": "List a deal's participants with role and per-channel availability",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListRecipients",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "channel",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/conversations/{threadId}/documents": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Share a document into an existing conversation via secure SMS link",
        "description": "**Requires the `actions` scope.**",
        "operationId": "ShareDocumentToConversation",
        "parameters": [
          {
            "name": "threadId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ShareToThreadRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/documents/{documentId}/share": {
      "post": {
        "tags": [
          "Transactions"
        ],
        "summary": "Share a document to a party on a deal via secure SMS link",
        "description": "**Requires the `actions` scope.**",
        "operationId": "ShareDocumentToParty",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ShareToPartyRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/disclosure-packages": {
      "post": {
        "tags": [
          "Disclosure Packages"
        ],
        "summary": "Create a disclosure package (optionally attach documents and activate)",
        "description": "**Requires the `actions` scope.**",
        "operationId": "CreateDisclosurePackage",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreatePackageRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/disclosure-packages/{packageId}/documents": {
      "put": {
        "tags": [
          "Disclosure Packages"
        ],
        "summary": "Replace a disclosure package's document list",
        "description": "**Requires the `actions` scope.**",
        "operationId": "UpdateDisclosurePackageDocuments",
        "parameters": [
          {
            "name": "packageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ReplaceDocumentsRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/disclosure-packages/{packageId}/activate": {
      "post": {
        "tags": [
          "Disclosure Packages"
        ],
        "summary": "Activate a disclosure package (idempotent)",
        "description": "**Requires the `actions` scope.**",
        "operationId": "ActivateDisclosurePackage",
        "parameters": [
          {
            "name": "packageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/disclosure-packages/{packageId}/recipients": {
      "post": {
        "tags": [
          "Disclosure Packages"
        ],
        "summary": "Invite a recipient to a disclosure package: the link only, or an email after preview and confirm",
        "description": "Without `email`, creates the recipient and its private share link and sends nothing: 201 with `recipient`, `shareToken`, `sharePath` and `sendOutcome` (`NotAttempted`). The raw `shareToken` is returned only this once. `Idempotency-Key` replays this response.\n\nWith `email`, the first call creates and sends nothing: 200 with `status: \"awaiting_confirmation\"`, `preview` (`to`, `displayLabel`, `audienceTier`, `expiresAt`, `subject` and the plain-text `body`, with the link shown as a placeholder), `expiresAt` and a single-use `confirmCode`. Show the user the preview; only if they approve, call this route again with `{ \"confirmCode\": \"djc_...\" }`. The confirm creates the recipient and emails the link, using exactly what was previewed (other fields in the body are ignored), and answers 201 with `status` (`sent`, or `not_sent` when the email could not go out), `recipient`, `shareToken`, `sharePath`, `sendOutcome` and `summary`. Repeating a used code answers 200 with `status` `already_sent` or `already_confirmed_not_sent` and no link. The code works once, for 30 minutes, for the same user and credential; a newer preview to the same address replaces it. The email cannot be recalled; revoking the recipient stops access. Any well-formed single address may be invited. Neither half is stored for `Idempotency-Key` replay.\n\nErrors use `{ error: { code, message, suggestedNextStep } }`: 404 `PACKAGE_NOT_FOUND`, `CONTACT_NOT_FOUND` or `CONFIRM_CODE_INVALID`; 403 `CONFIRM_CODE_NOT_YOURS`, `NOT_ALLOWED_TO_CONFIRM` or `CREDENTIAL_REQUIRED`; 410 `CONFIRM_CODE_EXPIRED`; 422 `VALIDATION_FAILED` or `PACKAGE_NOT_ACTIVE`; 409 `REVIEW_REQUIRED` (the organization reviews outgoing email before it is sent, so an email invite must be sent from DocJacket; the link-only call still works), `NO_CONNECTED_MAILBOX`, `CONTENT_CHANGED`, `SUPERSEDED` or `CONFIRM_IN_PROGRESS`. The email leaves only from the confirming person's own connected Gmail or Outlook, never DocJacket's mail service; with none, the confirm (or DocJacket's own app's one call) fails with `NO_CONNECTED_MAILBOX` and nothing is created. Before #7506 an email invite sent in one call; DocJacket's own apps still do.\n\n**Requires the `actions` scope.**",
        "operationId": "InviteDisclosureRecipient",
        "parameters": [
          {
            "name": "packageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "Optional. Send a unique value (max 200 characters — a UUID is ideal) to make this call safe to retry. The first request executes and its response is stored; an identical retry replays that stored response verbatim with an `Idempotency-Replayed: true` header instead of performing the side effect again. Reusing a key for a *different* operation is rejected with `422`.",
            "schema": {
              "maxLength": 200,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/InviteRecipientRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          }
        }
      }
    },
    "/api/v1/disclosure-packages/{packageId}/recipients/{recipientId}": {
      "delete": {
        "tags": [
          "Disclosure Packages"
        ],
        "summary": "Revoke a disclosure recipient's access (idempotent)",
        "description": "**Requires the `actions` scope.**",
        "operationId": "RevokeDisclosureRecipient",
        "parameters": [
          {
            "name": "packageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "recipientId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/account/deletion/status": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "Whether workspace deletion is scheduled, and whether the caller may act on it",
        "description": "Reports whether this workspace is scheduled for deletion, when the purge falls due, and how long the grace period is. Readable by any member with the read scope, because a pending deletion ends the workspace for all of them. The `isOwner` flag tells a client whether to offer the delete and export controls at all, so it can hide them rather than render a button that fails.\n\n**Requires the `read` scope.**",
        "operationId": "AccountDeletionStatus",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/account/deletion/request": {
      "post": {
        "tags": [
          "Organization"
        ],
        "summary": "Schedule this workspace for deletion after the grace period",
        "description": "Schedules the workspace for permanent deletion once the grace period elapses, freezes it, and emails a cancel link. Nothing is deleted at the time of the call. Owner only, and `confirmName` must equal the workspace name exactly — a mismatch returns 422 and schedules nothing. Available only in DocJacket's own apps. API keys and connected AI assistants get `403 client_not_allowed`.\n\n**Requires the `actions` scope.**",
        "operationId": "RequestAccountDeletion",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RequestAccountDeletionBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/account/deletion/cancel": {
      "post": {
        "tags": [
          "Organization"
        ],
        "summary": "Cancel a scheduled workspace deletion",
        "description": "Cancels a pending deletion and unfreezes the workspace — the in-app equivalent of the emailed cancel link, for an owner who is still signed in. Owner only. Returns `cancelled: false` when there was nothing scheduled.\n\n**Requires the `actions` scope.**",
        "operationId": "CancelAccountDeletion",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/account/export/latest": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "Status of the most recent workspace data export",
        "description": "Returns the most recent export for this workspace with its build progress, or `exists: false` if one has never been requested. A completed export whose artifact has passed its expiry reports as `expired`, since the file is gone. Owner only.\n\n**Requires the `read` scope.**",
        "operationId": "LatestAccountExport",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/account/export/request": {
      "post": {
        "tags": [
          "Organization"
        ],
        "summary": "Start building a full export of this workspace's data",
        "description": "Starts building a full archive of this workspace's data; the finished download arrives by email, so there is nothing to fetch from this response. Owner only. One export runs at a time — calling again while one is building returns that one with `alreadyRunning: true` rather than starting a second.\n\n**Requires the `actions` scope.**",
        "operationId": "RequestAccountExport",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/webhook-events": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List the webhook event types you can subscribe to",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListWebhookEvents",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List your webhook subscriptions",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListWebhooks",
        "parameters": [
          {
            "name": "includeInactive",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a webhook subscription",
        "description": "**Requires the `actions` scope.**",
        "operationId": "CreateWebhook",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/CreateWebhookApiRequest"
                  }
                ]
              },
              "example": {
                "name": "Ops pipeline",
                "url": "https://example.com/hooks/docjacket",
                "events": [
                  "extraction.completed",
                  "key_date.updated",
                  "transaction.status_changed"
                ],
                "description": "Feeds our internal deal dashboard.",
                "headers": null
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/webhooks/{id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Get a webhook subscription by ID",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      },
      "put": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Update a webhook subscription",
        "description": "**Requires the `actions` scope.**",
        "operationId": "UpdateWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/UpdateWebhookApiRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete a webhook subscription",
        "description": "**Requires the `actions` scope.**",
        "operationId": "DeleteWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Send a test delivery to a webhook subscription",
        "description": "**Requires the `actions` scope.**",
        "operationId": "TestWebhook",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/regenerate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Rotate a webhook subscription's signing secret",
        "description": "**Requires the `actions` scope.**",
        "operationId": "RegenerateWebhookSecret",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/webhooks/{id}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List recent delivery attempts for a webhook subscription",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListWebhookDeliveries",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/usage": {
      "get": {
        "tags": [
          "Meta"
        ],
        "summary": "Get call-volume, daily breakdown, top operations, and error rate for your API key",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetUsage",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/devices/register": {
      "post": {
        "tags": [
          "Organization"
        ],
        "summary": "Register or refresh a mobile device for the authenticated user",
        "description": "**Requires the `actions` scope.**",
        "operationId": "RegisterDevice",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RegisterDeviceRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/transaction-statuses": {
      "get": {
        "tags": [
          "Organization"
        ],
        "summary": "List the organization's selectable transaction statuses",
        "description": "**Requires the `read` scope.**",
        "operationId": "ListTransactionStatuses",
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/status": {
      "patch": {
        "tags": [
          "Transactions"
        ],
        "summary": "Change a transaction's status (runs the same cascade as the web app)",
        "description": "**Requires the `actions` scope.**",
        "operationId": "ChangeTransactionStatus",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ChangeStatusRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/reports/communication-log": {
      "get": {
        "tags": [
          "Messaging"
        ],
        "summary": "Export a transaction's communication log (email + SMS) as a PDF, ZIP (with documents), or JSON",
        "description": "**Requires the `read` scope.**",
        "operationId": "ExportCommunicationLog",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "schema": {
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/transactions/{transactionId}/notes": {
      "patch": {
        "tags": [
          "Transactions"
        ],
        "summary": "Set or clear a transaction's general notes",
        "description": "**Requires the `draft` scope.**",
        "operationId": "UpdateTransactionNotes",
        "parameters": [
          {
            "name": "transactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/UpdateNotesRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/proposals": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "List pending AI proposals for the organization",
        "description": "The organization's AI proposals, newest first. Filter with `status`, `transactionId` and `type` (an exact proposal type, for example `email_draft`); page with `limit` (1 to 100) and `offset`. For held emails with their hold reasons, `GET /api/v1/emails/held` is the richer read.\n\n**Requires the `read` scope.**",
        "operationId": "ListProposals",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "transactionId",
            "in": "query",
            "schema": {
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "format": "int32"
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/proposals/{id}": {
      "get": {
        "tags": [
          "Proposals"
        ],
        "summary": "Get one AI proposal with its evidence",
        "description": "**Requires the `read` scope.**",
        "operationId": "GetProposal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/proposals/{id}/approve": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "summary": "Approve an AI proposal",
        "description": "Approves one proposal. A create_transaction_from_email proposal creates a deal, so it requires a JSON body { side, createDuplicate?, fileAsHistorical? } where side is 'Buyer', 'Seller' or 'NotSure'. Without side it answers 409 side_required. If a live deal already exists at the address it answers 409 duplicate_deal with existingDeal { id, address, status }; repeat the call with createDuplicate: true only if a second deal is intended. An invalid side answers 422. Every other proposal type takes no body. Approving an email_draft or sms_consent_request proposal is available only to DocJacket's own apps; any other caller receives 403 client_not_allowed.\n\n**Requires the `actions` scope.**",
        "operationId": "ApproveProposal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ApproveProposalRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/proposals/{id}/reject": {
      "post": {
        "tags": [
          "Proposals"
        ],
        "summary": "Reject an AI proposal",
        "description": "Rejects one pending proposal so it never runs. For an `email_draft` (a held email, see `GET /api/v1/emails/held`) this discards the email exactly as dismissing it in DocJacket does: the email is never sent, and whatever was waiting behind it is stopped too (a Playbook task's automatic email is released, a scheduled email is cancelled, a reminder is suppressed). Rejecting never sends or approves anything. 422 when the proposal is no longer pending; 409 `conflict` when the scheduled email behind it is being sent at that moment, in which case nothing changed.\n\n**Requires the `actions` scope.**",
        "operationId": "RejectProposal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RejectProposalRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/proposals/{id}/payload": {
      "put": {
        "tags": [
          "Proposals"
        ],
        "summary": "Edit a proposal's proposed value before approving",
        "description": "**Requires the `actions` scope.**",
        "operationId": "EditProposalPayload",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/EditProposalPayloadRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    },
    "/api/v1/emails/held": {
      "get": {
        "tags": [
          "Messaging"
        ],
        "summary": "List the emails held in the review queue",
        "description": "Every email DocJacket is holding in the organization's review queue on a live deal, newest first: emails an assistant or API caller wrote, Playbook task emails, task-completion emails, reminders and scheduled emails that are waiting for a person instead of going out. Each item has `actionId`, `transactionId`, `source` (`agent`, `task_email`, `task_completion`, `reminder`, `scheduled` or `other`), `subject`, `to`, `cc`, `bcc`, `createdAt`, `expiresAt`, `requestedSendAt` and `holdReasons`: `{ code, message, blocking, fix }`, where `blocking: true` means the email cannot be approved until it is changed, except `person_must_approve`, which only a team member can approve, in DocJacket. Nothing listed here has been sent, and this call sends nothing. Filter with `transactionId`; page with `limit` (1 to 100, default 50) and `offset`. To discard one, call `POST /api/v1/proposals/{id}/reject` with its `actionId`.\n\n**Requires the `read` scope.**",
        "operationId": "ListHeldEmails",
        "parameters": [
          {
            "name": "transactionId",
            "in": "query",
            "schema": {
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "format": "int32"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/emails/held/{actionId}": {
      "get": {
        "tags": [
          "Messaging"
        ],
        "summary": "Get one review-queue email in full, with its state",
        "description": "One email from the organization's review queue: the same fields as the list, plus `preview` (the email exactly as it would send: `to`, `cc` and `bcc` with names, `subject`, `bodyHtml` with the signature, `bodyText`, `attachments` and any send time) and `state`: `held`, `approved`, `scheduled`, `sent`, `failed`, `discarded` or `expired`. `sent` means DocJacket handed the email to the connected mailbox or its outbox, not that it was delivered. Works on any email in the queue, held or not, so it also answers what became of an email. This call sends and changes nothing. 404 when the id is not an email in your organization.\n\n**Requires the `read` scope.**",
        "operationId": "GetHeldEmail",
        "parameters": [
          {
            "name": "actionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          }
        }
      }
    },
    "/api/v1/emails/held/{actionId}/prepare-approval": {
      "post": {
        "tags": [
          "Messaging"
        ],
        "summary": "Prepare the approval of a held email: preview and a one-time confirm code",
        "description": "Only in an organization that lets its connected assistant release held emails (set by DocJacket for API-partner customer organizations; every other organization gets 403 `NOT_ENABLED` and no code). For one held email whose hold reasons are all approvable, returns `status: \"awaiting_confirmation\"` with `preview` (the email exactly as it would send), `expiresAt` and a single-use `confirmCode`. Show the user the whole preview; only if they say yes, call `POST /api/v1/emails/confirm` with the code (`\"decision\": \"discard\"` discards it instead). The code works once, for 30 minutes, for the same user and credential, and only for exactly the email previewed; confirm checks the organization's setting and every hold reason again (409 `REVIEW_REQUIRED` or `HOLD_NOT_CLEARED`). When a hold reason blocks approval, the answer is `status: \"cannot_release\"` with `holdReasons` and no code; that includes `requested_send_time_passed` for an email whose requested send time has passed, which only DocJacket's web app can reschedule or send now, and `person_must_approve` for an email a task completion triggered when a connected assistant without the `actions` scope completed the task, which no assistant can release and a team member approves in DocJacket. This call prepares only: it never sends or approves an email. Errors: 403 `NOT_ENABLED`, `IMPERSONATED_SESSION` (an impersonating admin can never release an email) or `ROLE_CANNOT_APPROVE`; 404 when the id is not an email in your organization; 409 `NOT_HELD` when the email is no longer held.\n\n**Requires the `actions` scope.**",
        "operationId": "PrepareHeldEmailApproval",
        "parameters": [
          {
            "name": "actionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "422": {
            "$ref": "#/components/responses/ValidationError"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddKeyDatesRequest": {
        "required": [
          "keyDates"
        ],
        "type": "object",
        "properties": {
          "keyDates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/KeyDateInput"
            }
          }
        }
      },
      "AddSeatRequest": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "role": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendEmail": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "AgentEmailRequest": {
        "required": [
          "recipientContactId",
          "recipientRole",
          "intent",
          "subject",
          "bodyHtml"
        ],
        "type": "object",
        "properties": {
          "recipientContactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "recipientRole": {
            "type": [
              "null",
              "string"
            ]
          },
          "intent": {
            "type": [
              "null",
              "string"
            ]
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyPlainText": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendAt": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendAtTimezone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "AgentFollowupEmailRequest": {
        "required": [
          "recipientContactId",
          "recipientRole",
          "topic",
          "subject",
          "bodyHtml"
        ],
        "type": "object",
        "properties": {
          "recipientContactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "recipientRole": {
            "type": [
              "null",
              "string"
            ]
          },
          "topic": {
            "type": [
              "null",
              "string"
            ]
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyPlainText": {
            "type": [
              "null",
              "string"
            ]
          },
          "tone": {
            "type": [
              "null",
              "string"
            ]
          },
          "sourceContextSummary": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendAt": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendAtTimezone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApplyChecklistRequest": {
        "required": [
          "templateId"
        ],
        "type": "object",
        "properties": {
          "templateId": {
            "type": "string",
            "format": "uuid"
          },
          "replaceExisting": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "scope": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApplyExtractionRequest": {
        "required": [
          "extractionJobId"
        ],
        "type": "object",
        "properties": {
          "extractionJobId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "transactionType": {
            "type": [
              "null",
              "string"
            ]
          },
          "side": {
            "type": [
              "null",
              "string"
            ]
          },
          "overrides": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JsonElement"
              }
            ]
          },
          "transactionId": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ApproveProposalRequest": {
        "type": "object",
        "properties": {
          "side": {
            "type": [
              "null",
              "string"
            ]
          },
          "createDuplicate": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "fileAsHistorical": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "AssignTaskRequest": {
        "type": "object",
        "properties": {
          "assigneeUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "ChangeStatusRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClassifyDocumentRequest": {
        "type": "object",
        "properties": {
          "filename": {
            "type": [
              "null",
              "string"
            ]
          },
          "contentPreview": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ClientUpdateEmailRequest": {
        "required": [
          "recipientContactId",
          "audience",
          "focus",
          "subject",
          "bodyHtml"
        ],
        "type": "object",
        "properties": {
          "recipientContactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "audience": {
            "type": [
              "null",
              "string"
            ]
          },
          "focus": {
            "type": [
              "null",
              "string"
            ]
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyPlainText": {
            "type": [
              "null",
              "string"
            ]
          },
          "tone": {
            "type": [
              "null",
              "string"
            ]
          },
          "attachmentDocumentIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "sendAt": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendAtTimezone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CompleteTaskRequest": {
        "type": "object",
        "properties": {
          "completionNotes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ConfirmEmailRequest": {
        "required": [
          "confirmCode"
        ],
        "type": "object",
        "properties": {
          "confirmCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "decision": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateContactRequest": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "phone": {
            "type": [
              "null",
              "string"
            ]
          },
          "company": {
            "type": [
              "null",
              "string"
            ]
          },
          "licenseNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "contactType": {
            "type": [
              "null",
              "string"
            ]
          },
          "kind": {
            "type": [
              "null",
              "string"
            ]
          },
          "streetAddress": {
            "type": [
              "null",
              "string"
            ]
          },
          "city": {
            "type": [
              "null",
              "string"
            ]
          },
          "state": {
            "type": [
              "null",
              "string"
            ]
          },
          "zipCode": {
            "type": [
              "null",
              "string"
            ]
          },
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateContactRoleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "allowMultiple": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "maxInstances": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "partyKey": {
            "type": [
              "null",
              "string"
            ]
          },
          "ignoreSimilar": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "CreateEmailTemplateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "type": [
              "null",
              "string"
            ]
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "audience": {
            "type": [
              "null",
              "string"
            ]
          },
          "stage": {
            "type": [
              "null",
              "string"
            ]
          },
          "side": {
            "type": [
              "null",
              "string"
            ]
          },
          "tone": {
            "type": [
              "null",
              "string"
            ]
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "CreateOrgRequest": {
        "required": [
          "name",
          "owner"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/OwnerBody"
          }
        }
      },
      "CreatePackageRequest": {
        "type": "object",
        "properties": {
          "transactionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "coverMessage": {
            "type": [
              "null",
              "string"
            ]
          },
          "documentIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "allowDownloads": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "requireAck": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "CreateReminderRequest": {
        "type": "object",
        "properties": {
          "milestoneId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "deadlineType": {
            "type": [
              "null",
              "string"
            ]
          },
          "deadlineDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "daysBeforeReminder": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "recipientEmails": {
            "type": [
              "null",
              "string"
            ]
          },
          "recipientRoles": {
            "type": [
              "null",
              "string"
            ]
          },
          "emailTemplateId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "note": {
            "type": [
              "null",
              "string"
            ]
          },
          "reminderTimeOfDay": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "CreateTaskCommentRequest": {
        "required": [
          "content"
        ],
        "type": "object",
        "properties": {
          "content": {
            "type": "string"
          }
        }
      },
      "CreateTaskRequest": {
        "required": [
          "title"
        ],
        "type": "object",
        "properties": {
          "title": {
            "type": [
              "null",
              "string"
            ]
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "dueDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "priority": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          },
          "linkedMilestoneName": {
            "type": [
              "null",
              "string"
            ]
          },
          "assigneeUserId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateWebhookApiRequest": {
        "required": [
          "name",
          "url",
          "events"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          },
          "events": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "headers": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "DeleteTasksRequest": {
        "required": [
          "taskIds"
        ],
        "type": "object",
        "properties": {
          "taskIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "DocumentRequestEmailRequest": {
        "required": [
          "recipientContactId",
          "recipientRole",
          "documentTypes",
          "subject",
          "bodyHtml"
        ],
        "type": "object",
        "properties": {
          "recipientContactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "recipientRole": {
            "type": [
              "null",
              "string"
            ]
          },
          "documentTypes": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyHtml": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyPlainText": {
            "type": [
              "null",
              "string"
            ]
          },
          "tone": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendAt": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendAtTimezone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "EditProposalPayloadRequest": {
        "type": "object",
        "properties": {
          "parameters": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/JsonElement"
              }
            ]
          }
        }
      },
      "Error": {
        "title": "Error",
        "required": [
          "error"
        ],
        "type": "object",
        "properties": {
          "error": {
            "required": [
              "code",
              "message"
            ],
            "type": "object",
            "properties": {
              "code": {
                "enum": [
                  "unauthorized",
                  "insufficient_scope",
                  "client_not_allowed",
                  "not_found",
                  "validation_error",
                  "conflict",
                  "rate_limited"
                ],
                "type": "string",
                "description": "Stable machine-readable error code."
              },
              "message": {
                "type": "string",
                "description": "Human-readable explanation. Do not parse or match on this."
              },
              "fields": {
                "type": [
                  "null",
                  "object"
                ],
                "additionalProperties": {
                  "type": "string"
                },
                "description": "Present on `validation_error` only: per-field messages keyed by the offending request property."
              }
            }
          }
        },
        "description": "The single error envelope used by every `4xx`/`5xx` response on this API. Inspect `error.code` for branching — it is a stable machine-readable string; `error.message` is human-facing prose and may be reworded without notice."
      },
      "ExtractExistingRequest": {
        "type": "object",
        "properties": {
          "state": {
            "type": [
              "null",
              "string"
            ]
          },
          "documentTypeHint": {
            "type": [
              "null",
              "string"
            ]
          },
          "transactionIdOverride": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "side": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "InviteRecipientRequest": {
        "type": "object",
        "properties": {
          "displayLabel": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "contactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "audienceTier": {
            "type": [
              "null",
              "string"
            ]
          },
          "expiresAt": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "confirmCode": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "JsonElement": { },
      "KeyDateInput": {
        "required": [
          "keyDateType",
          "dateValue"
        ],
        "type": "object",
        "properties": {
          "keyDateType": {
            "type": [
              "null",
              "string"
            ]
          },
          "dateValue": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          },
          "isCustom": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "label": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "KickOffExtractionRequest": {
        "required": [
          "uploadId"
        ],
        "type": "object",
        "properties": {
          "uploadId": {
            "type": [
              "null",
              "string"
            ]
          },
          "filename": {
            "type": [
              "null",
              "string"
            ]
          },
          "state": {
            "type": [
              "null",
              "string"
            ]
          },
          "documentTypeHint": {
            "type": [
              "null",
              "string"
            ]
          },
          "transactionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "side": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "LinkContactRequest": {
        "type": "object",
        "properties": {
          "contactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "role": {
            "type": [
              "null",
              "string"
            ]
          },
          "isPrimary": {
            "type": [
              "null",
              "boolean"
            ]
          }
        }
      },
      "LogActivityRequest": {
        "required": [
          "type",
          "summary"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "details": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "MessageDraftRequest": {
        "required": [
          "intent"
        ],
        "type": "object",
        "properties": {
          "intent": {
            "type": "string"
          },
          "recipientRole": {
            "type": [
              "null",
              "string"
            ]
          },
          "recipientName": {
            "type": [
              "null",
              "string"
            ]
          },
          "additionalContext": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "OwnerBody": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string"
          },
          "firstName": {
            "type": [
              "null",
              "string"
            ]
          },
          "lastName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RegisterDeviceRequest": {
        "type": "object",
        "properties": {
          "installationId": {
            "type": [
              "null",
              "string"
            ]
          },
          "platform": {
            "type": [
              "null",
              "string"
            ]
          },
          "appVersion": {
            "type": [
              "null",
              "string"
            ]
          },
          "pushToken": {
            "type": [
              "null",
              "string"
            ]
          },
          "capabilities": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "permissions": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "RejectProposalRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RenderTemplateRequest": {
        "type": "object",
        "properties": {
          "templateId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "slug": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ReorderDocumentsRequest": {
        "type": "object",
        "properties": {
          "orderedDocumentIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ReplaceDocumentsRequest": {
        "type": "object",
        "properties": {
          "documentIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "ReplaceDocumentVersionRequest": {
        "type": "object",
        "properties": {
          "uploadId": {
            "type": [
              "null",
              "string"
            ]
          },
          "filename": {
            "type": [
              "null",
              "string"
            ]
          },
          "sizeBytes": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int64"
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ReplyMessageRequest": {
        "type": "object",
        "properties": {
          "messageContent": {
            "type": [
              "null",
              "string"
            ]
          },
          "forceOverride": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "RequestAccountDeletionBody": {
        "type": "object",
        "properties": {
          "confirmName": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RescheduleTaskRequest": {
        "type": "object",
        "properties": {
          "dueDate": {
            "type": [
              "null",
              "string"
            ],
            "format": "date-time"
          }
        }
      },
      "ScheduleMessageRequest": {
        "type": "object",
        "properties": {
          "toEmail": {
            "type": [
              "null",
              "string"
            ]
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "htmlBody": {
            "type": [
              "null",
              "string"
            ]
          },
          "ccAddresses": {
            "type": [
              "null",
              "string"
            ]
          },
          "bccAddresses": {
            "type": [
              "null",
              "string"
            ]
          },
          "fromAccountId": {
            "type": [
              "null",
              "string"
            ]
          },
          "scheduledAt": {
            "type": [
              "null",
              "string"
            ]
          },
          "scheduledTimezone": {
            "type": [
              "null",
              "string"
            ]
          },
          "documentIds": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "documentFileNames": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "attachments": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SendMessageAttachment"
            }
          }
        }
      },
      "SendEmailMessageRequest": {
        "type": "object",
        "properties": {
          "toEmail": {
            "type": [
              "null",
              "string"
            ]
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "body": {
            "type": [
              "null",
              "string"
            ]
          },
          "htmlBody": {
            "type": [
              "null",
              "string"
            ]
          },
          "ccAddresses": {
            "type": [
              "null",
              "string"
            ]
          },
          "bccAddresses": {
            "type": [
              "null",
              "string"
            ]
          },
          "fromAccountId": {
            "type": [
              "null",
              "string"
            ]
          },
          "templateId": {
            "type": [
              "null",
              "string"
            ]
          },
          "replyToMessageId": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendAt": {
            "type": [
              "null",
              "string"
            ]
          },
          "sendAtTimezone": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "SendMessageAttachment": {
        "required": [
          "fileName",
          "url"
        ],
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "ShareToPartyRequest": {
        "type": "object",
        "properties": {
          "toPhoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "contactId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "expirationHours": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          }
        }
      },
      "ShareToThreadRequest": {
        "type": "object",
        "properties": {
          "documentId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "message": {
            "type": [
              "null",
              "string"
            ]
          },
          "expirationHours": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          }
        }
      },
      "SplitDocumentRequest": {
        "type": "object",
        "properties": {
          "segments": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "$ref": "#/components/schemas/SplitSegment"
            }
          }
        }
      },
      "SplitSegment": {
        "type": "object",
        "properties": {
          "startPage": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "endPage": {
            "pattern": "^-?(?:0|[1-9]\\d*)$",
            "type": [
              "integer",
              "string"
            ],
            "format": "int32"
          },
          "documentType": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "StartConversationRequest": {
        "type": "object",
        "properties": {
          "toPhoneNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "messageContent": {
            "type": [
              "null",
              "string"
            ]
          },
          "contactId": {
            "type": [
              "null",
              "string"
            ]
          },
          "forceOverride": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "StatusSummaryRequest": {
        "type": "object",
        "properties": {
          "audience": {
            "type": [
              "null",
              "string"
            ]
          },
          "subject": {
            "type": [
              "null",
              "string"
            ]
          },
          "bodyMarkdown": {
            "type": [
              "null",
              "string"
            ]
          },
          "keyPointBullets": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateDocumentRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "category": {
            "type": [
              "null",
              "string"
            ]
          },
          "documentType": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateKeyDateRequest": {
        "type": "object",
        "properties": {
          "newValue": {
            "type": [
              "null",
              "string"
            ]
          },
          "source": {
            "type": [
              "null",
              "string"
            ]
          },
          "calculationNotes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateNotesRequest": {
        "type": "object",
        "properties": {
          "notes": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UpdateWebhookApiRequest": {
        "required": [
          "name",
          "url",
          "events"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": [
              "null",
              "string"
            ]
          },
          "url": {
            "type": [
              "null",
              "string"
            ]
          },
          "events": {
            "type": [
              "null",
              "array"
            ],
            "items": {
              "type": "string"
            }
          },
          "description": {
            "type": [
              "null",
              "string"
            ]
          },
          "headers": {
            "type": [
              "null",
              "object"
            ],
            "additionalProperties": {
              "type": "string"
            }
          },
          "isActive": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "circuitBreakerEnabled": {
            "type": [
              "null",
              "boolean"
            ]
          },
          "timeoutSeconds": {
            "type": [
              "null",
              "integer"
            ],
            "format": "int32"
          }
        }
      },
      "UploadDocumentRequest": {
        "required": [
          "fileBase64"
        ],
        "type": "object",
        "properties": {
          "fileBase64": {
            "type": [
              "null",
              "string"
            ]
          },
          "filename": {
            "type": [
              "null",
              "string"
            ]
          },
          "state": {
            "type": [
              "null",
              "string"
            ]
          },
          "documentTypeHint": {
            "type": [
              "null",
              "string"
            ]
          },
          "transactionId": {
            "type": [
              "null",
              "string"
            ],
            "format": "uuid"
          },
          "side": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "UploadUrlRequest": {
        "required": [
          "filename"
        ],
        "type": "object",
        "properties": {
          "filename": {
            "type": [
              "null",
              "string"
            ]
          },
          "contentType": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "WebhookEvent": {
        "title": "WebhookEvent",
        "required": [
          "eventType",
          "eventId",
          "timestamp",
          "organizationId",
          "data"
        ],
        "type": "object",
        "properties": {
          "eventType": {
            "enum": [
              "transaction.created",
              "transaction.status_changed",
              "transaction.closed",
              "transaction.archived",
              "transaction.deleted",
              "document.uploaded",
              "document.deleted",
              "task.created",
              "task.completed",
              "extraction.completed",
              "key_date.updated",
              "key_date.completed",
              "contact.created",
              "disclosure.recipient_viewed",
              "form.submission_received",
              "email.held",
              "email.approved",
              "email.scheduled",
              "email.discarded",
              "email.sent",
              "email.failed",
              "webhook.test"
            ],
            "type": "string",
            "description": "Which event this is — one of the types listed in this section."
          },
          "eventId": {
            "type": "string",
            "description": "Stable per-delivery id. Retries reuse it — deduplicate on this value.",
            "format": "uuid"
          },
          "timestamp": {
            "type": "string",
            "description": "UTC send time.",
            "format": "date-time"
          },
          "organizationId": {
            "type": "string",
            "description": "The organization the event belongs to. Always the organization that owns the subscription — a webhook never carries another tenant's data."
          },
          "userId": {
            "type": [
              "null",
              "string"
            ],
            "description": "The acting user, when the event was caused by a person rather than a job.",
            "format": "uuid"
          },
          "userName": {
            "type": [
              "null",
              "string"
            ],
            "description": "Display name of the acting user, when there is one."
          },
          "data": {
            "type": "object",
            "description": "Event-specific payload. Additive — ignore unrecognised fields."
          }
        },
        "description": "The envelope wrapping every webhook delivery. Identical across all event types."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "The `Authorization` header is missing, malformed, or the key has been revoked. Send `Authorization: Bearer <key>`. (`code: \"unauthorized\"`)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The key is valid but lacks the scope this operation requires, or it is the wrong credential tier — an organization key (`mcp_at_…`) on a partner route, or a partner key (`rsk_…`) anywhere else. (`code: \"insufficient_scope\"`) Sending an SMS, sharing a document by SMS, scheduling an email, or approving an email or text proposal from anything but DocJacket's own apps returns `code: \"client_not_allowed\"`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "NotFound": {
        "description": "No such resource **for this credential**. A record that exists but belongs to another organization also returns `404`, never `403` — existence is never disclosed across tenants. Do not treat `404` as evidence that an ID is unused. (`code: \"not_found\"`)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ValidationError": {
        "description": "The request was understood but a field failed validation; see `error.fields`. (`code: \"validation_error\"`)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Conflict": {
        "description": "The request conflicts with current state — for example reusing an `Idempotency-Key` with a different request body. (`code: \"conflict\"`)",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "Rate limit exceeded for this key. Buckets are per key, per minute, fixed window: **300 reads** (GET/HEAD) and **60 writes** (POST/PUT/PATCH/DELETE). Wait for the window named by `Retry-After`, then retry. (`code: \"rate_limited\"`)",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying. Always `60` — the fixed window length.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "securitySchemes": {
      "OrgApiKey": {
        "type": "http",
        "description": "Organization API key — `Authorization: Bearer mcp_at_…`\n\nMint one in DocJacket under **Settings → Advanced → API & AI Access**. The key acts within a single organization and carries one or more scopes:\n\n- `read` — GETs.\n- `draft` — low-risk writes: complete a task, log activity, apply a checklist, add key dates. Nothing in this tier deletes.\n- `actions` — side-effecting writes (sending email, deleting tasks, which are kept 7 days for undo, provisioning).\n\nEach operation below notes the scope it requires. `GET /api/v1/catalog` returns the same list with a `callable` flag computed against *your* key. The identical key also connects AI assistants over MCP at `https://mcp.docjacket.com/mcp`.",
        "scheme": "bearer"
      },
      "OAuth2": {
        "type": "oauth2",
        "description": "OAuth 2.1 access token — `Authorization: Bearer <access token>`\n\nReaches the same operations as an organization API key, with the same `read` / `draft` / `actions` scopes. Use it when your application acts for many users: register once, then each user authorizes their own DocJacket account and you hold a token per user. The organization is carried in the token's `org_id` claim — key your storage on it.\n\nAuthorization code + PKCE (`S256` only). Public client: there is no client secret. Register dynamically (RFC 7591) at `/oauth/register`, and read the endpoints from `/.well-known/oauth-authorization-server` rather than hardcoding them.\n\nAccess tokens last 1 hour; refresh tokens last 90 days and **rotate on every use**. Presenting an already-used refresh token is treated as a replay and revokes every live token for that user and client — store the new one before using it, and never retry a failed refresh with the old one. Membership is re-read on every call, so a user removed from the organization loses access immediately rather than at token expiry: treat `401` as \"reconnect this account\", not as a transient error.\n\nRevoke a refresh token on logout at `/oauth/revoke` (RFC 7009).",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://app.docjacket.com/oauth/authorize",
            "tokenUrl": "https://app.docjacket.com/oauth/token",
            "scopes": {
              "read": "Read transactions, key dates, tasks, documents, contacts, communications.",
              "draft": "Low-risk writes: complete a task, log activity, apply a checklist, add key dates. Nothing in this tier deletes.",
              "actions": "Side-effecting writes: send email or SMS, delete, share a document externally."
            }
          }
        }
      },
      "PartnerApiKey": {
        "type": "http",
        "description": "White-label partner key — `Authorization: Bearer rsk_…`\n\nCross-tenant credential for resellers, accepted only on the `/api/v1/orgs/*` operations (the **Organizations (Partner)** section). Organization API keys (`mcp_at_…`) are rejected there, and a partner key is rejected everywhere else. Requests for an organization the key does not own return `404` rather than `403`, so ownership is never disclosed.",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "OrgApiKey": [ ]
    },
    {
      "OAuth2": [ ]
    }
  ],
  "tags": [
    {
      "name": "Meta",
      "description": "Start here. Verify your key, discover the operations it can call, and see your own call volume."
    },
    {
      "name": "Transactions",
      "description": "The transaction record itself — create, list, read, and update deals, and manage the checklists, contingencies, notes, and reminders attached to them."
    },
    {
      "name": "Messaging",
      "description": "Email and messaging on a deal — send client updates and document requests, draft and schedule messages, and read the communication log."
    },
    {
      "name": "Key Dates",
      "description": "Deadlines across your book of business. Key dates for a single transaction live under Transactions."
    },
    {
      "name": "Tasks",
      "description": "Task lists on a deal — create, list, comment on, complete, and delete tasks."
    },
    {
      "name": "Documents",
      "description": "Files on a deal — request an upload URL, list and classify documents, share them, and manage versions."
    },
    {
      "name": "Extractions",
      "description": "AI contract extraction — kick off a run, poll results, and apply extracted fields to a transaction."
    },
    {
      "name": "Contacts",
      "description": "People and companies — search, create, and update contacts, and read the role vocabulary they are assigned to."
    },
    {
      "name": "Disclosure Packages",
      "description": "Seller disclosure packages — assemble documents, activate, invite and revoke recipients, and read access activity."
    },
    {
      "name": "Proposals",
      "description": "AI-generated proposals awaiting human review — list, inspect, approve, and reject."
    },
    {
      "name": "Templates & Forms",
      "description": "Reusable content — email templates, checklist templates, intake forms, and the submissions they produce."
    },
    {
      "name": "Webhooks",
      "description": "Push instead of poll — subscribe to events, manage subscriptions, and read the event catalog."
    },
    {
      "name": "Organization",
      "description": "Your own organization — settings, the transaction-status vocabulary, notifications, and registered devices."
    },
    {
      "name": "Organizations (Partner)",
      "description": "White-label partner tier. Provision and read the organizations in your book of business. Requires a partner key (rsk_…), not an organization key."
    }
  ],
  "webhooks": {
    "transaction.created": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a new transaction is created",
        "description": "Sent when: the `transaction.created` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.\n\n**Added to `deal`** (additive; nothing was renamed or removed): `agents[].phone`; the commission figures `commissionAmount`, `commissionRate`, `totalCommissionAmount`, `buyerAgentCommissionAmount`, `sellerAgentCommissionAmount`, `buyerAgentCommissionRate` and `sellerAgentCommissionRate`; and `customFields`. Commission values are raw numbers (null when unset), and rates are percentage points (`3` means 3%). `commissionAmount` and `commissionRate` are for your side of the deal, as the `commission_amount` and `commission_rate` merge fields are: the listing side on a seller deal, both sides summed on a dual deal, otherwise the buyer side. `customFields` is an object keyed by each **active** custom field's merge code, with the deal's stored value as a string (dates as saved, numbers and booleans as their stored text, never reformatted), or null when the field is not set on the deal. Inactive fields are omitted.",
        "operationId": "webhook_transaction_created",
        "requestBody": {
          "description": "The `transaction.created` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "transaction.created",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "id": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "address": "144 Peachtree Walk NE",
                  "type": "Purchase",
                  "status": "Active",
                  "deal": {
                    "id": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                    "address": "144 Peachtree Walk NE",
                    "city": "Atlanta",
                    "state": "GA",
                    "zip": "30309",
                    "county": "Fulton",
                    "side": "Buyer",
                    "type": "Purchase",
                    "status": "Active",
                    "purchasePrice": 485000,
                    "closingDate": "2026-09-15",
                    "tcFee": 395,
                    "commissionAmount": 14550,
                    "commissionRate": 3,
                    "totalCommissionAmount": 29100,
                    "buyerAgentCommissionAmount": 14550,
                    "sellerAgentCommissionAmount": 14550,
                    "buyerAgentCommissionRate": 3,
                    "sellerAgentCommissionRate": 3,
                    "office": {
                      "id": "c3a8e1f4-7b20-4d59-a6e3-9f0b2d4c8e17",
                      "name": "Peachtree Realty Group"
                    },
                    "assignedTo": {
                      "id": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                      "name": "Jordan Rivera",
                      "email": "jordan@example.com"
                    },
                    "agents": [
                      {
                        "role": "listing",
                        "name": "Sam Patel",
                        "email": "sam@example.com",
                        "brokerage": "Northside Homes",
                        "phone": "404-555-0142"
                      },
                      {
                        "role": "buyer",
                        "name": "Alex Chen",
                        "email": "alex@example.com",
                        "brokerage": "Peachtree Realty Group",
                        "phone": "404-555-0187"
                      }
                    ],
                    "customFields": {
                      "lockbox_code": "4417",
                      "hoa_transfer_fee": null
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "transaction.status_changed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a transaction status changes (includes the deal snapshot)",
        "description": "Sent when: the `transaction.status_changed` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.\n\n**Added to `deal`** (additive; nothing was renamed or removed): `agents[].phone`; the commission figures `commissionAmount`, `commissionRate`, `totalCommissionAmount`, `buyerAgentCommissionAmount`, `sellerAgentCommissionAmount`, `buyerAgentCommissionRate` and `sellerAgentCommissionRate`; and `customFields`. Commission values are raw numbers (null when unset), and rates are percentage points (`3` means 3%). `commissionAmount` and `commissionRate` are for your side of the deal, as the `commission_amount` and `commission_rate` merge fields are: the listing side on a seller deal, both sides summed on a dual deal, otherwise the buyer side. `customFields` is an object keyed by each **active** custom field's merge code, with the deal's stored value as a string (dates as saved, numbers and booleans as their stored text, never reformatted), or null when the field is not set on the deal. Inactive fields are omitted.",
        "operationId": "webhook_transaction_status_changed",
        "requestBody": {
          "description": "The `transaction.status_changed` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "transaction.status_changed",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "id": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "oldStatus": "Under Contract",
                  "newStatus": "Closed",
                  "deal": {
                    "id": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                    "address": "144 Peachtree Walk NE",
                    "city": "Atlanta",
                    "state": "GA",
                    "zip": "30309",
                    "county": "Fulton",
                    "side": "Buyer",
                    "type": "Purchase",
                    "status": "Closed",
                    "purchasePrice": 485000,
                    "closingDate": "2026-09-15",
                    "tcFee": 395,
                    "commissionAmount": 14550,
                    "commissionRate": 3,
                    "totalCommissionAmount": 29100,
                    "buyerAgentCommissionAmount": 14550,
                    "sellerAgentCommissionAmount": 14550,
                    "buyerAgentCommissionRate": 3,
                    "sellerAgentCommissionRate": 3,
                    "office": {
                      "id": "c3a8e1f4-7b20-4d59-a6e3-9f0b2d4c8e17",
                      "name": "Peachtree Realty Group"
                    },
                    "assignedTo": {
                      "id": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                      "name": "Jordan Rivera",
                      "email": "jordan@example.com"
                    },
                    "agents": [
                      {
                        "role": "listing",
                        "name": "Sam Patel",
                        "email": "sam@example.com",
                        "brokerage": "Northside Homes",
                        "phone": "404-555-0142"
                      },
                      {
                        "role": "buyer",
                        "name": "Alex Chen",
                        "email": "alex@example.com",
                        "brokerage": "Peachtree Realty Group",
                        "phone": "404-555-0187"
                      }
                    ],
                    "customFields": {
                      "lockbox_code": "4417",
                      "hoa_transfer_fee": null
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "transaction.closed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a transaction moves into a closed status, by any route (includes agents, office, price, TC fee and closing date)",
        "description": "Sent when: a transaction moves into a closed-type status, by any route: the Close button, the status control, the edit form, a form, or the API. Sent once per close, together with `transaction.status_changed`. `closedAt` is when the status changed; `deal.closingDate` is the contract closing date.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.\n\n**Added to `deal`** (additive; nothing was renamed or removed): `agents[].phone`; the commission figures `commissionAmount`, `commissionRate`, `totalCommissionAmount`, `buyerAgentCommissionAmount`, `sellerAgentCommissionAmount`, `buyerAgentCommissionRate` and `sellerAgentCommissionRate`; and `customFields`. Commission values are raw numbers (null when unset), and rates are percentage points (`3` means 3%). `commissionAmount` and `commissionRate` are for your side of the deal, as the `commission_amount` and `commission_rate` merge fields are: the listing side on a seller deal, both sides summed on a dual deal, otherwise the buyer side. `customFields` is an object keyed by each **active** custom field's merge code, with the deal's stored value as a string (dates as saved, numbers and booleans as their stored text, never reformatted), or null when the field is not set on the deal. Inactive fields are omitted.",
        "operationId": "webhook_transaction_closed",
        "requestBody": {
          "description": "The `transaction.closed` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "transaction.closed",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "id": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "itemsCancelled": 3,
                  "closedAt": "2026-09-15T18:02:44.5120000Z",
                  "deal": {
                    "id": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                    "address": "144 Peachtree Walk NE",
                    "city": "Atlanta",
                    "state": "GA",
                    "zip": "30309",
                    "county": "Fulton",
                    "side": "Buyer",
                    "type": "Purchase",
                    "status": "Closed",
                    "purchasePrice": 485000,
                    "closingDate": "2026-09-15",
                    "tcFee": 395,
                    "commissionAmount": 14550,
                    "commissionRate": 3,
                    "totalCommissionAmount": 29100,
                    "buyerAgentCommissionAmount": 14550,
                    "sellerAgentCommissionAmount": 14550,
                    "buyerAgentCommissionRate": 3,
                    "sellerAgentCommissionRate": 3,
                    "office": {
                      "id": "c3a8e1f4-7b20-4d59-a6e3-9f0b2d4c8e17",
                      "name": "Peachtree Realty Group"
                    },
                    "assignedTo": {
                      "id": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                      "name": "Jordan Rivera",
                      "email": "jordan@example.com"
                    },
                    "agents": [
                      {
                        "role": "listing",
                        "name": "Sam Patel",
                        "email": "sam@example.com",
                        "brokerage": "Northside Homes",
                        "phone": "404-555-0142"
                      },
                      {
                        "role": "buyer",
                        "name": "Alex Chen",
                        "email": "alex@example.com",
                        "brokerage": "Peachtree Realty Group",
                        "phone": "404-555-0187"
                      }
                    ],
                    "customFields": {
                      "lockbox_code": "4417",
                      "hoa_transfer_fee": null
                    }
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "transaction.archived": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a transaction is archived",
        "description": "Sent when: the `transaction.archived` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_transaction_archived",
        "requestBody": {
          "description": "The `transaction.archived` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "transaction.archived",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "id": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "itemsAffected": 0,
                  "archivedAt": "2026-10-01T14:20:11.0000000Z"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "transaction.deleted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a transaction is deleted",
        "description": "Sent when: the `transaction.deleted` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_transaction_deleted",
        "requestBody": {
          "description": "The `transaction.deleted` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "transaction.deleted",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "id": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "deletedAt": "2026-10-01T14:20:11.0000000Z"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "document.uploaded": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a document is uploaded to a transaction",
        "description": "Sent when: the `document.uploaded` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_document_uploaded",
        "requestBody": {
          "description": "The `document.uploaded` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "document.uploaded",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "documentId": "d0f6b1a2-4c3e-4f1b-9a7d-2e5c8b0a1f34",
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "filename": "purchase-agreement.pdf"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "document.deleted": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a document is deleted",
        "description": "Sent when: the `document.deleted` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_document_deleted",
        "requestBody": {
          "description": "The `document.deleted` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "document.deleted",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "documentId": "d0f6b1a2-4c3e-4f1b-9a7d-2e5c8b0a1f34",
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "filename": "purchase-agreement.pdf"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "task.created": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a new task is created",
        "description": "Sent when: the `task.created` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_task_created",
        "requestBody": {
          "description": "The `task.created` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "task.created",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "taskId": "b7e05d92-1a48-4c36-95f7-6d3e8a0b2c54",
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "title": "Order home inspection"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "task.completed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a task is marked complete",
        "description": "Sent when: the `task.completed` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_task_completed",
        "requestBody": {
          "description": "The `task.completed` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "task.completed",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "taskId": "b7e05d92-1a48-4c36-95f7-6d3e8a0b2c54",
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "title": "Order home inspection"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "extraction.completed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a document extraction job finishes (includes jobId + status)",
        "description": "Sent when: the `extraction.completed` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_extraction_completed",
        "requestBody": {
          "description": "The `extraction.completed` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "extraction.completed",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "jobId": "6b1f9c4d-8e2a-4b7c-9f10-3d5a7e2c8b41",
                  "status": "completed",
                  "documentId": "d0f6b1a2-4c3e-4f1b-9a7d-2e5c8b0a1f34"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "key_date.updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a key date is added or changed on a transaction",
        "description": "Sent when: the `key_date.updated` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_key_date_updated",
        "requestBody": {
          "description": "The `key_date.updated` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "key_date.updated",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "keyDateType": "ClosingDate",
                  "dateValue": "2026-09-15"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "key_date.completed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a key date is marked complete",
        "description": "Sent when: the `key_date.completed` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_key_date_completed",
        "requestBody": {
          "description": "The `key_date.completed` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "key_date.completed",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "keyDateType": "ClosingDate",
                  "dateValue": "2026-09-15"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "contact.created": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a new contact is created",
        "description": "Sent when: the `contact.created` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_contact_created",
        "requestBody": {
          "description": "The `contact.created` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "contact.created",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "contactId": "4e8b1f07-3c92-4a56-8d14-7f2b9c0e5a38",
                  "email": "buyer@example.com"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "disclosure.recipient_viewed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a disclosure package recipient opens the disclosure",
        "description": "Sent when: the `disclosure.recipient_viewed` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_disclosure_recipient_viewed",
        "requestBody": {
          "description": "The `disclosure.recipient_viewed` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "disclosure.recipient_viewed",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "packageId": "9d3f7a21-6e08-4b95-a742-1c5e8b0d3f67",
                  "recipientId": "2b6c4e08-5a71-4f93-8d20-3e7a1c9b5f04"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "form.submission_received": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a public form submission is received",
        "description": "Sent when: the `form.submission_received` event occurs in your organization.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_form_submission_received",
        "requestBody": {
          "description": "The `form.submission_received` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "form.submission_received",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "submissionId": "7c1e5a93-4b28-4d06-9f35-8a0d2e6b1c47",
                  "formId": "5a9d3c71-2e46-4b80-91f5-6c8b0a4e7d23"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "email.held": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When an email is held in the review queue for a person to approve, including again after a discard or an approval is undone or an expired email is restored (includes hold reason codes)",
        "description": "Sent when: DocJacket holds an email for a person to approve instead of sending it. Sent once when the email is first held, and again for the same `actionId` whenever it returns to held: a team member undoes its discard or its approval (within 24 hours, before it has sent), restores it after it expired, or restores an archived deal. Treat a later `email.held` as replacing whatever you last recorded for that `actionId`. `holdReasons` lists each reason's `code` and whether it is `blocking` (the email cannot be approved until it is changed). `person_must_approve` is blocking: a connected assistant without the `actions` scope completed the task that sends the email, so only a team member can approve it, in DocJacket.\n\n`data` carries ids and recipient addresses only, never the subject or body. Read the email itself with `GET /api/v1/emails/held/{actionId}` (MCP `get_held_email`), which also shows its final state.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_email_held",
        "requestBody": {
          "description": "The `email.held` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "email.held",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "actionId": "5f3b8e21-7c04-4a96-b1d2-9e6a0c4f8d73",
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "source": "agent",
                  "to": [
                    "buyer@example.com"
                  ],
                  "cc": [
                    "alex@example.com"
                  ],
                  "bcc": [ ],
                  "holdReasons": [
                    {
                      "code": "org_reviews_email",
                      "blocking": false
                    },
                    {
                      "code": "merge_fields_unfilled",
                      "blocking": true
                    }
                  ]
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "email.approved": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a held email is approved and queued to send (an undo can return it to held)",
        "description": "Sent when: a held email is approved and queued to send. `approvedVia` is `web` (the DocJacket review queue), `mobile` (DocJacket's own app) or `confirm_code` (your agent's confirm call); the envelope's `userId`/`userName` is the approver. `email.sent` or `email.failed` follows, unless a team member undoes the approval first, which sends `email.held` again for the same `actionId`.\n\n`data` carries ids and recipient addresses only, never the subject or body. Read the email itself with `GET /api/v1/emails/held/{actionId}` (MCP `get_held_email`), which also shows its final state.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_email_approved",
        "requestBody": {
          "description": "The `email.approved` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "email.approved",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "actionId": "5f3b8e21-7c04-4a96-b1d2-9e6a0c4f8d73",
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "source": "agent",
                  "to": [
                    "buyer@example.com"
                  ],
                  "cc": [
                    "alex@example.com"
                  ],
                  "bcc": [ ],
                  "approvedVia": "confirm_code"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "email.scheduled": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a held email is approved for a later send time",
        "description": "Sent when: a held email is approved for a later send time. `sendAt` is the UTC send time and `scheduledMessageId` the scheduled send, which can still be cancelled in DocJacket before then.\n\n`data` carries ids and recipient addresses only, never the subject or body. Read the email itself with `GET /api/v1/emails/held/{actionId}` (MCP `get_held_email`), which also shows its final state.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_email_scheduled",
        "requestBody": {
          "description": "The `email.scheduled` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "email.scheduled",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "actionId": "5f3b8e21-7c04-4a96-b1d2-9e6a0c4f8d73",
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "source": "agent",
                  "to": [
                    "buyer@example.com"
                  ],
                  "cc": [
                    "alex@example.com"
                  ],
                  "bcc": [ ],
                  "sendAt": "2026-09-14T13:00:00.0000000Z",
                  "scheduledMessageId": "e2a7c5f3-1490-4b6d-8a4c-2e109f5b4713"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "email.discarded": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When a held email is discarded and nothing is sent, unless an undo returns it to held",
        "description": "Sent when: a held email is discarded. Nothing is sent unless a team member undoes the discard within 24 hours, which returns it to held and sends `email.held` again for the same `actionId`. `discardedVia` is `web`, `api`, `mcp` or `confirm_code`.\n\n`data` carries ids and recipient addresses only, never the subject or body. Read the email itself with `GET /api/v1/emails/held/{actionId}` (MCP `get_held_email`), which also shows its final state.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_email_discarded",
        "requestBody": {
          "description": "The `email.discarded` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "email.discarded",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "actionId": "5f3b8e21-7c04-4a96-b1d2-9e6a0c4f8d73",
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "source": "agent",
                  "to": [
                    "buyer@example.com"
                  ],
                  "cc": [
                    "alex@example.com"
                  ],
                  "bcc": [ ],
                  "discardedVia": "mcp"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "email.sent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When an email has been sent (accepted by Gmail, Outlook or DocJacket's mail service): an approved email, or a Playbook task email, completion email, reminder or scheduled email that sent with no approval (approval \"none\", actionId null)",
        "description": "Sent when: an email has been sent. `via` is `gmail` or `outlook` (the customer's connected mailbox) or `docjacket` (DocJacket's mail service, when no mailbox is connected). For a held email that was approved, `approval` is `approved`. A bounce that comes back later is not reported.\n\nAn email can also send automatically, with no approval: a Playbook task email on its date, a task's completion email (unless a connected assistant without the `actions` scope completed the task: that email is held with `person_must_approve`), a reminder or a scheduled email, when the organization does not review automatic emails before they send (and a reminder or scheduled email a team member set up by hand, which never waits for review). Its `email.sent` has `approval` `none` and its `actionId` is null, because nothing was held; `source` is `task_email`, `task_completion`, `reminder` or `scheduled`, and `sourceId` is the id of that task, reminder or scheduled email. Its `email.failed` carries the same `actionId` (null), `source` and `sourceId`. No other `email.*` event is sent for it, and it cannot be read with the held-email endpoint. A scheduled email that was held and then approved reports as an approved email, with its `actionId`.\n\n`data` carries ids and recipient addresses only, never the subject or body. Read the email itself with `GET /api/v1/emails/held/{actionId}` (MCP `get_held_email`), which also shows its final state.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_email_sent",
        "requestBody": {
          "description": "The `email.sent` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "email.sent",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "actionId": "5f3b8e21-7c04-4a96-b1d2-9e6a0c4f8d73",
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "source": "agent",
                  "to": [
                    "buyer@example.com"
                  ],
                  "cc": [
                    "alex@example.com"
                  ],
                  "bcc": [ ],
                  "via": "gmail",
                  "approval": "approved"
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "email.failed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "When an approved or automatic email could not be sent; this is the final outcome",
        "description": "Sent when: an approved or automatic email could not be sent. This is the final outcome: retries have finished, and an email that failed once and then sent on a retry reports only `email.sent`. A reminder or scheduled email whose send fails briefly is retried automatically (up to 5 attempts over about four hours) and reports only its final outcome; one whose delivery DocJacket could not confirm is not retried and reports `email.failed`. A person can still send it again from DocJacket with Send now, and that attempt sends its own `email.sent` or `email.failed` for the same `sourceId`. `error` says why.\n\nAn email can also send automatically, with no approval: a Playbook task email on its date, a task's completion email (unless a connected assistant without the `actions` scope completed the task: that email is held with `person_must_approve`), a reminder or a scheduled email, when the organization does not review automatic emails before they send (and a reminder or scheduled email a team member set up by hand, which never waits for review). Its `email.sent` has `approval` `none` and its `actionId` is null, because nothing was held; `source` is `task_email`, `task_completion`, `reminder` or `scheduled`, and `sourceId` is the id of that task, reminder or scheduled email. Its `email.failed` carries the same `actionId` (null), `source` and `sourceId`. No other `email.*` event is sent for it, and it cannot be read with the held-email endpoint. A scheduled email that was held and then approved reports as an approved email, with its `actionId`.\n\n`data` carries ids and recipient addresses only, never the subject or body. Read the email itself with `GET /api/v1/emails/held/{actionId}` (MCP `get_held_email`), which also shows its final state.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_email_failed",
        "requestBody": {
          "description": "The `email.failed` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "email.failed",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "actionId": "5f3b8e21-7c04-4a96-b1d2-9e6a0c4f8d73",
                  "transactionId": "8a4c2e10-9f5b-4713-b6d8-0e2a7c5f3149",
                  "source": "agent",
                  "to": [
                    "buyer@example.com"
                  ],
                  "cc": [
                    "alex@example.com"
                  ],
                  "bcc": [ ],
                  "error": "No connected mailbox available and this org requires deal email to send from a connected mailbox."
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    },
    "webhook.test": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Test webhook (triggered manually)",
        "description": "Sent when: you trigger a test delivery manually. Useful for verifying your signature check.\n\n**Delivery.** `POST` to your subscription URL with these headers:\n\n- `X-Webhook-Signature` — `sha256=<hex>`, an HMAC-SHA256 of the **raw request body** using your subscription's signing secret. Compute it over the bytes as received, before any JSON parsing or re-serialization, and compare in constant time.\n- `X-Webhook-Event-Type` — the event type, matching this entry.\n- `X-Webhook-Event-Id` — a per-delivery UUID. **Deduplicate on this**: retries reuse it.\n- `X-Webhook-Timestamp` — ISO-8601 UTC send time.\n\nSubscribe with `POST /api/v1/webhooks` (use `\"*\"` to receive every event). Rotate the secret with `POST /api/v1/webhooks/{id}/regenerate-secret`, and fire a sample with `POST /api/v1/webhooks/{id}/test`.\n\n`data` is the event-specific body and is **additive** — new fields may appear at any time, so ignore ones you do not recognise.",
        "operationId": "webhook_webhook_test",
        "requestBody": {
          "description": "The `webhook.test` event envelope, POSTed to your subscription URL.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "eventType": "webhook.test",
                "eventId": "3f2a91c7-5d64-4e18-9b03-8c7d1e4a6f52",
                "timestamp": "2026-08-04T15:42:07.1183940Z",
                "organizationId": "org-9fc8a1d2e3b4",
                "userId": "1c9e6b40-72af-4d35-8e21-5b0a3f7c9d16",
                "userName": "Jordan Rivera",
                "data": {
                  "message": "This is a test delivery from DocJacket."
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "2XX": {
            "description": "Any 2xx acknowledges receipt. Respond within your subscription's timeout; anything else is recorded as a failed delivery and retried, and repeated failures open the circuit breaker on the subscription."
          }
        },
        "security": [ ]
      }
    }
  }
}