{
  "openapi": "3.1.0",
  "info": {
    "title": "SignatureAPI: Events",
    "summary": "SignatureAPI is an API-first electronic signature platform.",
    "version": "1.18.0",
    "description": "SignatureAPI is a REST API for sending documents for electronic signature. It accepts JSON request bodies, returns JSON responses, and uses standard HTTP verbs and status codes.\n\n### Key concepts\n\nAn **envelope** is the central object. It holds documents and recipients, and manages the signing process from start to finish.\n\nA **document** is a PDF or DOCX file within an envelope. Documents contain **places** — interactive fields like signatures, initials, text inputs, checkboxes, and dropdowns positioned at specific locations.\n\nA **recipient** is a person who receives an envelope. There are three types:\n- **Signer** — signs documents\n- **Approver** — reviews and approves without signing\n- **Preparer** — fills in fields before the signer receives the documents\n\nA **ceremony** is the interactive session where a recipient authenticates and performs their actions. SignatureAPI supports three authentication methods: email link, email code, and custom.\n\nA **deliverable** is the final output — a signed PDF with an audit trail, generated after all recipients complete their actions.\n\nA **sender** is a verified email address that SignatureAPI sends signing requests on behalf of.\n\nAn **upload** is a file stored in SignatureAPI for use as a document source in envelopes.\n\n### HTTP Semantics\n\nWe use HTTP verbs GET, POST, DELETE as defined in RFC 9110, and PATCH as defined in RFC 5789.\n\nWe use the following HTTP Status codes for successful responses:\n\n- **200 OK**: Request succeeded for a GET, POST, or PATCH call.\n- **201 Created**: Request succeeded for a POST request that created a new resource. The response includes a Location header pointing to the newly created resource.\n\n### Versioning\n\nWe use [Semantic Versioning v2.0.0](https://semver.org/spec/v2.0.0.html):\n\n- We increment Major (the X in X.Y.Z) versions when we make a change that breaks backward compatibility. The current major version is 1.\n- We increment Minor (the Y in X.Y.Z) versions when we add backward compatible features.\n- We increment Patch (the Z in X.Y.Z) versions when we make backward compatible bug fixes or improvements in the documentation.\n\nSignatureAPI considers the following changes to break backward compatibility:\n\n- Removing or renaming fields, arguments, or enum values.\n- Removing endpoints.\n- Changing the type of fields in the response (for example, from string to integer).\n- Adding a new **required** request parameter.\n\nThese are not breaking changes:\n\n- Any additive change, such as adding endpoints, optional arguments, fields, or enum values.\n- Making a required request parameter optional.\n- Making a validation less restrictive.\n- Changes to error responses. _We do not recommend parsing error responses to perform business logic._\n- Changes to the order of fields returned in a response.\n- Changes to the length or format of opaque strings, such as object IDs, error messages, and other human-readable strings.\n- Adding new event types.\n- Changes in the structure and descriptions in this OpenAPI spec.",
    "contact": {
      "name": "Signature API, Inc.",
      "email": "support@signatureapi.com"
    },
    "termsOfService": "https://signatureapi.com/terms"
  },
  "servers": [
    {
      "description": "SignatureAPI Global Server.",
      "url": "https://api.signatureapi.com/v1"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Events",
      "description": "An **event** records a change or action in your account. Events are delivered via webhooks and available through the API.\n"
    }
  ],
  "paths": {
    "/envelopes/{envelopeId}/events": {
      "parameters": [
        {
          "$ref": "#/components/parameters/EnvelopeId"
        }
      ],
      "get": {
        "operationId": "ListEnvelopeEvents",
        "summary": "List envelope events",
        "x-audience": "public",
        "tags": [
          "Events"
        ],
        "description": "Returns a list of events for a specific envelope. Events are sorted by timestamp, with the most recent appearing first.\n\nResults include envelope events, recipient events, and deliverable events associated with this envelope. Use the `type` query parameter to filter by a specific event type.\n\nThe response is paginated. Use the `links.next` and `links.previous` URLs to navigate between pages.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/EnvelopeEventType"
          },
          {
            "$ref": "#/components/parameters/PaginationLimit"
          }
        ],
        "responses": {
          "200": {
            "description": "The list of envelope events was retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "links": {
                      "$ref": "#/components/schemas/Shared.PaginationLinks"
                    },
                    "data": {
                      "type": "array",
                      "description": "An array of envelope events.",
                      "items": {
                        "$ref": "#/components/schemas/Event.EnvelopeContextEvent"
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Shared.ClientError"
          },
          "5XX": {
            "$ref": "#/components/responses/Shared.ServerError"
          }
        }
      }
    },
    "/recipients/{recipientId}/events": {
      "parameters": [
        {
          "$ref": "#/components/parameters/RecipientId"
        }
      ],
      "get": {
        "operationId": "ListRecipientEvents",
        "summary": "List recipient events",
        "x-audience": "public",
        "tags": [
          "Events"
        ],
        "description": "Returns a list of events for a specific recipient. Events are sorted by timestamp, with the most recent appearing first.\n\nResults include only recipient events, such as delivery, signing, and bounce events. Use the `type` query parameter to filter by a specific event type.\n\nThe response is paginated. Use the `links.next` and `links.previous` URLs to navigate between pages.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/RecipientEventType"
          },
          {
            "$ref": "#/components/parameters/PaginationLimit"
          }
        ],
        "responses": {
          "200": {
            "description": "The list of recipient events was retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "links": {
                      "$ref": "#/components/schemas/Shared.PaginationLinks"
                    },
                    "data": {
                      "type": "array",
                      "description": "An array of recipient events.",
                      "items": {
                        "$ref": "#/components/schemas/Event.RecipientEvent"
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Shared.ClientError"
          },
          "5XX": {
            "$ref": "#/components/responses/Shared.ServerError"
          }
        }
      }
    },
    "/events": {
      "get": {
        "operationId": "ListEvents",
        "summary": "List all events",
        "x-audience": "public",
        "tags": [
          "Events"
        ],
        "description": "Returns a list of all events across your account. Events are sorted by timestamp, with the most recent appearing first.\n\nResults include envelope, recipient, deliverable, and sender events. Use the `type` query parameter to filter by a specific event type.\n\nThe response is paginated. Use the `links.next` and `links.previous` URLs to navigate between pages.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/EventType"
          },
          {
            "$ref": "#/components/parameters/PaginationLimit"
          }
        ],
        "responses": {
          "200": {
            "description": "The list of events was retrieved successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "links": {
                      "$ref": "#/components/schemas/Shared.PaginationLinks"
                    },
                    "data": {
                      "type": "array",
                      "description": "An array of events.",
                      "items": {
                        "$ref": "#/components/schemas/Event.Event"
                      }
                    }
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Shared.ClientError"
          },
          "5XX": {
            "$ref": "#/components/responses/Shared.ServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Authentication to the API is performed via an API key in the `X-API-Key` header.\n\nYour API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.\n"
      }
    },
    "schemas": {
      "Shared.PaginationLinks": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "title": "Pagination Links",
        "description": "Navigation links for cursor-based pagination. All list endpoints return results in reverse chronological order. Use the `next` and `previous` URLs to move between pages. Treat these URLs as opaque strings — do not parse or construct them yourself.\n",
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "next": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "A pre-built URL for fetching the next page of results. Returns `null` when you are on the last page. Send a GET request to this URL to load more results.\n",
            "example": "https://api.signatureapi.com/v1/envelopes?cursor=seq_0thJdKRhN4&limit=20"
          },
          "previous": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "A pre-built URL for fetching the previous page of results. Returns `null` when you are on the first page. Send a GET request to this URL to go back.\n",
            "example": "https://api.signatureapi.com/v1/envelopes?cursor=seq_7yNl3c0t&limit=20"
          }
        },
        "required": [
          "next",
          "previous"
        ]
      },
      "Envelope.Id": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "format": "uuid",
        "title": "Envelope Id",
        "description": "The unique identifier of the envelope, in UUID format.",
        "examples": [
          "5e5ace5e-bd1e-4d5a-bb1f-6a2b2e42cd13"
        ]
      },
      "Envelope.Metadata": {
        "x-schema-role": "property",
        "x-schema-direction": "any",
        "type": "object",
        "title": "Envelope Metadata",
        "description": "Set of key-value pairs to store additional information about the envelope. Use metadata to attach internal reference IDs, tracking numbers, or other data that connects envelopes to your systems.\n\nMetadata is included in all API responses and webhook payloads (in the `data.envelope_metadata` field), making it useful for correlating events with your records.\n\nUp to 10 keys are allowed. Keys can be up to 32 characters (letters, digits, and underscores). Values can be up to 1,000 characters.\n\nUse metadata only for ordinary business identifiers that are appropriate to store with an envelope.\n",
        "unevaluatedProperties": false,
        "maxProperties": 10,
        "default": {},
        "additionalProperties": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000
        },
        "propertyNames": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9_]*$",
          "minLength": 1,
          "maxLength": 32
        },
        "example": {
          "caseNumber": "AB5555510",
          "customer_name": "Doe Industries, LLC"
        }
      },
      "Document.Key": {
        "x-schema-role": "property",
        "x-schema-direction": "any",
        "title": "Document Key",
        "description": "A user-provided identifier for this document within the envelope. Must be unique within the envelope. Use the key to reference this document in other parts of the API.\n\nOnly lowercase letters, numbers, and underscores are allowed. Must start with a letter.\n\nIf not provided, a key is generated automatically.",
        "type": "string",
        "pattern": "^[a-z][a-z0-9_]*$",
        "minLength": 1,
        "maxLength": 32,
        "examples": [
          "agreement",
          "byod_policy"
        ]
      },
      "Recipient.Key": {
        "x-schema-role": "property",
        "x-schema-direction": "any",
        "title": "Recipient Key",
        "description": "A user-provided key that identifies a recipient within an envelope. Use the key to reference this recipient when assigning document places.\n\nThe key must start with a lowercase letter and can contain lowercase letters, numbers, and underscores. Maximum 32 characters.\n",
        "type": "string",
        "pattern": "^[a-z][a-z0-9_]*$",
        "minLength": 1,
        "maxLength": 32,
        "examples": [
          "explorer"
        ]
      },
      "Recipient.Id": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "title": "Recipient Id",
        "description": "The unique identifier of the recipient. Recipient IDs use the `re_` prefix.\n",
        "type": "string",
        "examples": [
          "re_MDGrLQX02X6eHBCL84mHI72"
        ]
      },
      "Recipient.Type": {
        "x-schema-role": "property",
        "x-schema-direction": "any",
        "title": "Recipient Type",
        "description": "The type of the recipient. Determines what actions the recipient can perform during the ceremony.\n\n| Type | Description |\n|------|-------------|\n| `signer` | Signs documents. Every envelope must have at least one signing recipient. |\n| `qualified_signer` | Signs with a qualified electronic signature through a qualified trust service provider. |\n| `approver` | Reviews and approves documents without signing. |\n| `preparer` | Fills in document fields on behalf of another party. |\n| `automatic_signer` | The signature is applied automatically by the system. |\n",
        "type": "string",
        "enum": [
          "signer",
          "qualified_signer",
          "approver",
          "preparer",
          "automatic_signer"
        ],
        "examples": [
          "signer"
        ]
      },
      "Recipient.Name": {
        "x-schema-role": "property",
        "x-schema-direction": "any",
        "type": "string",
        "title": "Recipient Name",
        "description": "The full name of the recipient. Appears in invitation emails and is pre-filled for typed signatures.\n",
        "minLength": 1,
        "maxLength": 500,
        "examples": [
          "Jeff Spender"
        ]
      },
      "Deliverable.Id": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Deliverable Id",
        "description": "The unique identifier of the deliverable.",
        "examples": [
          "del_LXRDwyTeJDVrWXmjwxsAGPq"
        ]
      },
      "Deliverable.Name": {
        "x-schema-role": "property",
        "x-schema-direction": "any",
        "title": "Deliverable Name",
        "description": "A user-provided name for this deliverable. Use this to identify deliverables when an envelope has more than one.\n\nMust start with a lowercase letter and contain only lowercase letters, numbers, and underscores.",
        "type": [
          "string",
          "null"
        ],
        "pattern": "^[a-z][a-z0-9_]*$",
        "minLength": 1,
        "maxLength": 32,
        "examples": [
          "hr_pack",
          "compliance_acceptance"
        ]
      },
      "Deliverable.Type": {
        "x-schema-role": "property",
        "x-schema-direction": "any",
        "type": "string",
        "title": "Deliverable Type",
        "enum": [
          "simple",
          "standard"
        ],
        "description": "The type of the deliverable.\n\n- `standard` -- Includes signed documents and an audit log with a certificate of completion.\n- `simple` -- Includes signed documents only, without an audit log.\n",
        "examples": [
          "standard"
        ]
      },
      "Deliverable.Url": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": [
          "string",
          "null"
        ],
        "title": "Deliverable Url",
        "format": "uri",
        "description": "The URL to download the deliverable once it has been generated. If the deliverable has not yet been generated, this will be `null`.\n\n## Pre-signed URLs (Default)\n\nBy default, this is a short-lived, pre-signed URL that requires no further authentication to download.\n\nThe URL expires after 1 hour. If the link has expired, you can generate a new one by retrieving the deliverable again.\n\n## Authenticated URLs\n\nIf you requested authenticated URLs, for example to achieve HIPAA compliance, the URL must be accessed using the API key, in the same way as other requests to this API.\n\nAuthenticated URLs do not expire.\n",
        "examples": [
          "https://www.example.com/repository/audit-log.pdf"
        ]
      },
      "Deliverable.IncludedDocuments": {
        "x-schema-role": "model",
        "x-schema-direction": "any",
        "title": "Included Documents",
        "type": "array",
        "description": "The keys of the documents to include in the deliverable.\n\nBy default, all documents in the envelope are included. Use this field to create a deliverable with only a subset of documents, for example to generate separate deliverables for different recipients.",
        "examples": [
          [
            "contract",
            "addendum"
          ]
        ],
        "items": {
          "$ref": "#/components/schemas/Document.Key"
        },
        "minItems": 1,
        "maxItems": 10
      },
      "Shared.Problem": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "object",
        "description": "An error response following the RFC 9457 Problem Details format. The API returns this object with a `application/problem+json` content type when a request fails. Use the `type` URL to identify the error programmatically and the `detail` field to understand what went wrong.\n",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "description": "A URL that identifies the problem type. Points to documentation explaining the error.",
            "format": "uri",
            "example": "https://signatureapi.com/docs/v1/errors/invalid-api-key"
          },
          "title": {
            "type": "string",
            "description": "A short, human-readable summary of the problem type.",
            "example": "Invalid API Key"
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status code for this error. Matches the status code in the HTTP response.",
            "minimum": 100,
            "maximum": 599,
            "example": 401
          },
          "detail": {
            "type": "string",
            "description": "A human-readable explanation specific to this occurrence of the problem.",
            "example": "Please provide a valid API key in the X-API-Key header."
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ]
      },
      "Envelope.CancelReason": {
        "x-schema-role": "property",
        "x-schema-direction": "any",
        "type": [
          "string",
          "null"
        ],
        "title": "Envelope Cancel Reason",
        "description": "An optional explanation for why the envelope was canceled. This is for internal use only and is not shown to recipients.\n\nThe reason is included in the `envelope.canceled` webhook event payload, making it available for your records and automated workflows.\n",
        "minLength": 1,
        "maxLength": 2000,
        "examples": [
          "Mars is full. No more explorers allowed."
        ]
      },
      "Event.TypeForEnvelope": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "description": "The type of the event. When listing envelope events, the available types include envelope, recipient, and deliverable events associated with that envelope.",
        "x-enum-descriptions": {
          "envelope.created": "A new envelope was created.",
          "envelope.started": "The envelope finished processing and is ready to send to recipients.",
          "envelope.completed": "All recipients completed (for example, signed) the envelope.",
          "envelope.failed": "The envelope encountered an error and moved to a failed status.",
          "envelope.canceled": "The envelope was canceled through the Cancel Envelope endpoint.",
          "recipient.released": "The recipient is ready to receive a signing request. Status changed to pending.",
          "recipient.sent": "The signing request email was delivered to the recipient.",
          "recipient.accessed": "The recipient entered the signing ceremony.",
          "recipient.viewed": "The recipient authenticated and viewed the documents.",
          "recipient.completed": "The recipient finished signing. Status changed to completed.",
          "recipient.soft_bounced": "The email to the recipient temporarily bounced (for example, full mailbox).",
          "recipient.hard_bounced": "The email to the recipient permanently bounced (for example, invalid address).",
          "recipient.rejected": "The recipient declined the envelope.",
          "recipient.failed": "The recipient encountered a general failure.",
          "recipient.replaced": "The recipient was replaced with a new recipient.",
          "recipient.resent": "The signing request was resent to the recipient.",
          "deliverable.generated": "The signed document was generated and is available for download.",
          "deliverable.failed": "The signed document failed to generate."
        },
        "example": "recipient.completed",
        "enum": [
          "envelope.created",
          "envelope.started",
          "envelope.completed",
          "envelope.failed",
          "envelope.canceled",
          "recipient.released",
          "recipient.sent",
          "recipient.accessed",
          "recipient.viewed",
          "recipient.completed",
          "recipient.soft_bounced",
          "recipient.hard_bounced",
          "recipient.rejected",
          "recipient.failed",
          "recipient.replaced",
          "recipient.resent",
          "deliverable.generated",
          "deliverable.failed"
        ]
      },
      "Event.Id": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "description": "Unique identifier for the event. Uses the `evt_` prefix.",
        "example": "evt_1sAAaVfabdt0esVjmSTmLA"
      },
      "Event.Timestamp": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "title": "Event Timestamp",
        "description": "When the event occurred, in ISO 8601 format.",
        "example": "2025-07-15T14:30:00Z",
        "type": "string",
        "format": "date-time"
      },
      "Event.EventBase": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "description": "Base properties shared by all events. Every event includes a unique identifier and a timestamp recording when the event occurred.",
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/Event.Id"
          },
          "timestamp": {
            "$ref": "#/components/schemas/Event.Timestamp"
          }
        },
        "required": [
          "id",
          "timestamp"
        ]
      },
      "Event.Type": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "description": "The type of the event. Determines the category and the shape of the `data` payload. Event types are grouped into four categories: envelope, recipient, deliverable, and sender.",
        "x-enum-descriptions": {
          "envelope.created": "A new envelope was created.",
          "envelope.started": "The envelope finished processing and is ready to send to recipients.",
          "envelope.completed": "All recipients completed (for example, signed) the envelope.",
          "envelope.failed": "The envelope encountered an error and moved to a failed status.",
          "envelope.canceled": "The envelope was canceled through the Cancel Envelope endpoint.",
          "recipient.released": "The recipient is ready to receive a signing request. Status changed to pending.",
          "recipient.sent": "The signing request email was delivered to the recipient.",
          "recipient.accessed": "The recipient entered the signing ceremony.",
          "recipient.viewed": "The recipient authenticated and viewed the documents.",
          "recipient.completed": "The recipient finished signing. Status changed to completed.",
          "recipient.soft_bounced": "The email to the recipient temporarily bounced (for example, full mailbox).",
          "recipient.hard_bounced": "The email to the recipient permanently bounced (for example, invalid address).",
          "recipient.rejected": "The recipient declined the envelope.",
          "recipient.failed": "The recipient encountered a general failure.",
          "recipient.replaced": "The recipient was replaced with a new recipient.",
          "recipient.resent": "The signing request was resent to the recipient.",
          "deliverable.generated": "The signed document was generated and is available for download.",
          "deliverable.failed": "The signed document failed to generate.",
          "sender.created": "A verification request was initiated for a sender.",
          "sender.verified": "The sender completed email verification.",
          "sender.failed": "The sender verification failed.",
          "sender.deleted": "The sender was deleted."
        },
        "example": "envelope.completed",
        "enum": [
          "envelope.created",
          "envelope.started",
          "envelope.completed",
          "envelope.failed",
          "envelope.canceled",
          "recipient.released",
          "recipient.sent",
          "recipient.accessed",
          "recipient.viewed",
          "recipient.completed",
          "recipient.soft_bounced",
          "recipient.hard_bounced",
          "recipient.rejected",
          "recipient.failed",
          "recipient.replaced",
          "recipient.resent",
          "deliverable.generated",
          "deliverable.failed",
          "sender.created",
          "sender.verified",
          "sender.failed",
          "sender.deleted"
        ]
      },
      "Event.ObjectType": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "description": "The type of object this event refers to. Indicates whether the event relates to an envelope, recipient, deliverable, or sender.",
        "x-enum-descriptions": {
          "envelope": "The event relates to an envelope.",
          "recipient": "The event relates to a recipient.",
          "deliverable": "The event relates to a deliverable (signed document).",
          "sender": "The event relates to a sender."
        },
        "example": "envelope",
        "enum": [
          "envelope",
          "recipient",
          "deliverable",
          "sender"
        ]
      },
      "Event.EnvelopeEventData": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "object",
        "description": "Data payload for envelope events. Contains the envelope identifier, object type, and any metadata attached to the envelope.",
        "properties": {
          "envelope_id": {
            "$ref": "#/components/schemas/Envelope.Id"
          },
          "object_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Event.ObjectType"
              },
              {
                "const": "envelope"
              }
            ]
          },
          "object_id": {
            "$ref": "#/components/schemas/Envelope.Id"
          },
          "envelope_metadata": {
            "$ref": "#/components/schemas/Envelope.Metadata"
          }
        },
        "required": [
          "envelope_id",
          "object_type",
          "object_id",
          "envelope_metadata"
        ]
      },
      "Event.EnvelopeCreated": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Envelope Created Event",
        "description": "Fired when a new envelope is created. This is the first event in the envelope lifecycle.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "envelope.created"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.EnvelopeEventData"
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.EnvelopeStarted": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Envelope Started Event",
        "description": "Fired when the envelope finishes processing and is ready to send to recipients. The envelope status changes from `processing` to `in_progress`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "envelope.started"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.EnvelopeEventData"
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.EnvelopeCompleted": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Envelope Completed Event",
        "description": "Fired when all recipients have completed (for example, signed) the envelope. The envelope status changes from `in_progress` to `completed`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "envelope.completed"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.EnvelopeEventData"
                  }
                ]
              }
            }
          }
        ]
      },
      "Envelope.FailDetail": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Envelope Fail Detail",
        "description": "A human-readable explanation of what caused the envelope to fail. This detail is included in the `envelope.failed` webhook event payload. Failures are very rare and automatically trigger an alert to the SignatureAPI team.\n",
        "examples": [
          "Could not parse input PDF document."
        ]
      },
      "Event.EnvelopeFailed": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Envelope Failed Event",
        "description": "Fired when the envelope encounters an error. The envelope status changes to `failed`. The `data.detail` field contains the reason for the failure.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "envelope.failed"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.EnvelopeEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "detail": {
                        "$ref": "#/components/schemas/Envelope.FailDetail"
                      }
                    },
                    "required": [
                      "detail"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.EnvelopeCanceled": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Envelope Canceled Event",
        "description": "Fired when the envelope is canceled through the Cancel Envelope endpoint. The envelope status changes to `canceled`. The `data.reason` field contains the cancellation reason, if one was provided.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "envelope.canceled"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.EnvelopeEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "$ref": "#/components/schemas/Envelope.CancelReason"
                      }
                    },
                    "required": [
                      "reason"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.RecipientEventData": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "object",
        "description": "Data payload for recipient events. Contains the recipient identifier, the parent envelope identifier, envelope metadata, and recipient details such as type and key.",
        "properties": {
          "envelope_id": {
            "$ref": "#/components/schemas/Envelope.Id"
          },
          "object_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Event.ObjectType"
              },
              {
                "const": "recipient"
              }
            ]
          },
          "object_id": {
            "$ref": "#/components/schemas/Recipient.Id"
          },
          "envelope_metadata": {
            "$ref": "#/components/schemas/Envelope.Metadata"
          },
          "recipient_type": {
            "$ref": "#/components/schemas/Recipient.Type"
          },
          "recipient_key": {
            "$ref": "#/components/schemas/Recipient.Key"
          }
        },
        "required": [
          "envelope_id",
          "object_type",
          "object_id",
          "envelope_metadata",
          "recipient_type",
          "recipient_key"
        ]
      },
      "Event.RecipientReleased": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Released Event",
        "description": "Fired when a recipient is ready to receive a signing request. The recipient status changes to `pending`.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.released"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.RecipientSent": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Sent Event",
        "description": "Fired when the signing request email is delivered to the recipient.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.sent"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  }
                ]
              }
            }
          }
        ]
      },
      "Recipient.IP": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Recipient IP Address",
        "description": "The IP address of the recipient when they accessed the ceremony. Captured from the recipient's browser session.\n\nAvailable in `recipient.accessed` events.\n",
        "examples": [
          "123.122.990.22",
          "2001:0db8:85a3:0000:0000:8a2e:0370:7334"
        ]
      },
      "Recipient.UserAgent": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Recipient User Agent",
        "description": "The browser user agent string of the recipient when they accessed the ceremony. Identifies the recipient's browser and operating system.\n\nAvailable in `recipient.accessed` events.\n",
        "examples": [
          "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
        ]
      },
      "Recipient.SessionId": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Recipient Session ID",
        "description": "A unique identifier for the recipient's ceremony session. Use this to correlate multiple events from the same session, such as `recipient.accessed`, `recipient.viewed`, and `recipient.completed`.\n",
        "examples": [
          "ses_2X6eHBCL84MDGrLQX0mHI72"
        ]
      },
      "Event.RecipientAccessed": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Accessed Event",
        "description": "Fired when the recipient enters the signing ceremony. Emitted at most once every 60 seconds per IP address and user agent to reduce duplicates. The `data` includes the recipient's IP address, user agent, and session ID.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.accessed"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "ip": {
                        "$ref": "#/components/schemas/Recipient.IP"
                      },
                      "user_agent": {
                        "$ref": "#/components/schemas/Recipient.UserAgent"
                      },
                      "session_id": {
                        "$ref": "#/components/schemas/Recipient.SessionId"
                      }
                    },
                    "required": [
                      "ip",
                      "user_agent",
                      "session_id"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.RecipientViewed": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Viewed Event",
        "description": "Fired after the recipient authenticates and views the documents in the signing ceremony. The `data` includes the session ID.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.viewed"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "session_id": {
                        "$ref": "#/components/schemas/Recipient.SessionId"
                      }
                    },
                    "required": [
                      "session_id"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.RecipientCompleted": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Completed Event",
        "description": "Fired when the recipient finishes signing. The recipient status changes to `completed`. The `data` includes the session ID.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.completed"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "session_id": {
                        "$ref": "#/components/schemas/Recipient.SessionId"
                      }
                    }
                  }
                ]
              }
            }
          }
        ]
      },
      "Recipient.BounceDetail": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Recipient Bounce Detail",
        "description": "A human-readable explanation of why the email bounced. Contains information from the remote email server, such as \"Mailbox Full\" or \"User Unknown.\"\n\nPresent when the recipient status is `soft_bounced` or `hard_bounced`.\n",
        "examples": [
          "Permanent/General, diagnostic code: smtp; 550 5.1.1 As requested: user unknown <bounce+mlkav@example.com>"
        ]
      },
      "Event.RecipientSoftBounced": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Soft Bounced Event",
        "description": "Fired when the email to the recipient temporarily bounces. Common causes include a full mailbox or a temporary server issue. The `data.detail` field contains the bounce reason.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.soft_bounced"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "detail": {
                        "$ref": "#/components/schemas/Recipient.BounceDetail"
                      }
                    },
                    "required": [
                      "detail"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.RecipientHardBounced": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Hard Bounced Event",
        "description": "Fired when the email to the recipient permanently bounces. Common causes include an invalid email address. After a hard bounce, you cannot send additional requests to this recipient without using the Replace Recipient endpoint. The `data.detail` field contains the bounce reason.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.hard_bounced"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "detail": {
                        "$ref": "#/components/schemas/Recipient.BounceDetail"
                      }
                    },
                    "required": [
                      "detail"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Recipient.RejectReason": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Recipient Reject Reason",
        "description": "An explanation provided by the recipient for rejecting the envelope. The recipient may optionally enter a reason during the ceremony when they decline to sign.\n\nPresent when the recipient status is `rejected`. May be empty if the recipient did not provide a reason.\n",
        "maxLength": 2000,
        "examples": [
          "Not the terms we agreed to on June."
        ]
      },
      "Event.RecipientRejected": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Rejected Event",
        "description": "Fired when the recipient declines the envelope. The `data.reason` field contains the rejection reason if the recipient provided one. The `data` includes the session ID.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.rejected"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "reason": {
                        "$ref": "#/components/schemas/Recipient.RejectReason"
                      },
                      "session_id": {
                        "$ref": "#/components/schemas/Recipient.SessionId"
                      }
                    },
                    "required": [
                      "reason",
                      "session_id"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Recipient.FailDetail": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Recipient Fail Detail",
        "description": "A human-readable explanation of why the recipient failed. For example, the recipient's email may be on a blocklist.\n\nPresent when the recipient status is `failed`.\n",
        "examples": [
          "Recipient in email blocklist."
        ]
      },
      "Event.RecipientFailed": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Failed Event",
        "description": "Fired when the recipient encounters a general failure. The `data.detail` field contains the failure reason.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.failed"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "detail": {
                        "$ref": "#/components/schemas/Recipient.FailDetail"
                      }
                    },
                    "required": [
                      "detail"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.RecipientReplaced": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Replaced Event",
        "description": "Fired when the recipient is replaced with a new recipient through the Replace Recipient endpoint. The `data` includes the new recipient's ID and name.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.replaced"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "new_recipient_id": {
                        "$ref": "#/components/schemas/Recipient.Id"
                      },
                      "new_recipient_name": {
                        "$ref": "#/components/schemas/Recipient.Name"
                      }
                    },
                    "required": [
                      "new_recipient_id",
                      "new_recipient_name"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.RecipientResent": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Recipient Resent Event",
        "description": "Fired when the signing request is resent to the recipient.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "recipient.resent"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.RecipientEventData"
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.DeliverableEventData": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "object",
        "description": "Data payload for deliverable events. Contains the deliverable identifier, the parent envelope identifier, envelope metadata, deliverable type, name, and the list of included documents.",
        "properties": {
          "envelope_id": {
            "$ref": "#/components/schemas/Envelope.Id"
          },
          "object_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Event.ObjectType"
              },
              {
                "const": "deliverable"
              }
            ]
          },
          "object_id": {
            "$ref": "#/components/schemas/Deliverable.Id"
          },
          "envelope_metadata": {
            "$ref": "#/components/schemas/Envelope.Metadata"
          },
          "deliverable_type": {
            "$ref": "#/components/schemas/Deliverable.Type"
          },
          "deliverable_name": {
            "$ref": "#/components/schemas/Deliverable.Name"
          },
          "included_documents": {
            "$ref": "#/components/schemas/Deliverable.IncludedDocuments"
          }
        },
        "required": [
          "envelope_id",
          "object_type",
          "object_id",
          "envelope_metadata",
          "deliverable_type",
          "deliverable_name",
          "included_documents"
        ]
      },
      "Event.DeliverableGenerated": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Deliverable Generated Event",
        "description": "Fired when the signed document is generated and available for download. The `data.url` field contains a pre-signed, short-lived download link. If the link expires, retrieve a new one through the Get Deliverable endpoint.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "deliverable.generated"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.DeliverableEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "url": {
                        "$ref": "#/components/schemas/Deliverable.Url"
                      }
                    },
                    "required": [
                      "url"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Deliverable.FailDetail": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Deliverable Fail Detail",
        "description": "A human-readable explanation of why the deliverable failed to generate. Only present when the deliverable status is `failed`.",
        "examples": [
          "Recipient in email blocklist."
        ]
      },
      "Event.DeliverableFailed": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Deliverable Failed Event",
        "description": "Fired when the signed document fails to generate. The `data.detail` field contains the failure reason.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "deliverable.failed"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.DeliverableEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "detail": {
                        "$ref": "#/components/schemas/Deliverable.FailDetail"
                      }
                    },
                    "required": [
                      "detail"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.EnvelopeContextEvent": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Envelope Event",
        "description": "An event associated with an envelope. Includes envelope events, recipient events, and deliverable events that occurred in the context of a specific envelope. The `type` field determines which event schema applies.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/Event.EnvelopeCreated"
          },
          {
            "$ref": "#/components/schemas/Event.EnvelopeStarted"
          },
          {
            "$ref": "#/components/schemas/Event.EnvelopeCompleted"
          },
          {
            "$ref": "#/components/schemas/Event.EnvelopeFailed"
          },
          {
            "$ref": "#/components/schemas/Event.EnvelopeCanceled"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientReleased"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientSent"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientAccessed"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientViewed"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientCompleted"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientSoftBounced"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientHardBounced"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientRejected"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientFailed"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientReplaced"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientResent"
          },
          {
            "$ref": "#/components/schemas/Event.DeliverableGenerated"
          },
          {
            "$ref": "#/components/schemas/Event.DeliverableFailed"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "envelope.created": "#/components/schemas/Event.EnvelopeCreated",
            "envelope.started": "#/components/schemas/Event.EnvelopeStarted",
            "envelope.completed": "#/components/schemas/Event.EnvelopeCompleted",
            "envelope.failed": "#/components/schemas/Event.EnvelopeFailed",
            "envelope.canceled": "#/components/schemas/Event.EnvelopeCanceled",
            "recipient.released": "#/components/schemas/Event.RecipientReleased",
            "recipient.sent": "#/components/schemas/Event.RecipientSent",
            "recipient.accessed": "#/components/schemas/Event.RecipientAccessed",
            "recipient.viewed": "#/components/schemas/Event.RecipientViewed",
            "recipient.completed": "#/components/schemas/Event.RecipientCompleted",
            "recipient.soft_bounced": "#/components/schemas/Event.RecipientSoftBounced",
            "recipient.hard_bounced": "#/components/schemas/Event.RecipientHardBounced",
            "recipient.rejected": "#/components/schemas/Event.RecipientRejected",
            "recipient.failed": "#/components/schemas/Event.RecipientFailed",
            "recipient.replaced": "#/components/schemas/Event.RecipientReplaced",
            "recipient.resent": "#/components/schemas/Event.RecipientResent",
            "deliverable.generated": "#/components/schemas/Event.DeliverableGenerated",
            "deliverable.failed": "#/components/schemas/Event.DeliverableFailed"
          }
        }
      },
      "Event.TypeForRecipient": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "description": "The type of the event. When listing recipient events, only recipient event types are available.",
        "x-enum-descriptions": {
          "recipient.released": "The recipient is ready to receive a signing request. Status changed to pending.",
          "recipient.sent": "The signing request email was delivered to the recipient.",
          "recipient.accessed": "The recipient entered the signing ceremony.",
          "recipient.viewed": "The recipient authenticated and viewed the documents.",
          "recipient.completed": "The recipient finished signing. Status changed to completed.",
          "recipient.soft_bounced": "The email to the recipient temporarily bounced (for example, full mailbox).",
          "recipient.hard_bounced": "The email to the recipient permanently bounced (for example, invalid address).",
          "recipient.rejected": "The recipient declined the envelope.",
          "recipient.failed": "The recipient encountered a general failure.",
          "recipient.replaced": "The recipient was replaced with a new recipient.",
          "recipient.resent": "The signing request was resent to the recipient."
        },
        "example": "recipient.completed",
        "enum": [
          "recipient.released",
          "recipient.sent",
          "recipient.accessed",
          "recipient.viewed",
          "recipient.completed",
          "recipient.soft_bounced",
          "recipient.hard_bounced",
          "recipient.rejected",
          "recipient.failed",
          "recipient.replaced",
          "recipient.resent"
        ]
      },
      "Event.RecipientEvent": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "description": "An event associated with a recipient. Tracks the recipient's progress through the signing lifecycle, from release to completion, as well as delivery issues and actions like replacement or resending. The `type` field determines which event schema applies.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/Event.RecipientReleased"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientSent"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientAccessed"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientViewed"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientCompleted"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientSoftBounced"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientHardBounced"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientRejected"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientFailed"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientReplaced"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientResent"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "recipient.released": "#/components/schemas/Event.RecipientReleased",
            "recipient.sent": "#/components/schemas/Event.RecipientSent",
            "recipient.accessed": "#/components/schemas/Event.RecipientAccessed",
            "recipient.viewed": "#/components/schemas/Event.RecipientViewed",
            "recipient.completed": "#/components/schemas/Event.RecipientCompleted",
            "recipient.soft_bounced": "#/components/schemas/Event.RecipientSoftBounced",
            "recipient.hard_bounced": "#/components/schemas/Event.RecipientHardBounced",
            "recipient.rejected": "#/components/schemas/Event.RecipientRejected",
            "recipient.failed": "#/components/schemas/Event.RecipientFailed",
            "recipient.replaced": "#/components/schemas/Event.RecipientReplaced",
            "recipient.resent": "#/components/schemas/Event.RecipientResent"
          }
        }
      },
      "Sender.Id": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Sender ID",
        "description": "The unique identifier of the sender.",
        "examples": [
          "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
        ]
      },
      "Sender.Email": {
        "x-schema-role": "property",
        "x-schema-direction": "any",
        "title": "Sender Email",
        "description": "The email address of the sender. SignatureAPI sends signing request emails to recipients on behalf of this address.",
        "type": "string",
        "format": "email",
        "maxLength": 320,
        "example": "john@example.com"
      },
      "Event.SenderEventData": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "object",
        "description": "Data payload for sender events. Contains the sender identifier, object type, and the sender's email address.",
        "properties": {
          "object_type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Event.ObjectType"
              },
              {
                "const": "sender"
              }
            ]
          },
          "object_id": {
            "$ref": "#/components/schemas/Sender.Id"
          },
          "email": {
            "$ref": "#/components/schemas/Sender.Email"
          }
        },
        "required": [
          "object_type",
          "object_id",
          "email"
        ]
      },
      "Event.SenderCreated": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Sender Created Event",
        "description": "Fired when a verification request is initiated for a sender email address.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "sender.created"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.SenderEventData"
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.SenderVerified": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Sender Verified Event",
        "description": "Fired when the sender completes email verification.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "sender.verified"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.SenderEventData"
                  }
                ]
              }
            }
          }
        ]
      },
      "Sender.FailDetail": {
        "x-schema-role": "property",
        "x-schema-direction": "output",
        "type": "string",
        "title": "Sender Fail Detail",
        "description": "A human-readable explanation of why sender verification failed. Possible reasons include a hard or soft bounce of the verification email, or an internal error.",
        "examples": [
          "Verification email bounced"
        ]
      },
      "Event.SenderFailed": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Sender Failed Event",
        "description": "Fired when sender verification fails. The `data.detail` field contains the failure reason, such as an undeliverable verification email.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "sender.failed"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.SenderEventData"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "detail": {
                        "$ref": "#/components/schemas/Sender.FailDetail"
                      }
                    },
                    "required": [
                      "detail"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.SenderDeleted": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Sender Deleted Event",
        "description": "Fired when a sender is deleted from the account.",
        "allOf": [
          {
            "$ref": "#/components/schemas/Event.EventBase"
          },
          {
            "type": "object",
            "required": [
              "type",
              "data"
            ],
            "properties": {
              "type": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.Type"
                  },
                  {
                    "const": "sender.deleted"
                  }
                ]
              },
              "data": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/Event.SenderEventData"
                  }
                ]
              }
            }
          }
        ]
      },
      "Event.Event": {
        "x-schema-role": "model",
        "x-schema-direction": "output",
        "title": "Event",
        "description": "An event records a change or action in your account. Each event has a `type` field that determines its category and the shape of its `data` payload. Events fall into four categories: envelope events, recipient events, deliverable events, and sender events. You can receive events through webhooks or retrieve them through the API.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/Event.EnvelopeCreated"
          },
          {
            "$ref": "#/components/schemas/Event.EnvelopeStarted"
          },
          {
            "$ref": "#/components/schemas/Event.EnvelopeCompleted"
          },
          {
            "$ref": "#/components/schemas/Event.EnvelopeFailed"
          },
          {
            "$ref": "#/components/schemas/Event.EnvelopeCanceled"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientReleased"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientSent"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientAccessed"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientViewed"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientCompleted"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientSoftBounced"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientHardBounced"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientRejected"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientFailed"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientReplaced"
          },
          {
            "$ref": "#/components/schemas/Event.RecipientResent"
          },
          {
            "$ref": "#/components/schemas/Event.DeliverableGenerated"
          },
          {
            "$ref": "#/components/schemas/Event.DeliverableFailed"
          },
          {
            "$ref": "#/components/schemas/Event.SenderCreated"
          },
          {
            "$ref": "#/components/schemas/Event.SenderVerified"
          },
          {
            "$ref": "#/components/schemas/Event.SenderFailed"
          },
          {
            "$ref": "#/components/schemas/Event.SenderDeleted"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "envelope.created": "#/components/schemas/Event.EnvelopeCreated",
            "envelope.started": "#/components/schemas/Event.EnvelopeStarted",
            "envelope.completed": "#/components/schemas/Event.EnvelopeCompleted",
            "envelope.failed": "#/components/schemas/Event.EnvelopeFailed",
            "envelope.canceled": "#/components/schemas/Event.EnvelopeCanceled",
            "recipient.released": "#/components/schemas/Event.RecipientReleased",
            "recipient.sent": "#/components/schemas/Event.RecipientSent",
            "recipient.accessed": "#/components/schemas/Event.RecipientAccessed",
            "recipient.viewed": "#/components/schemas/Event.RecipientViewed",
            "recipient.completed": "#/components/schemas/Event.RecipientCompleted",
            "recipient.soft_bounced": "#/components/schemas/Event.RecipientSoftBounced",
            "recipient.hard_bounced": "#/components/schemas/Event.RecipientHardBounced",
            "recipient.rejected": "#/components/schemas/Event.RecipientRejected",
            "recipient.failed": "#/components/schemas/Event.RecipientFailed",
            "recipient.replaced": "#/components/schemas/Event.RecipientReplaced",
            "recipient.resent": "#/components/schemas/Event.RecipientResent",
            "deliverable.generated": "#/components/schemas/Event.DeliverableGenerated",
            "deliverable.failed": "#/components/schemas/Event.DeliverableFailed",
            "sender.created": "#/components/schemas/Event.SenderCreated",
            "sender.verified": "#/components/schemas/Event.SenderVerified",
            "sender.failed": "#/components/schemas/Event.SenderFailed",
            "sender.deleted": "#/components/schemas/Event.SenderDeleted"
          }
        }
      }
    },
    "parameters": {
      "PaginationLimit": {
        "name": "limit",
        "in": "query",
        "description": "The maximum number of objects to return in the response.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 20,
          "default": 20
        }
      },
      "EnvelopeId": {
        "name": "envelopeId",
        "in": "path",
        "description": "The unique identifier of an envelope.",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/Envelope.Id"
        }
      },
      "EnvelopeEventType": {
        "name": "type",
        "in": "query",
        "description": "Filter by event type.",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/Event.TypeForEnvelope"
        }
      },
      "RecipientId": {
        "name": "recipientId",
        "in": "path",
        "description": "The unique identifier of a recipient.",
        "required": true,
        "schema": {
          "$ref": "#/components/schemas/Recipient.Id"
        }
      },
      "RecipientEventType": {
        "name": "type",
        "in": "query",
        "description": "Filter by event type.",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/Event.TypeForRecipient"
        }
      },
      "EventType": {
        "name": "type",
        "in": "query",
        "description": "Filter by event type.",
        "required": false,
        "schema": {
          "$ref": "#/components/schemas/Event.Type"
        }
      }
    },
    "responses": {
      "Shared.ClientError": {
        "description": "The request cannot be processed due to an issue on the client's side. This may include invalid request format, insufficient permissions, or requesting non-existent resources. The client should review and correct the request.\n\nThis error covers HTTP status codes in the 400 to 499 range. The most common are:\n\n- 400 Bad Request (`bad-request`: the request body is not valid JSON)\n- 401 Unauthorized\n- 402 Payment Required (`live-mode-paused`: live API access is paused because an invoice is unpaid; test keys keep working)\n- 403 Forbidden\n- 409 Conflict\n- 410 Gone\n- 404 Not Found\n- 413 Request Too Large (`request-too-large`: a JSON request body exceeds 1500 KiB, a form-encoded body exceeds 100 KiB, or a form-encoded body has too many parameters)\n- 415 Unsupported Media Type (`unsupported-media-type`: the request body's charset or content encoding is not supported)\n- 422 Unprocessable Content.\n",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Shared.Problem"
            },
            "example": {
              "type": "https://signatureapi.com/docs/v1/errors/api-key-required",
              "title": "The API Key is required",
              "status": 401,
              "detail": "A valid API key is required in the X-API-Key header of all requests."
            }
          }
        }
      },
      "Shared.ServerError": {
        "description": "The request cannot be processed due to an issue on the server's side. The client can retry the request in a few minutes, or contact support if the error persists.\n",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/schemas/Shared.Problem"
            },
            "example": {
              "type": "https://signatureapi.com/docs/v1/errors/server-error",
              "title": "Internal Server Error",
              "status": 500,
              "detail": "There was a problem in our server and your request was not fulfilled. Try again later. If the error persists, please contact support.\n"
            }
          }
        }
      }
    }
  }
}
