{
  "components": {
    "schemas": {
      "AttemptOut": {
        "description": "D139(d): one HTTP attempt. `signature_t` is the `t` the signature\nwas computed with; the signature value itself is never stored.",
        "properties": {
          "attempt": {
            "title": "Attempt",
            "type": "integer"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "response_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Code"
          },
          "response_excerpt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Excerpt"
          },
          "sent_at": {
            "title": "Sent At",
            "type": "string"
          },
          "signature_t": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Signature T"
          }
        },
        "required": [
          "attempt",
          "sent_at"
        ],
        "title": "AttemptOut",
        "type": "object"
      },
      "BulkRowIn": {
        "additionalProperties": false,
        "properties": {
          "form_values": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Prefills keyed by field name, or by field index as a string.",
            "title": "Form Values",
            "type": "object"
          },
          "recipients": {
            "description": "One entry per template placeholder, in signing position: {name, email, auth_level?}.",
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Recipients",
            "type": "array"
          }
        },
        "required": [
          "recipients"
        ],
        "title": "BulkRowIn",
        "type": "object"
      },
      "BulkRowOut": {
        "properties": {
          "delivery_state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivery State"
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Id"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          },
          "recipients": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "title": "Recipients",
            "type": "array"
          },
          "row_no": {
            "title": "Row No",
            "type": "integer"
          },
          "sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "status": {
            "enum": [
              "invalid",
              "queued",
              "sending",
              "sent",
              "failed",
              "canceled"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "row_no",
          "status",
          "recipients"
        ],
        "title": "BulkRowOut",
        "type": "object"
      },
      "BulkSendOut": {
        "properties": {
          "canceled_count": {
            "title": "Canceled Count",
            "type": "integer"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "dispatched_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dispatched At"
          },
          "failed_count": {
            "title": "Failed Count",
            "type": "integer"
          },
          "finished_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Finished At"
          },
          "id": {
            "title": "Id",
            "type": "string"
          },
          "mode": {
            "enum": [
              "live",
              "test"
            ],
            "title": "Mode",
            "type": "string"
          },
          "review_flagged": {
            "title": "Review Flagged",
            "type": "boolean"
          },
          "row_count": {
            "title": "Row Count",
            "type": "integer"
          },
          "rows": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/BulkRowOut"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rows"
          },
          "sent_count": {
            "title": "Sent Count",
            "type": "integer"
          },
          "source_filename": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Filename"
          },
          "status": {
            "enum": [
              "draft",
              "invalid",
              "ready",
              "dispatching",
              "done",
              "failed",
              "canceled"
            ],
            "title": "Status",
            "type": "string"
          },
          "template_id": {
            "title": "Template Id",
            "type": "string"
          }
        },
        "required": [
          "id",
          "template_id",
          "mode",
          "row_count",
          "status",
          "sent_count",
          "failed_count",
          "canceled_count",
          "review_flagged",
          "created_at"
        ],
        "title": "BulkSendOut",
        "type": "object"
      },
      "BulkSendPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/BulkSendOut"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "title": "Offset",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "title": "BulkSendPage",
        "type": "object"
      },
      "CreateBulkSendIn": {
        "additionalProperties": false,
        "properties": {
          "rows": {
            "items": {
              "$ref": "#/components/schemas/BulkRowIn"
            },
            "minItems": 1,
            "title": "Rows",
            "type": "array"
          },
          "source_filename": {
            "anyOf": [
              {
                "maxLength": 300,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Filename"
          },
          "template_id": {
            "description": "A tpl_… id.",
            "title": "Template Id",
            "type": "string"
          }
        },
        "required": [
          "template_id",
          "rows"
        ],
        "title": "CreateBulkSendIn",
        "type": "object"
      },
      "CreateDocumentReq": {
        "additionalProperties": false,
        "properties": {
          "date_format": {
            "anyOf": [
              {
                "enum": [
                  "YYYY-MM-DD",
                  "MM/DD/YYYY",
                  "DD/MM/YYYY",
                  "D MMM YYYY"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How date fields are written into the signed PDF. One of the listed values; any other value is a 422.",
            "title": "Date Format"
          },
          "display_timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "IANA time zone name used to show dates and times to signers and on the Certificate of Completion, such as `America/New_York` or `UTC`. Matched exactly, including case. Display only: storage is UTC. Any other value is a 422.",
            "title": "Display Timezone"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/FieldSpec"
            },
            "title": "Fields",
            "type": "array"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Default language for the signing ceremony, as a language subtag (`en`). A default, not an assignment: the signer can choose a different language themselves before they consent, and their choice wins. Only languages whose legal text has been reviewed are accepted; anything else is a 422. Omit it and the signer's own browser decides.",
            "title": "Locale"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "recipients": {
            "description": "Each person appears once per role: two recipients with the same email and the same role are a 422, here and at `PUT /documents/{id}/recipients`. One address may hold different roles (a signer who is also `cc`).",
            "items": {
              "$ref": "#/components/schemas/RecipientSpec"
            },
            "title": "Recipients",
            "type": "array"
          },
          "redirect_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the signer is sent after finishing. Must be an `https://` URL (D20); anything else is a 422 here, not a failure later.",
            "title": "Redirect Url"
          },
          "reminder_cadence_days": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reminder Cadence Days"
          },
          "title": {
            "maxLength": 300,
            "minLength": 1,
            "title": "Title",
            "type": "string"
          },
          "visibility": {
            "default": "everyone",
            "enum": [
              "everyone",
              "managers"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "title"
        ],
        "title": "CreateDocumentReq",
        "type": "object"
      },
      "CreateKeyReq": {
        "additionalProperties": false,
        "properties": {
          "mode": {
            "default": "live",
            "pattern": "^(live|test)$",
            "title": "Mode",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "CreateKeyReq",
        "type": "object"
      },
      "CreateTemplateIn": {
        "additionalProperties": false,
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/FieldSpec"
            },
            "title": "Fields",
            "type": "array"
          },
          "folder_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "A template folder of this workspace (`GET /folders?kind=templates`). A document folder is refused.",
            "title": "Folder Id"
          },
          "name": {
            "maxLength": 300,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "pdf_base64": {
            "title": "Pdf Base64",
            "type": "string"
          },
          "recipients": {
            "items": {
              "$ref": "#/components/schemas/RecipientSpec"
            },
            "title": "Recipients",
            "type": "array"
          }
        },
        "required": [
          "name",
          "pdf_base64"
        ],
        "title": "CreateTemplateIn",
        "type": "object"
      },
      "CreateWebhookReq": {
        "additionalProperties": false,
        "properties": {
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "url": {
            "maxLength": 2000,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "CreateWebhookReq",
        "type": "object"
      },
      "DeliveryDetailOut": {
        "description": "D139(d): the listing row plus the payload as posted and every attempt.",
        "properties": {
          "attempt": {
            "title": "Attempt",
            "type": "integer"
          },
          "attempts": {
            "items": {
              "$ref": "#/components/schemas/AttemptOut"
            },
            "title": "Attempts",
            "type": "array"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "endpoint_id": {
            "format": "uuid",
            "title": "Endpoint Id",
            "type": "string"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "next_retry_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Retry At"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "response_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Code"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event_type",
          "status",
          "attempt",
          "created_at",
          "endpoint_id",
          "payload",
          "attempts"
        ],
        "title": "DeliveryDetailOut",
        "type": "object"
      },
      "DeliveryOut": {
        "properties": {
          "attempt": {
            "title": "Attempt",
            "type": "integer"
          },
          "created_at": {
            "title": "Created At",
            "type": "string"
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered At"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Error"
          },
          "next_retry_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Retry At"
          },
          "response_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Code"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "event_type",
          "status",
          "attempt",
          "created_at"
        ],
        "title": "DeliveryOut",
        "type": "object"
      },
      "DeviceCodeOut": {
        "properties": {
          "device_code": {
            "title": "Device Code",
            "type": "string"
          },
          "expires_in": {
            "title": "Expires In",
            "type": "integer"
          },
          "interval": {
            "title": "Interval",
            "type": "integer"
          },
          "user_code": {
            "title": "User Code",
            "type": "string"
          },
          "verification_uri": {
            "title": "Verification Uri",
            "type": "string"
          },
          "verification_uri_complete": {
            "title": "Verification Uri Complete",
            "type": "string"
          }
        },
        "required": [
          "device_code",
          "user_code",
          "verification_uri",
          "verification_uri_complete",
          "expires_in",
          "interval"
        ],
        "title": "DeviceCodeOut",
        "type": "object"
      },
      "DeviceCodeReq": {
        "properties": {
          "client": {
            "description": "e.g. senv",
            "pattern": "^[a-z][a-z0-9-]{0,31}$",
            "title": "Client",
            "type": "string"
          },
          "client_version": {
            "anyOf": [
              {
                "maxLength": 64,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Version"
          },
          "mode": {
            "default": "live",
            "enum": [
              "live",
              "test"
            ],
            "title": "Mode",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 100,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name for the key the human approves",
            "title": "Name"
          }
        },
        "required": [
          "client"
        ],
        "title": "DeviceCodeReq",
        "type": "object"
      },
      "DeviceTokenOut": {
        "properties": {
          "api_key": {
            "title": "Api Key",
            "type": "string"
          },
          "display": {
            "title": "Display",
            "type": "string"
          },
          "key_id": {
            "format": "uuid",
            "title": "Key Id",
            "type": "string"
          },
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "tenant_slug": {
            "title": "Tenant Slug",
            "type": "string"
          }
        },
        "required": [
          "api_key",
          "key_id",
          "display",
          "mode",
          "name",
          "tenant_slug"
        ],
        "title": "DeviceTokenOut",
        "type": "object"
      },
      "DeviceTokenReq": {
        "properties": {
          "device_code": {
            "maxLength": 128,
            "minLength": 16,
            "title": "Device Code",
            "type": "string"
          }
        },
        "required": [
          "device_code"
        ],
        "title": "DeviceTokenReq",
        "type": "object"
      },
      "DocumentOut": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "date_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date Format"
          },
          "delivery_problem": {
            "default": false,
            "title": "Delivery Problem",
            "type": "boolean"
          },
          "display_timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Timezone"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/FieldOut"
            },
            "title": "Fields",
            "type": "array"
          },
          "folder_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder Id"
          },
          "id": {
            "description": "Public document id, `doc_…`",
            "title": "Id",
            "type": "string"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The default signing-ceremony language set on this document, if any. Not the language a signer chose: that is theirs, and it appears on the document's event trail rather than here.",
            "title": "Locale"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "mode": {
            "enum": [
              "live",
              "test"
            ],
            "title": "Mode",
            "type": "string"
          },
          "original_sha256": {
            "title": "Original Sha256",
            "type": "string"
          },
          "recipients": {
            "items": {
              "$ref": "#/components/schemas/RecipientOut"
            },
            "title": "Recipients",
            "type": "array"
          },
          "redirect_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redirect Url"
          },
          "reminder_cadence_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reminder Cadence Days"
          },
          "seal_profile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Seal Profile"
          },
          "sealed": {
            "default": false,
            "title": "Sealed",
            "type": "boolean"
          },
          "sent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sent At"
          },
          "size_bytes": {
            "title": "Size Bytes",
            "type": "integer"
          },
          "source_template_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Public id (`tpl_…`) of the template this document was made from",
            "title": "Source Template Id"
          },
          "status": {
            "enum": [
              "draft",
              "sent",
              "partially_signed",
              "completed",
              "voided",
              "rejected",
              "expired"
            ],
            "title": "Status",
            "type": "string"
          },
          "subject": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The invitation email's subject line, if one was set. Null means SignEnvoy's default subject.",
            "title": "Subject"
          },
          "team_id": {
            "format": "uuid",
            "title": "Team Id",
            "type": "string"
          },
          "title": {
            "title": "Title",
            "type": "string"
          },
          "visibility": {
            "enum": [
              "everyone",
              "managers"
            ],
            "title": "Visibility",
            "type": "string"
          }
        },
        "required": [
          "id",
          "team_id",
          "title",
          "status",
          "original_sha256",
          "size_bytes",
          "visibility",
          "mode",
          "created_at"
        ],
        "title": "DocumentOut",
        "type": "object"
      },
      "DocumentPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DocumentOut"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "title": "Offset",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "title": "DocumentPage",
        "type": "object"
      },
      "DuplicateDocumentIn": {
        "additionalProperties": false,
        "properties": {
          "title": {
            "anyOf": [
              {
                "maxLength": 300,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "title": "DuplicateDocumentIn",
        "type": "object"
      },
      "DuplicateTemplateIn": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "anyOf": [
              {
                "maxLength": 300,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          }
        },
        "title": "DuplicateTemplateIn",
        "type": "object"
      },
      "EmbedSessionOut": {
        "description": "An embed session for one recipient (D88(c)). `embed_url` is the\nceremony URL to put in your iframe or WebView: it works once, within\n`expires_at`, and opening it issues the recipient's signing link and\nloads the ceremony in place. Mint one per page render; a reused or\nlate URL shows the recipient a plain \"session ended\" state and reports\n`error` on the channel `event_delivery` names.",
        "properties": {
          "embed_url": {
            "title": "Embed Url",
            "type": "string"
          },
          "event_delivery": {
            "default": "message",
            "title": "Event Delivery",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "recipient_id": {
            "format": "uuid",
            "title": "Recipient Id",
            "type": "string"
          },
          "warnings": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/EmbedWarning"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Warnings"
          }
        },
        "required": [
          "recipient_id",
          "embed_url",
          "expires_at"
        ],
        "title": "EmbedSessionOut",
        "type": "object"
      },
      "EmbedSessionReq": {
        "additionalProperties": false,
        "description": "How the ceremony reports its events to the page or app that opened\nit (D142). `message` (default): postMessage — to your page when framed,\nor to the ceremony's own window when a WebView loads it top-level, for\na script you inject. `redirect`: on `completed`, `rejected` or `error`\nthe ceremony navigates to `signenvoy-message://<event>?…`, which your\nWebView's navigation handler cancels and reads; nothing reaches the\nnetwork. `none`: no events.",
        "properties": {
          "event_delivery": {
            "default": "message",
            "enum": [
              "message",
              "redirect",
              "none"
            ],
            "title": "Event Delivery",
            "type": "string"
          }
        },
        "title": "EmbedSessionReq",
        "type": "object"
      },
      "EmbedWarning": {
        "description": "A warning on a successful embed-session mint: the same words the\nrefusal would carry, with where to read more and where to fix it.",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "detail": {
            "title": "Detail",
            "type": "string"
          },
          "docs_url": {
            "title": "Docs Url",
            "type": "string"
          },
          "settings_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Settings Url"
          }
        },
        "required": [
          "code",
          "detail",
          "docs_url"
        ],
        "title": "EmbedWarning",
        "type": "object"
      },
      "EnvelopePatch": {
        "additionalProperties": false,
        "description": "Post-create mutable surface: display prefs, folder, visibility.\nStructural changes (recipients/fields) go through their own setters and\nare draft-only.",
        "properties": {
          "clear_folder": {
            "default": false,
            "title": "Clear Folder",
            "type": "boolean"
          },
          "date_format": {
            "anyOf": [
              {
                "enum": [
                  "YYYY-MM-DD",
                  "MM/DD/YYYY",
                  "DD/MM/YYYY",
                  "D MMM YYYY"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How date fields are written into the signed PDF. One of the listed values; any other value is a 422.",
            "title": "Date Format"
          },
          "display_timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "IANA time zone name used to show dates and times to signers and on the Certificate of Completion, such as `America/New_York` or `UTC`. Matched exactly, including case. Display only: storage is UTC. Any other value is a 422.",
            "title": "Display Timezone"
          },
          "folder_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder Id"
          },
          "locale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locale"
          },
          "message": {
            "anyOf": [
              {
                "maxLength": 1000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          },
          "redirect_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Redirect Url"
          },
          "reminder_cadence_days": {
            "anyOf": [
              {
                "minimum": 0.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reminder Cadence Days"
          },
          "subject": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Subject"
          },
          "visibility": {
            "anyOf": [
              {
                "enum": [
                  "everyone",
                  "managers"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Visibility"
          }
        },
        "title": "EnvelopePatch",
        "type": "object"
      },
      "EventOut": {
        "properties": {
          "actor": {
            "additionalProperties": true,
            "title": "Actor",
            "type": "object"
          },
          "created_at_iso": {
            "title": "Created At Iso",
            "type": "string"
          },
          "envelope_id": {
            "title": "Envelope Id",
            "type": "string"
          },
          "event_type": {
            "title": "Event Type",
            "type": "string"
          },
          "hash": {
            "title": "Hash",
            "type": "string"
          },
          "ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ip"
          },
          "payload": {
            "additionalProperties": true,
            "title": "Payload",
            "type": "object"
          },
          "payload_hash": {
            "title": "Payload Hash",
            "type": "string"
          },
          "prev_hash": {
            "title": "Prev Hash",
            "type": "string"
          },
          "seq": {
            "title": "Seq",
            "type": "integer"
          },
          "user_agent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Agent"
          }
        },
        "required": [
          "envelope_id",
          "seq",
          "event_type",
          "actor",
          "payload",
          "payload_hash",
          "created_at_iso",
          "prev_hash",
          "hash"
        ],
        "title": "EventOut",
        "type": "object"
      },
      "FairUse": {
        "properties": {
          "burst_rps": {
            "title": "Burst Rps",
            "type": "number"
          },
          "envelopes_per_day_review_threshold": {
            "default": 2000,
            "title": "Envelopes Per Day Review Threshold",
            "type": "integer"
          },
          "sustained_rps": {
            "title": "Sustained Rps",
            "type": "number"
          }
        },
        "required": [
          "sustained_rps",
          "burst_rps"
        ],
        "title": "FairUse",
        "type": "object"
      },
      "FieldOut": {
        "properties": {
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "envelope_id": {
            "title": "Envelope Id",
            "type": "string"
          },
          "h": {
            "title": "H",
            "type": "number"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "prefill_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prefill Value"
          },
          "read_only": {
            "title": "Read Only",
            "type": "boolean"
          },
          "recipient_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipient Id"
          },
          "required": {
            "title": "Required",
            "type": "boolean"
          },
          "settings": {
            "$ref": "#/components/schemas/FieldSettings"
          },
          "type": {
            "enum": [
              "signature",
              "initials",
              "name",
              "email",
              "date",
              "text",
              "number",
              "checkbox",
              "radio",
              "dropdown"
            ],
            "title": "Type",
            "type": "string"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          },
          "w": {
            "title": "W",
            "type": "number"
          },
          "x": {
            "title": "X",
            "type": "number"
          },
          "y": {
            "title": "Y",
            "type": "number"
          }
        },
        "required": [
          "id",
          "envelope_id",
          "recipient_id",
          "type",
          "page",
          "x",
          "y",
          "w",
          "h",
          "required",
          "read_only",
          "settings"
        ],
        "title": "FieldOut",
        "type": "object"
      },
      "FieldSettings": {
        "additionalProperties": false,
        "description": "F-12 field settings — enforced server-side at completion.",
        "properties": {
          "input_modes": {
            "anyOf": [
              {
                "items": {
                  "enum": [
                    "draw",
                    "type",
                    "upload"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Input Modes"
          },
          "max_length": {
            "anyOf": [
              {
                "minimum": 1.0,
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Length"
          },
          "max_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Value"
          },
          "min_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Value"
          },
          "options": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Options"
          },
          "pattern": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pattern"
          }
        },
        "title": "FieldSettings",
        "type": "object"
      },
      "FieldSpec": {
        "additionalProperties": false,
        "properties": {
          "h": {
            "exclusiveMinimum": 0.0,
            "maximum": 1.0,
            "title": "H",
            "type": "number"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 100,
                "pattern": "^[A-Za-z][A-Za-z0-9_.-]*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "page": {
            "minimum": 1.0,
            "title": "Page",
            "type": "integer"
          },
          "prefill_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prefill Value"
          },
          "read_only": {
            "default": false,
            "title": "Read Only",
            "type": "boolean"
          },
          "recipient_index": {
            "minimum": 0.0,
            "title": "Recipient Index",
            "type": "integer"
          },
          "required": {
            "default": true,
            "title": "Required",
            "type": "boolean"
          },
          "settings": {
            "$ref": "#/components/schemas/FieldSettings"
          },
          "type": {
            "enum": [
              "signature",
              "initials",
              "name",
              "email",
              "date",
              "text",
              "number",
              "checkbox",
              "radio",
              "dropdown"
            ],
            "title": "Type",
            "type": "string"
          },
          "w": {
            "exclusiveMinimum": 0.0,
            "maximum": 1.0,
            "title": "W",
            "type": "number"
          },
          "x": {
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "X",
            "type": "number"
          },
          "y": {
            "maximum": 1.0,
            "minimum": 0.0,
            "title": "Y",
            "type": "number"
          }
        },
        "required": [
          "type",
          "recipient_index",
          "page",
          "x",
          "y",
          "w",
          "h"
        ],
        "title": "FieldSpec",
        "type": "object"
      },
      "FolderIn": {
        "additionalProperties": false,
        "properties": {
          "kind": {
            "default": "documents",
            "description": "`documents` (the default) or `templates`. The parent, if any, must be a folder of the same kind.",
            "enum": [
              "documents",
              "templates"
            ],
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          }
        },
        "required": [
          "name"
        ],
        "title": "FolderIn",
        "type": "object"
      },
      "FolderOut": {
        "properties": {
          "depth": {
            "description": "1 for a root folder; at most 5",
            "title": "Depth",
            "type": "integer"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "default": "documents",
            "description": "Which tree the folder belongs to. Document folders hold documents; template folders hold templates. Fixed at creation.",
            "enum": [
              "documents",
              "templates"
            ],
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          }
        },
        "required": [
          "id",
          "name",
          "depth"
        ],
        "title": "FolderOut",
        "type": "object"
      },
      "FolderPatchIn": {
        "additionalProperties": false,
        "properties": {
          "move_to_root": {
            "default": false,
            "title": "Move To Root",
            "type": "boolean"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 120,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "parent_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Parent Id"
          }
        },
        "title": "FolderPatchIn",
        "type": "object"
      },
      "KeyCreated": {
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "display": {
            "title": "Display",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "key": {
            "title": "Key",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "required": [
          "id",
          "name",
          "display",
          "mode",
          "key"
        ],
        "title": "KeyCreated",
        "type": "object"
      },
      "KeyOut": {
        "properties": {
          "created_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "display": {
            "title": "Display",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          },
          "mode": {
            "title": "Mode",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revoked At"
          }
        },
        "required": [
          "id",
          "name",
          "display",
          "mode"
        ],
        "title": "KeyOut",
        "type": "object"
      },
      "Me": {
        "properties": {
          "fair_use": {
            "$ref": "#/components/schemas/FairUse"
          },
          "grace_until": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Grace Until"
          },
          "key_mode": {
            "title": "Key Mode",
            "type": "string"
          },
          "plan": {
            "title": "Plan",
            "type": "string"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "tenant_slug": {
            "title": "Tenant Slug",
            "type": "string"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          }
        },
        "required": [
          "tenant_slug",
          "status",
          "grace_until",
          "key_mode",
          "plan",
          "usage",
          "fair_use"
        ],
        "title": "Me",
        "type": "object"
      },
      "MintedLinkOut": {
        "description": "A signing link minted for one recipient (D86(e)). The URL is the\nceremony; embed it, redirect to it, or deliver it yourself. It is\nreturned exactly once — the token is stored hashed.",
        "properties": {
          "email": {
            "title": "Email",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "title": "Expires At",
            "type": "string"
          },
          "recipient_id": {
            "format": "uuid",
            "title": "Recipient Id",
            "type": "string"
          },
          "signing_url": {
            "title": "Signing Url",
            "type": "string"
          }
        },
        "required": [
          "recipient_id",
          "email",
          "signing_url",
          "expires_at"
        ],
        "title": "MintedLinkOut",
        "type": "object"
      },
      "PatchTemplateIn": {
        "additionalProperties": false,
        "description": "D54: every part given replaces the stored one; absent parts stay.",
        "properties": {
          "clear_folder": {
            "default": false,
            "description": "Take the template out of its folder.",
            "title": "Clear Folder",
            "type": "boolean"
          },
          "fields": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/FieldSpec"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fields"
          },
          "folder_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Move the template into this template folder.",
            "title": "Folder Id"
          },
          "name": {
            "anyOf": [
              {
                "maxLength": 300,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "recipients": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/RecipientSpec"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recipients"
          }
        },
        "title": "PatchTemplateIn",
        "type": "object"
      },
      "PatchWebhookReq": {
        "additionalProperties": false,
        "description": "D58(a): every member optional; `active: true` re-enables a disabled\nendpoint (the only way back from `/disable` short of recreating it).",
        "properties": {
          "active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Events"
          },
          "url": {
            "anyOf": [
              {
                "maxLength": 2000,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          }
        },
        "title": "PatchWebhookReq",
        "type": "object"
      },
      "PingOut": {
        "properties": {
          "event_id": {
            "title": "Event Id",
            "type": "string"
          },
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "status": {
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "event_id"
        ],
        "title": "PingOut",
        "type": "object"
      },
      "ProblemDetails": {
        "additionalProperties": true,
        "description": "RFC 9457 error. Branch on type; additional members depend on the problem type.",
        "properties": {
          "detail": {
            "type": "string"
          },
          "docs_url": {
            "format": "uri",
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "example": "/problems/not-found",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "instance",
          "docs_url"
        ],
        "type": "object"
      },
      "RecipientOut": {
        "properties": {
          "auth_level": {
            "enum": [
              "link",
              "otp"
            ],
            "title": "Auth Level",
            "type": "string"
          },
          "completed_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At"
          },
          "consent_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Consent At"
          },
          "email": {
            "title": "Email",
            "type": "string"
          },
          "email_normalized": {
            "title": "Email Normalized",
            "type": "string"
          },
          "envelope_id": {
            "title": "Envelope Id",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "reassigned_from": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reassigned From"
          },
          "reject_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reject Reason"
          },
          "rejected_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rejected At"
          },
          "role": {
            "enum": [
              "signer",
              "approver",
              "viewer",
              "cc"
            ],
            "title": "Role",
            "type": "string"
          },
          "signing_order": {
            "title": "Signing Order",
            "type": "integer"
          },
          "status": {
            "enum": [
              "pending",
              "sent",
              "opened",
              "completed",
              "rejected",
              "reassigned"
            ],
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "envelope_id",
          "role",
          "name",
          "email",
          "email_normalized",
          "signing_order",
          "auth_level",
          "status"
        ],
        "title": "RecipientOut",
        "type": "object"
      },
      "RecipientSpec": {
        "additionalProperties": false,
        "properties": {
          "auth_level": {
            "default": "link",
            "enum": [
              "link",
              "otp"
            ],
            "title": "Auth Level",
            "type": "string"
          },
          "email": {
            "format": "email",
            "title": "Email",
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "role": {
            "default": "signer",
            "enum": [
              "signer",
              "approver",
              "viewer",
              "cc"
            ],
            "title": "Role",
            "type": "string"
          },
          "signing_order": {
            "default": 1,
            "minimum": 1.0,
            "title": "Signing Order",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "email"
        ],
        "title": "RecipientSpec",
        "type": "object"
      },
      "RedeliverOut": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "integer"
          },
          "status": {
            "const": "queued",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "title": "RedeliverOut",
        "type": "object"
      },
      "ReplayIn": {
        "additionalProperties": false,
        "description": "D139(e): re-queue deliveries created in [since, until).",
        "properties": {
          "since": {
            "format": "date-time",
            "title": "Since",
            "type": "string"
          },
          "status": {
            "default": "dead",
            "enum": [
              "dead",
              "all"
            ],
            "title": "Status",
            "type": "string"
          },
          "until": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Until"
          }
        },
        "required": [
          "since"
        ],
        "title": "ReplayIn",
        "type": "object"
      },
      "ReplayOut": {
        "properties": {
          "queued": {
            "title": "Queued",
            "type": "integer"
          }
        },
        "required": [
          "queued"
        ],
        "title": "ReplayOut",
        "type": "object"
      },
      "SendOut": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "recipients": {
            "items": {
              "$ref": "#/components/schemas/MintedLinkOut"
            },
            "title": "Recipients",
            "type": "array"
          },
          "status": {
            "const": "sent",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "title": "SendOut",
        "type": "object"
      },
      "SendReq": {
        "additionalProperties": false,
        "properties": {
          "delivery": {
            "default": "email",
            "enum": [
              "email",
              "none"
            ],
            "title": "Delivery",
            "type": "string"
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message"
          }
        },
        "title": "SendReq",
        "type": "object"
      },
      "TemplateOut": {
        "properties": {
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "fields": {
            "items": {
              "$ref": "#/components/schemas/FieldSpec"
            },
            "title": "Fields",
            "type": "array"
          },
          "folder_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Folder Id"
          },
          "id": {
            "description": "Public template id, `tpl_…`",
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "recipients": {
            "items": {
              "$ref": "#/components/schemas/RecipientSpec"
            },
            "title": "Recipients",
            "type": "array"
          },
          "sha256": {
            "title": "Sha256",
            "type": "string"
          },
          "team_id": {
            "format": "uuid",
            "title": "Team Id",
            "type": "string"
          },
          "updated_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          },
          "version": {
            "default": 1,
            "title": "Version",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "team_id",
          "name",
          "sha256",
          "created_at"
        ],
        "title": "TemplateOut",
        "type": "object"
      },
      "TemplatePage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TemplateOut"
            },
            "title": "Items",
            "type": "array"
          },
          "limit": {
            "title": "Limit",
            "type": "integer"
          },
          "offset": {
            "title": "Offset",
            "type": "integer"
          },
          "total": {
            "title": "Total",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "title": "TemplatePage",
        "type": "object"
      },
      "Usage": {
        "description": "D91 as amended by D105: what this period has cost so far.\n\n`minimum_cents`, `included_at_minimum` and `rate_cents` are this\nworkspace's EFFECTIVE terms for this period: finance's agreed price if\nit has one, and prorated in the calendar month it went live. The bill\nis `minimum_cents + max(0, used - included_at_minimum) * rate_cents`,\nand `bill_cents` / `true_up_cents` already carry it: read them rather\nthan computing, because the formula is not `max(minimum, used x rate)`\nand a client that assumes it will be wrong at the crossing.\n`included_at_minimum` is also the number D106(b)'s cancellation cap\nuses, so the count shown here is the count enforced.\n\nD96: `used` counts envelopes that **completed** in this period, not\nones sent in it. An envelope sent today and signed next month is next\nmonth's number, and one nobody signs is never anybody's — so this\nunderstates what the period will eventually cost, which is the\nhonest direction for a running total to be wrong in.\n\nSandbox envelopes are not counted here (D92): a test key's usage is\nalways zero, which is the honest answer, not a missing one.",
        "properties": {
          "bill_cents": {
            "title": "Bill Cents",
            "type": "integer"
          },
          "included_at_minimum": {
            "title": "Included At Minimum",
            "type": "integer"
          },
          "minimum_cents": {
            "title": "Minimum Cents",
            "type": "integer"
          },
          "rate_cents": {
            "title": "Rate Cents",
            "type": "integer"
          },
          "resets_on": {
            "title": "Resets On",
            "type": "string"
          },
          "true_up_cents": {
            "title": "True Up Cents",
            "type": "integer"
          },
          "used": {
            "title": "Used",
            "type": "integer"
          }
        },
        "required": [
          "used",
          "resets_on",
          "rate_cents",
          "minimum_cents",
          "included_at_minimum",
          "bill_cents",
          "true_up_cents"
        ],
        "title": "Usage",
        "type": "object"
      },
      "UseTemplateIn": {
        "additionalProperties": false,
        "properties": {
          "date_format": {
            "anyOf": [
              {
                "enum": [
                  "YYYY-MM-DD",
                  "MM/DD/YYYY",
                  "DD/MM/YYYY",
                  "D MMM YYYY"
                ],
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How date fields are written into the signed PDF. One of the listed values; any other value is a 422.",
            "title": "Date Format"
          },
          "display_timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "IANA time zone name used to show dates and times to signers and on the Certificate of Completion, such as `America/New_York` or `UTC`. Matched exactly, including case. Display only: storage is UTC. Any other value is a 422.",
            "title": "Display Timezone"
          },
          "form_values": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Prefill values keyed by field name, or by field index as a string in the template's field order (\"0\", \"1\", …). An unknown key fails the request with 422.",
            "title": "Form Values",
            "type": "object"
          },
          "recipients": {
            "items": {
              "$ref": "#/components/schemas/RecipientSpec"
            },
            "title": "Recipients",
            "type": "array"
          },
          "redirect_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Where the signer is sent after finishing. Must be an `https://` URL (D20); anything else is a 422 here, not a failure later.",
            "title": "Redirect Url"
          },
          "title": {
            "anyOf": [
              {
                "maxLength": 300,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Title"
          }
        },
        "required": [
          "recipients"
        ],
        "title": "UseTemplateIn",
        "type": "object"
      },
      "VoidOut": {
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "status": {
            "const": "voided",
            "title": "Status",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status"
        ],
        "title": "VoidOut",
        "type": "object"
      },
      "VoidReq": {
        "additionalProperties": false,
        "properties": {
          "reason": {
            "maxLength": 1000,
            "minLength": 1,
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "title": "VoidReq",
        "type": "object"
      },
      "WebhookCreated": {
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          },
          "disabled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled At"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled Reason"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "failing_since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failing Since"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_failure_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failure At"
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "previous_secret_expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Secret Expires At"
          },
          "secret": {
            "title": "Secret",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "active",
          "secret"
        ],
        "title": "WebhookCreated",
        "type": "object"
      },
      "WebhookOut": {
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean"
          },
          "disabled_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled At"
          },
          "disabled_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Disabled Reason"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "title": "Events",
            "type": "array"
          },
          "failing_since": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Failing Since"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "last_failure_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Failure At"
          },
          "last_success_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Success At"
          },
          "previous_secret_expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Previous Secret Expires At"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "active"
        ],
        "title": "WebhookOut",
        "type": "object"
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "description": "A SignEnvoy live or test API key.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "The SignEnvoy public REST API. Authenticate with an API key: `Authorization: Bearer senv_live_…`.",
    "title": "SignEnvoy API",
    "version": "1.7.0-m9"
  },
  "openapi": "3.1.0",
  "paths": {
    "/bulk-sends": {
      "get": {
        "operationId": "list_bulk_sends_bulk_sends_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "maximum": 9223372036854775807,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkSendPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List Bulk Sends",
        "tags": [
          "bulk-sends"
        ]
      },
      "post": {
        "operationId": "create_bulk_send_bulk_sends_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBulkSendIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkSendOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create Bulk Send",
        "tags": [
          "bulk-sends"
        ]
      }
    },
    "/bulk-sends/{bulk_send_id}": {
      "get": {
        "operationId": "get_bulk_send_bulk_sends__bulk_send_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "bulk_send_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Bulk Send Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkSendOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get Bulk Send",
        "tags": [
          "bulk-sends"
        ]
      }
    },
    "/bulk-sends/{bulk_send_id}/cancel": {
      "post": {
        "operationId": "cancel_bulk_send_bulk_sends__bulk_send_id__cancel_post",
        "parameters": [
          {
            "in": "path",
            "name": "bulk_send_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Bulk Send Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkSendOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Cancel Bulk Send",
        "tags": [
          "bulk-sends"
        ]
      }
    },
    "/bulk-sends/{bulk_send_id}/dispatch": {
      "post": {
        "operationId": "dispatch_bulk_send_bulk_sends__bulk_send_id__dispatch_post",
        "parameters": [
          {
            "in": "path",
            "name": "bulk_send_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Bulk Send Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkSendOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Dispatch Bulk Send",
        "tags": [
          "bulk-sends"
        ]
      }
    },
    "/device/code": {
      "post": {
        "operationId": "device_code_device_code_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceCodeReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceCodeOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [],
        "summary": "Device Code",
        "tags": [
          "auth"
        ]
      }
    },
    "/device/token": {
      "post": {
        "operationId": "device_token_device_token_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeviceTokenReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceTokenOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [],
        "summary": "Device Token",
        "tags": [
          "auth"
        ]
      }
    },
    "/documents": {
      "get": {
        "operationId": "list_documents_documents_get",
        "parameters": [
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "folder",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Folder"
            }
          },
          {
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 200,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Q"
            }
          },
          {
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "default": "created",
              "title": "Sort",
              "type": "string"
            }
          },
          {
            "description": "A bulk send id: list only its member documents. Without it, members of bulk sends are hidden (the batch is the first-class object, BS-4).",
            "in": "query",
            "name": "batch",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "A bulk send id: list only its member documents. Without it, members of bulk sends are hidden (the batch is the first-class object, BS-4).",
              "title": "Batch"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "maximum": 9223372036854775807,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentPage"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List Documents",
        "tags": [
          "documents"
        ]
      },
      "post": {
        "description": "Create a document in one call: a `multipart/form-data` request with\ntwo parts. `document` is the JSON body (title, recipients, fields and\nsettings), sent as a part of type `application/json` or as a plain\nform field. `file` is the PDF, at most 50 MB.\n\nThe answer is the draft, with its recipient and field ids, ready to\nread, change, send or delete. Everything is checked in this call, and a\nrefusal creates nothing: a body that is not this form, or a missing,\nrepeated or unknown part, is a 422 `request-invalid` naming it; a bad\n`document` part is a 422 `request-invalid` naming the member; an empty\nfile, anything that is not a PDF, a damaged PDF, a password-protected\nPDF, one with no pages, or a field placed off its pages is a 422\n`validation-failed` whose `detail` says which; more than 50 MB is a 422\n`pdf-too-large`. The `Content-Type` of the file part is not consulted;\nthe bytes are. (Register: D180, ADR 0078.)\n\n    curl https://api.signenvoy.com/v1/documents \\\n      -H \"Authorization: Bearer $SIGNENVOY_API_KEY\" \\\n      -F 'document={\"title\":\"NDA\",\"recipients\":[...]};type=application/json' \\\n      -F file=@nda.pdf",
        "operationId": "create_document_documents_post",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "encoding": {
                "document": {
                  "contentType": "application/json"
                },
                "file": {
                  "contentType": "application/pdf"
                }
              },
              "schema": {
                "properties": {
                  "document": {
                    "$ref": "#/components/schemas/CreateDocumentReq"
                  },
                  "file": {
                    "description": "The PDF, at most 50 MB.",
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "document",
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create Document",
        "tags": [
          "documents"
        ]
      }
    },
    "/documents/{doc_id}": {
      "delete": {
        "description": "Permanently delete a document.\n\nAllowed while the document's `status` is `draft`, `voided`, `expired`,\n`completed`, or `rejected`.\nDeletion removes the document, its recipients, its fields, its activity\nrecord, and its stored PDFs, including the sealed PDF and its\ncertificate; the id then answers 404 everywhere. It cannot be undone:\ndownload a completed document first if you need to keep it.\n\nSent and partially signed documents cannot be deleted (409\n`invalid-state`): void the document first, then delete it. Deleting a\ndocument does not change this month's usage count.\n(Register: D87, ADR 0018; D122, ADR 0033.)",
        "operationId": "delete_document_documents__doc_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/invalid-state: only draft, voided, and expired documents can be deleted."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete Document",
        "tags": [
          "documents"
        ]
      },
      "get": {
        "description": "Read a document. Every response carries an `ETag`; send it back as\n`If-None-Match` and an unchanged document answers 304. While the\ndocument can still change on its own, responses advise\n`X-SignEnvoy-Poll-Interval: 30` and link the webhook docs: prefer the\n`document.completed` and `document.sealed` webhooks to reading on a\ntimer. One key may read one document 10 times at once, then once every\n15 seconds (429 `polling-too-fast` beyond). `doc_id` may also be the\nReference printed on the Certificate of Completion (`env_…`) or the\nUUID in it; the response carries the `doc_…` id.",
        "operationId": "get_document_documents__doc_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          },
          {
            "description": "Long poll: hold the request up to this many seconds (1–30) until the document differs from the version named in `If-None-Match` (or from the version at the start of the request), then answer 200. At the deadline the answer is 304 when `If-None-Match` still matches, otherwise 200. Prefer webhooks; see /guides/polling.",
            "in": "query",
            "name": "wait",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 30,
                  "minimum": 1,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Long poll: hold the request up to this many seconds (1–30) until the document differs from the version named in `If-None-Match` (or from the version at the start of the request), then answer 200. At the deadline the answer is 304 when `If-None-Match` still matches, otherwise 200. Prefer webhooks; see /guides/polling.",
              "title": "Wait"
            }
          },
          {
            "description": "An `ETag` from an earlier read. A match is a 304 with no body.",
            "in": "header",
            "name": "if-none-match",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "An `ETag` from an earlier read. A match is a 304 with no body.",
              "title": "If-None-Match"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "304": {
            "description": "Not Modified: `If-None-Match` matched the current `ETag`. No body."
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/polling-too-fast when one key reads one document more than 10 times at once, then faster than once every 15 s; /problems/rate-limited for the workspace limit or more than 10 concurrent `wait` reads. Retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get Document",
        "tags": [
          "documents"
        ]
      },
      "patch": {
        "operationId": "patch_document_documents__doc_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnvelopePatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Patch Document",
        "tags": [
          "documents"
        ]
      }
    },
    "/documents/{doc_id}/download": {
      "get": {
        "operationId": "download_document_documents__doc_id__download_get",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "variant",
            "required": false,
            "schema": {
              "default": "signed",
              "title": "Variant",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/pdf": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "PDF bytes"
          },
          "307": {
            "description": "Redirect to a short-lived artifact URL",
            "headers": {
              "Location": {
                "schema": {
                  "format": "uri",
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/not-found, or /problems/not-ready when the artifact is not yet available."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Download Document",
        "tags": [
          "documents"
        ]
      }
    },
    "/documents/{doc_id}/duplicate": {
      "post": {
        "description": "T-5 \"use as new\" (D54): a fresh draft from the original PDF with the\nsame recipients, fields, and display preferences. No signing links exist\nuntil it is sent; nothing is emailed.",
        "operationId": "duplicate_document_documents__doc_id__duplicate_post",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/DuplicateDocumentIn"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Req"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Duplicate Document",
        "tags": [
          "documents"
        ]
      }
    },
    "/documents/{doc_id}/events": {
      "get": {
        "operationId": "document_events_documents__doc_id__events_get",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after_seq",
            "required": false,
            "schema": {
              "default": 0,
              "maximum": 2147483647,
              "minimum": 0,
              "title": "After Seq",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/EventOut"
                  },
                  "title": "Response Document Events Documents  Doc Id  Events Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Document Events",
        "tags": [
          "documents"
        ]
      }
    },
    "/documents/{doc_id}/fields": {
      "put": {
        "operationId": "put_fields_documents__doc_id__fields_put",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "items": {
                  "$ref": "#/components/schemas/FieldSpec"
                },
                "title": "Fields",
                "type": "array"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FieldOut"
                  },
                  "title": "Response Put Fields Documents  Doc Id  Fields Put",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Put Fields",
        "tags": [
          "documents"
        ]
      }
    },
    "/documents/{doc_id}/recipients": {
      "put": {
        "operationId": "put_recipients_documents__doc_id__recipients_put",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "items": {
                  "$ref": "#/components/schemas/RecipientSpec"
                },
                "title": "Recipients",
                "type": "array"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/RecipientOut"
                  },
                  "title": "Response Put Recipients Documents  Doc Id  Recipients Put",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Put Recipients",
        "tags": [
          "documents"
        ]
      }
    },
    "/documents/{doc_id}/recipients/{recipient_id}/embed-session": {
      "post": {
        "description": "Start an embedded signing session for one recipient. Returns a\nceremony URL for your iframe or WebView that works once, for ten\nminutes. Opening it issues that recipient's signing link (any earlier\nlink stops working, as with the signing-link mint) and shows the\nceremony in place. How you hear `ready`, `completed`, `rejected` and\n`error` is `event_delivery`: postMessage to your page (framed) or to\nthe ceremony's own window (top-level, for an injected script), or a\n`signenvoy-message://` navigation your WebView intercepts. A framed\npage's origin must be on the workspace's embed origins list (Settings →\nWorkspace) or the browser refuses to frame the ceremony. Mint a fresh\nsession on every render. 409 `invalid-state` unless the document is in\nflight and the recipient has not signed or declined; 404 for a\nrecipient outside the document.\n\nA `message` session from a workspace with **no** embed origins can be\nshown by no page of yours: with a live-mode key it is refused, 409\n`embed-origins-missing` (nothing is minted); with a test-mode key it is\nminted and the 201 carries `warnings` (and a `Warning` header) saying\nso, so you learn on the first call rather than from a blank frame.\n`redirect` and `none` sessions (a WebView, loaded top-level) need no\norigin and are never refused or warned.",
        "operationId": "create_embed_session_documents__doc_id__recipients__recipient_id__embed_session_post",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "recipient_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Recipient Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/EmbedSessionReq"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Req"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmbedSessionOut"
                }
              }
            },
            "description": "The session; `warnings` when a test-mode mint cannot be shown as asked",
            "headers": {
              "Warning": {
                "description": "D150: `299 - \"…\"` with the same text as `warnings[0].detail`, on a test-mode mint from a workspace with no embed origins",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/invalid-state unless the document is in flight and the recipient has not acted; /problems/embed-origins-missing for a live-mode key when event_delivery is message and the workspace has no embed origins (a test-mode key gets a 201 with `warnings`)."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create Embed Session",
        "tags": [
          "documents"
        ]
      }
    },
    "/documents/{doc_id}/recipients/{recipient_id}/signing-link": {
      "post": {
        "description": "D86(e): a fresh signing link for one recipient. This ROTATES the\nrecipient's link: the previous one (emailed, or returned earlier)\nstops working. No mail is sent. 409 `invalid-state` unless the document\nis in flight and the recipient has not signed or declined.",
        "operationId": "mint_signing_link_documents__doc_id__recipients__recipient_id__signing_link_post",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "recipient_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Recipient Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MintedLinkOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Mint Signing Link",
        "tags": [
          "documents"
        ]
      }
    },
    "/documents/{doc_id}/send": {
      "post": {
        "operationId": "send_document_documents__doc_id__send_post",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/SendReq"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Req"
              }
            }
          }
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Send Document",
        "tags": [
          "documents"
        ]
      }
    },
    "/documents/{doc_id}/void": {
      "post": {
        "operationId": "void_document_documents__doc_id__void_post",
        "parameters": [
          {
            "in": "path",
            "name": "doc_id",
            "required": true,
            "schema": {
              "title": "Doc Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoidReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VoidOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Void Document",
        "tags": [
          "documents"
        ]
      }
    },
    "/events/stream": {
      "get": {
        "operationId": "event_stream_events_stream_get",
        "parameters": [
          {
            "in": "query",
            "name": "events",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Events"
            }
          },
          {
            "in": "query",
            "name": "after_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maximum": 9223372036854775807,
                  "minimum": 0,
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "title": "After Id"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Server-Sent Events"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Event Stream",
        "tags": [
          "events"
        ]
      }
    },
    "/folders": {
      "get": {
        "operationId": "list_folders_folders_get",
        "parameters": [
          {
            "description": "Which tree to list: `documents` (the default) or `templates`.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "default": "documents",
              "description": "Which tree to list: `documents` (the default) or `templates`.",
              "enum": [
                "documents",
                "templates"
              ],
              "title": "Kind",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/FolderOut"
                  },
                  "title": "Response List Folders Folders Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List Folders",
        "tags": [
          "folders"
        ]
      },
      "post": {
        "operationId": "create_folder_folders_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FolderIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FolderOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create Folder",
        "tags": [
          "folders"
        ]
      }
    },
    "/folders/{folder_id}": {
      "delete": {
        "operationId": "delete_folder_folders__folder_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "folder_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Folder Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete Folder",
        "tags": [
          "folders"
        ]
      },
      "patch": {
        "operationId": "patch_folder_folders__folder_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "folder_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Folder Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FolderPatchIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FolderOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Patch Folder",
        "tags": [
          "folders"
        ]
      }
    },
    "/keys": {
      "get": {
        "operationId": "list_keys_keys_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/KeyOut"
                  },
                  "title": "Response List Keys Keys Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List Keys",
        "tags": [
          "keys"
        ]
      },
      "post": {
        "operationId": "create_key_keys_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateKeyReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyCreated"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create Key",
        "tags": [
          "keys"
        ]
      }
    },
    "/keys/{key_id}/revoke": {
      "post": {
        "operationId": "revoke_key_keys__key_id__revoke_post",
        "parameters": [
          {
            "in": "path",
            "name": "key_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Key Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Revoke Key",
        "tags": [
          "keys"
        ]
      }
    },
    "/me": {
      "get": {
        "operationId": "me_me_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Me",
        "tags": [
          "account"
        ]
      }
    },
    "/templates": {
      "get": {
        "description": "D46(f): the CLI's `template list`. D89: `folder` narrows to one folder.",
        "operationId": "list_templates_templates_get",
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "maximum": 9223372036854775807,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          },
          {
            "description": "Templates in this template folder only (not its subfolders).",
            "in": "query",
            "name": "folder",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Templates in this template folder only (not its subfolders).",
              "title": "Folder"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplatePage"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List Templates",
        "tags": [
          "templates"
        ]
      },
      "post": {
        "operationId": "create_template_templates_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create Template",
        "tags": [
          "templates"
        ]
      }
    },
    "/templates/{tpl_id}": {
      "delete": {
        "description": "D54: soft delete — the template disappears from list/get/use;\ndocuments created from it are unaffected.",
        "operationId": "delete_template_templates__tpl_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "tpl_id",
            "required": true,
            "schema": {
              "title": "Tpl Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete Template",
        "tags": [
          "templates"
        ]
      },
      "get": {
        "description": "D46(f): the CLI's `template pull` — the definition round-trips.",
        "operationId": "get_template_templates__tpl_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "tpl_id",
            "required": true,
            "schema": {
              "title": "Tpl Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get Template",
        "tags": [
          "templates"
        ]
      },
      "patch": {
        "description": "D54/TE-6: replaces the parts given and bumps `version`. Documents\nalready created from the template are unaffected.",
        "operationId": "patch_template_templates__tpl_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "tpl_id",
            "required": true,
            "schema": {
              "title": "Tpl Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchTemplateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Patch Template",
        "tags": [
          "templates"
        ]
      }
    },
    "/templates/{tpl_id}/duplicate": {
      "post": {
        "description": "T-5: a new template (version 1) from the same PDF and definition.",
        "operationId": "duplicate_template_templates__tpl_id__duplicate_post",
        "parameters": [
          {
            "in": "path",
            "name": "tpl_id",
            "required": true,
            "schema": {
              "title": "Tpl Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/DuplicateTemplateIn"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Req"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Duplicate Template",
        "tags": [
          "templates"
        ]
      }
    },
    "/templates/{tpl_id}/use": {
      "post": {
        "operationId": "use_template_templates__tpl_id__use_post",
        "parameters": [
          {
            "in": "path",
            "name": "tpl_id",
            "required": true,
            "schema": {
              "title": "Tpl Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UseTemplateIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Use Template",
        "tags": [
          "templates"
        ]
      }
    },
    "/webhooks": {
      "get": {
        "operationId": "list_webhooks_webhooks_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/WebhookOut"
                  },
                  "title": "Response List Webhooks Webhooks Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List Webhooks",
        "tags": [
          "webhooks"
        ]
      },
      "post": {
        "operationId": "create_webhook_webhooks_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookCreated"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Create Webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook_id}": {
      "delete": {
        "operationId": "delete_webhook_webhooks__webhook_id__delete",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Delete Webhook",
        "tags": [
          "webhooks"
        ]
      },
      "patch": {
        "description": "D58(a): edit url/events, and re-enable (`active: true`). D139(b)/(c):\nre-enabling clears the auto-disable markers and makes every delivery\nwaiting on the endpoint due at once.",
        "operationId": "patch_webhook_webhooks__webhook_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchWebhookReq"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Patch Webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook_id}/deliveries": {
      "get": {
        "operationId": "list_deliveries_webhooks__webhook_id__deliveries_get",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/DeliveryOut"
                  },
                  "title": "Response List Deliveries Webhooks  Webhook Id  Deliveries Get",
                  "type": "array"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "List Deliveries",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook_id}/deliveries/replay": {
      "post": {
        "description": "D139(e): queue again every dead (or dead and delivered) delivery\ncreated in [since, until), oldest first, at most REPLAY_LIMIT. Each\ngoes out with attempt reset and a fresh signature; consumers dedupe on\nthe event id as they do for a single redeliver. D140(k): audited, with\nthe window and the count, whoever asked (an API key, or the dashboard\nuser acting as one).",
        "operationId": "replay_deliveries_webhooks__webhook_id__deliveries_replay_post",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplayIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReplayOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Replay Deliveries",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook_id}/deliveries/{delivery_id}": {
      "get": {
        "description": "D139(d): one delivery with the payload as posted and every attempt\n(the dashboard's viewer reads the same dict).",
        "operationId": "get_delivery_webhooks__webhook_id__deliveries__delivery_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "maximum": 9223372036854775807,
              "minimum": -9223372036854775808,
              "title": "Delivery Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeliveryDetailOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Get Delivery",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook_id}/deliveries/{delivery_id}/redeliver": {
      "post": {
        "operationId": "redeliver_webhooks__webhook_id__deliveries__delivery_id__redeliver_post",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "delivery_id",
            "required": true,
            "schema": {
              "maximum": 9223372036854775807,
              "minimum": -9223372036854775808,
              "title": "Delivery Id",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RedeliverOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Redeliver",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook_id}/disable": {
      "post": {
        "operationId": "disable_webhook_webhooks__webhook_id__disable_post",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Disable Webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook_id}/ping": {
      "post": {
        "description": "D58(a): queue one delivery of type `ping`, signed like any other.\n`ping` is not subscribable (EVENT_TYPES is unchanged); the deliverer\nsends every queued row regardless of the endpoint's event filter.",
        "operationId": "ping_webhook_webhooks__webhook_id__ping_post",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Ping Webhook",
        "tags": [
          "webhooks"
        ]
      }
    },
    "/webhooks/{webhook_id}/rotate-secret": {
      "post": {
        "description": "D58(a): a new secret, shown once; the previous one keeps co-signing\ndeliveries for ROTATION_GRACE (`v1=<new>,v1=<old>` in the header) so a\nhandler can be switched without a signature outage. A second rotation\ninside the window retires the older secret immediately: at most two\nsecrets are ever live.",
        "operationId": "rotate_secret_webhooks__webhook_id__rotate_secret_post",
        "parameters": [
          {
            "in": "path",
            "name": "webhook_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Webhook Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookCreated"
                }
              }
            },
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/unauthenticated"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/live-mode-unavailable"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Workspace entitlement or access denied."
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Resource not found or not accessible to this key."
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Invalid state, conflict, or idempotency key conflict."
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request schema or semantic validation failed; inspect type and detail."
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/rate-limited; retry after Retry-After seconds."
          },
          "500": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "/problems/engine-error"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "API error; type identifies the stable problem."
          }
        },
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "summary": "Rotate Secret",
        "tags": [
          "webhooks"
        ]
      }
    }
  }
}
