Event Data

Events that are posted to your webhook URL will be sent as JSON. Below is an example of the data that will be sent.

The object data below is the same that you would receive when calling the Get Document or Get Template API endpoint.

{
    "event": {
        "hash": "102bb628c79c4cca904482add21ad8d9a5dff05f137788156457hubs8afbd83d",
        "time": 1689332249,
        "type": "document_viewed",
          
          // signer related to the event only applies to following events:
          // document_viewed, document_declined, document_signed
         "related_signer": {
             "email": "[email protected]",
             "name": "Christian Jordan"
         }
    },
    "data": {
        "object": {
            "id": "a692e1ce-9929-4541-adc7-61932bab39d3",
            "apply_signing_order": false,
            "archived": false,
            "copied_contacts": [],
            "custom_requester_name": null,
            "custom_requester_email": null,
            "created_at": "2022-08-19T00:21:48Z",
            "decline_redirect_url": null,
            "embedded": false,
            "embedded_edit_url": "",
            "expires_in": null,
            "fields": [
                [
                    {
                        "api_id": "Signature_1",
                        "page": 1,
                        "required": true,
                        "type": "Signature",
                        "value": "",
                        "width": "112.0",
                        "height": "32.0",
                        "x": 375,
                        "y": 206.5,
                        "recipient_id": "1"
                    }
                ]
            ],
            "message": "<p>Hey there,</p><p>Please review and complete this document. You can click on the document below to get started.</p>",
            "metadata": {},
            "name": "Example contract",
            "recipients": [
                {
                    "id": "1",
                    "email": "[email protected]",
                    "name": "Christian Jordan"
                }
            ],
            "redirect_url": null,
            "reminders": null,
            "requester_email_address": "[email protected]",
            "status": "Sent",
            "subject": "Please complete this example agreement",
            "test_mode": false,
            "updated_at": "2022-08-19T00:22:29Z",
            "files": [
                {
                    "name": "example-contract.docx",
                    "pages_number": 1
                }
            ]
        },
        "account_id": "7c98753-0acc-46ab-84b0-e96d085983e0"
    }
}

Note: a document_signed event is not emitted solely because a pre-signed template signature/initials was copied as document content, and event.related_signer only identifies a real recipient signing action.


SMS delivery events

The example below shows an SMS delivery event (document_sms_failed). Unlike the standard payload above, the event carries related_recipient instead of related_signer, and each recipient whose delivery method includes SMS carries a nested sms object.

{
  "event": {
    "hash": "102bb628c79c4cca904482add21ad8d9a5dff05f13778...",
    "time": 1689332249,
    "type": "document_sms_failed",
    "related_recipient": {
      "id": "1",
      "name": "Jane Doe",
      "email": "[email protected]",
      "phone_number_masked": "+1 ******1234",
      "delivery_method": "email_and_sms"
    }
  },
  "data": {
    "object": {
      "id": "a692e1ce-9929-4541-adc7-61932bab39d3",
      "status": "Sent",
      "name": "Example contract",
      "recipients": [
        {
          "id": "1",
          "email": "[email protected]",
          "name": "Jane Doe",
          "delivery_method": "email_and_sms",
          "sms": {
            "phone_number_masked": "+1 ******1234",
            "send_sms": false,
            "send_sms_delay": 0,
            "delivery_status": "failed",
            "message_type": "invite",
            "failed": true,
            "failed_details": "SMS delivery failed (provider error 30003)"
          }
        }
      ]
    },
    "account_id": "7c98753-0acc-46ab-84b0-e96d085983e0"
  }
}

Note: phone_number_masked shows the dialing code and last four digits with a fixed-width mask; the full number is never sent. delivery_status is one of queued, sent, failed, suppressed. message_type is one of invite, reminder, completed. Email-only recipients keep the existing shape (no sms key). For document_sms_opted_out, type is document_sms_opted_out and sms.delivery_status is suppressed.


Template events

For every template event (template_created, template_error, template_available, template_unavailable), data.object is the template object Get Template returns, with these differences:

  • embedded_edit_url is never included.
  • metadata is {} rather than null when empty.
  • subject, message and apply_signing_order are always present (null until the template has send settings).
  • Text fields with a custom regex also carry validation set to custom_regex, plus custom_validation_pattern and custom_validation_message, next to the API's validation_regex keys.

The example below shows a template_available event. The other three template events carry the same shape; only event.type changes.

{
  "event": {
    "hash": "d1b31594be8104f76904756024b2b500be9d0637add34a3089eb5fc0c0265161",
    "time": 1761663600,
    "type": "template_available"
  },
  "data": {
    "object": {
      "apply_signing_order": false,
      "message": "<p>Hey there,</p><p>Please review and complete this document.</p>",
      "subject": "Please complete Example contract",
      "id": "8f2c1e4a-5b7d-4c3e-9a1f-2d6b8e0c4f71",
      "archived": false,
      "created_at": "2025-10-20T14:02:11Z",
      "language": "en",
      "name": "Example contract template",
      "requester_email_address": "[email protected]",
      "status": "Available",
      "template_link": "https://www.signwell.com/new_doc/zUW1c47V0qKnSVOc/",
      "updated_at": "2025-10-20T14:05:42Z",
      "allow_decline": true,
      "allow_reassign": true,
      "api_application_id": null,
      "decline_redirect_url": null,
      "expires_in": null,
      "redirect_url": null,
      "reminders": true,
      "metadata": {},
      "fields": [
        [
          {
            "api_id": "TextField_1",
            "height": "19.0",
            "page": 1,
            "required": true,
            "type": "text",
            "value": "",
            "width": "86.0",
            "x": 60.0,
            "y": 80.0,
            "fixed_width": false,
            "label": "Full name",
            "validation": "no_text_validation",
            "placeholder_name": "Signer"
          },
          {
            "api_id": "TextField_2",
            "height": "19.0",
            "page": 1,
            "required": true,
            "type": "text",
            "value": "",
            "width": "86.0",
            "x": 60.0,
            "y": 120.0,
            "fixed_width": false,
            "label": "Agreement number",
            "validation": "custom_regex",
            "validation_regex": "^[A-Z]{3}-[0-9]{4}$",
            "validation_regex_error_message": "Use the format ABC-1234",
            "placeholder_name": "Signer",
            "custom_validation_pattern": "^[A-Z]{3}-[0-9]{4}$",
            "custom_validation_message": "Use the format ABC-1234"
          },
          {
            "api_id": "CheckBox_1",
            "height": "19.0",
            "page": 2,
            "required": true,
            "type": "checkbox",
            "value": null,
            "width": "19.0",
            "x": 60.0,
            "y": 640.0,
            "name": null,
            "placeholder_name": "Signer",
            "signing_elements_group_id": "503b6e63-eaa8-4133-bf58-8378076412e1"
          },
          {
            "api_id": "CheckBox_2",
            "height": "19.0",
            "page": 2,
            "required": true,
            "type": "checkbox",
            "value": null,
            "width": "19.0",
            "x": 100.0,
            "y": 640.0,
            "name": null,
            "placeholder_name": "Signer",
            "signing_elements_group_id": "503b6e63-eaa8-4133-bf58-8378076412e1"
          }
        ]
      ],
      "files": [
        {
          "name": "example-contract.pdf",
          "pages_number": 2
        }
      ],
      "copied_placeholders": [],
      "placeholders": [
        {
          "id": "1",
          "name": "Signer",
          "subject": null,
          "message": null,
          "signing_order": 1,
          "passcode_delivery": {
            "enabled": false,
            "methods": null,
            "expire_after_access": false
          },
          "attachment_requests": []
        }
      ],
      "checkbox_groups": [
        {
          "id": "503b6e63-eaa8-4133-bf58-8378076412e1",
          "group_name": "Terms",
          "recipient_id": null,
          "checkbox_ids": ["CheckBox_1", "CheckBox_2"],
          "validation": null,
          "required": false
        }
      ],
      "conditional_rules": []
    },
    "account_id": "7c98753-0acc-46ab-84b0-e96d085983e0",
    "workspace_id": "7c98753-0acc-46ab-84b0-e96d085983e0"
  }
}

Note: fields is grouped by file, one array per file in files. TextField_2 shows a custom-regex field carrying both key sets. CheckBox_1 and CheckBox_2 belong to the checkbox group listed in checkbox_groups.