---
updatedAt: 2026-04-29T12:20:04.000Z
agentTools:
  projectIndex: https://developers.signwell.com/llms.txt
---

# Update and Send Document

Updates a draft document and sends it to be signed by recipients. `subject` and `message` apply to email notifications only; SMS notifications always use fixed system templates.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "SignWell Developer API",
    "description": "API for creating, managing, and tracking electronic signature workflows.",
    "version": "v1",
    "termsOfService": "https://www.signwell.com/terms/",
    "contact": {
      "email": "support@signwell.com"
    }
  },
  "tags": [
    {
      "name": "Document",
      "description": "Create, send, and manage documents for electronic signing."
    }
  ],
  "paths": {
    "/api/v1/documents/{id}/send": {
      "post": {
        "summary": "Update and Send Document",
        "description": "Updates a draft document and sends it to be signed by recipients. `subject` and `message` apply to email notifications only; SMS notifications always use fixed system templates.",
        "tags": [
          "Document"
        ],
        "security": [
          {
            "api_key": []
          }
        ],
        "operationId": "sendDocument",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "$ref": "#/components/schemas/DocumentId"
            },
            "required": true
          },
          {
            "name": "X-TestMode-Enabled",
            "in": "header",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TestModeHeader"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "created",
            "content": {
              "application/json": {
                "example": {
                  "id": "d7955008-c997-466c-957d-117433a84c36",
                  "archived": false,
                  "copied_contacts": [
                    {
                      "email": "johnathan@greenfelder-homenick.example",
                      "name": "Taylor Renner MD"
                    }
                  ],
                  "created_at": "2026-09-29T15:21:44Z",
                  "custom_requester_email": "isa_durgan@pfannerstill.test",
                  "custom_requester_name": "Anakin Skywalker",
                  "decline_redirect_url": "https://www.domain.com/decline_path/",
                  "embedded_edit_url": "https://www.signwell.com/edit/document/2e7159fd-e621-44da-bc9a-40cafa00199a/",
                  "embedded_preview_url": null,
                  "error_message": null,
                  "fields": [
                    [
                      {
                        "api_id": "CheckBox_8",
                        "height": "13.0",
                        "required": true,
                        "type": "checkbox",
                        "value": null,
                        "width": "13.0",
                        "x": 1.1,
                        "y": 1.1,
                        "name": null,
                        "page": 1,
                        "recipient_id": null
                      },
                      {
                        "api_id": "CheckBox_9",
                        "height": "13.0",
                        "required": true,
                        "type": "checkbox",
                        "value": null,
                        "width": "13.0",
                        "x": 1.1,
                        "y": 1.1,
                        "name": null,
                        "page": 1,
                        "recipient_id": null
                      },
                      {
                        "api_id": "Signature_7",
                        "height": "32.0",
                        "required": true,
                        "type": "signature",
                        "value": null,
                        "width": "112.0",
                        "x": 1.1,
                        "y": 1.1,
                        "page": 1,
                        "recipient_id": "661f061f-8436-4c05-8e22-b8ff9cfb1f93"
                      }
                    ]
                  ],
                  "labels": [
                    {
                      "id": "a941a0a9-886b-4395-bbe8-8238fc0b346f",
                      "name": "My First Label"
                    },
                    {
                      "id": "46579fff-93c8-4b2a-9d55-56e9723d114d",
                      "name": "My Second Label"
                    },
                    {
                      "id": "9f5e4955-f139-49ac-9c47-f891af9dd3bd",
                      "name": "My Third Label"
                    }
                  ],
                  "language": "en",
                  "metadata": {
                    "key1": "value1",
                    "key2": "value2"
                  },
                  "name": "Agreement",
                  "recipients": [
                    {
                      "id": "661f061f-8436-4c05-8e22-b8ff9cfb1f93",
                      "attachment_requests": [],
                      "email": "wenona.gerlach@rohan-daugherty.test",
                      "message": null,
                      "name": "Fatimah Rolfson II",
                      "passcode": null,
                      "send_email_delay": null,
                      "signing_order": 7,
                      "status": "draft",
                      "subject": null,
                      "bounced": null,
                      "bounced_details": null,
                      "send_email": null,
                      "signing_url": "https://www.signwell.com/docs/2756204beb/",
                      "delivery_method": "email"
                    },
                    {
                      "id": "9c1f44e1-d046-43f6-a794-e8bc1f9bc56d",
                      "attachment_requests": [],
                      "email": "ed_boyer@mcdermott.example",
                      "message": null,
                      "name": "Amb. Rebbecca Jones",
                      "passcode": null,
                      "send_email_delay": null,
                      "signing_order": 8,
                      "status": "draft",
                      "subject": null,
                      "bounced": null,
                      "bounced_details": null,
                      "send_email": null,
                      "signing_url": "https://www.signwell.com/docs/5dacf9d699/",
                      "delivery_method": "email"
                    }
                  ],
                  "subject": "Normal subject",
                  "test_mode": false,
                  "updated_at": "2026-09-29T15:21:44Z",
                  "decline_message": null,
                  "api_application_id": null,
                  "cfr_part11": false,
                  "cfr_part11_signing_mode": null,
                  "embedded": null,
                  "allow_decline": true,
                  "allow_reassign": true,
                  "apply_signing_order": false,
                  "embedded_signing": false,
                  "expires_in": 365,
                  "message": "Normal Body",
                  "reminders": true,
                  "requester_email_address": "19.arthricia@stroman.example",
                  "redirect_url": "https://www.domain.com/redirect_path/",
                  "status": "Draft",
                  "files": [
                    {
                      "name": "sunt.jpg",
                      "pages_number": 1
                    }
                  ],
                  "conditional_rules": []
                },
                "schema": {
                  "$ref": "#/components/schemas/DocumentResponse"
                }
              }
            }
          },
          "422": {
            "description": "unprocessable entity",
            "content": {
              "application/json": {
                "example": {
                  "errors": {
                    "decline_redirect_url": [
                      "is not a valid URL"
                    ],
                    "redirect_url": [
                      "is not a valid URL"
                    ],
                    "expires_in": [
                      "must be less than or equal to 365"
                    ],
                    "metadata": [
                      "The key/value pairs must not exceed 50",
                      "Check the following keys: [qgtxtpsnyxjwzvbzhnmrjziscxsmgcugpqanuygve], length needs to be less than 40 characters",
                      "Check the value of the following keys: [ke50], length needs to be less than 500 characters and must be a string"
                    ],
                    "subject": [
                      "is too long (maximum is 255 characters)"
                    ],
                    "message": [
                      "is too long (maximum is 4000 characters)"
                    ]
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ValidationErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "rate limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDocumentAndSendRequest"
              }
            }
          },
          "required": true
        },
        "x-readme": {
          "code-samples": [
            {
              "language": "ruby",
              "name": "Ruby SDK",
              "install": "gem install signwell_sdk",
              "code": "require 'signwell_sdk'\n\nSignWell.configure do |config|\n  config.api_key['X-Api-Key'] = ENV['SIGNWELL_API_KEY']\nend\n\napi = SignWell::Resources::DocumentApi.new\n\nrequest = SignWell::Models::UpdateDocumentAndSendRequest.new(\n  subject: 'Please sign this NDA',\n  message: 'Hi Jane, please review and sign this document.'\n)\n\ndocument = api.send_document('document_id', request)\nputs document.status"
            }
          ]
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "X-Api-Key",
        "in": "header"
      }
    },
    "schemas": {
      "FieldType": {
        "type": "string",
        "enum": [
          "initials",
          "signature",
          "checkbox",
          "date",
          "select",
          "text",
          "dropdown",
          "autofill_company",
          "autofill_email",
          "autofill_first_name",
          "autofill_last_name",
          "autofill_name",
          "autofill_phone",
          "autofill_title",
          "autofill_date_signed"
        ],
        "description": "Type of signing field"
      },
      "TextValidation": {
        "type": "string",
        "enum": [
          "no_text_validation",
          "numbers",
          "letters",
          "email_address",
          "us_phone_number",
          "us_zip_code",
          "us_ssn",
          "us_age",
          "alphanumeric",
          "us_bank_routing_number",
          "us_bank_account_number",
          "custom"
        ],
        "description": "Validation rule for text fields"
      },
      "ValidationRegex": {
        "type": "string",
        "description": "Text fields with custom validation only: the regex pattern used to validate field values. Required when validation is set to custom."
      },
      "ValidationRegexErrorMessage": {
        "type": "string",
        "description": "Text fields with custom validation only: the error message shown to the recipient when their input doesn't match the regex pattern. Required when validation is set to custom."
      },
      "DateFormat": {
        "type": "string",
        "enum": [
          "MM/DD/YYYY",
          "DD/MM/YYYY",
          "YYYY/MM/DD",
          "Month DD, YYYY",
          "MM/DD/YYYY hh:mm:ss a"
        ],
        "description": "Date format for date fields. Valid values: MM/DD/YYYY, DD/MM/YYYY, YYYY/MM/DD, Month DD, YYYY, MM/DD/YYYY hh:mm:ss a. Default: MM/DD/YYYY"
      },
      "CheckboxValidation": {
        "type": "string",
        "enum": [
          "minimum",
          "maximum",
          "range",
          "exact"
        ],
        "description": "Validation rule for checkbox groups"
      },
      "FileInfo": {
        "type": "object",
        "description": "File information",
        "properties": {
          "name": {
            "type": "string",
            "description": "File name"
          },
          "pages_number": {
            "type": "integer",
            "description": "Number of pages in the file"
          }
        },
        "required": [
          "name",
          "pages_number"
        ]
      },
      "LabelInfo": {
        "type": "object",
        "description": "Label information",
        "properties": {
          "id": {
            "type": "string",
            "description": "Label ID"
          },
          "name": {
            "type": "string",
            "description": "Label name"
          }
        }
      },
      "CopiedContactInfo": {
        "type": "object",
        "description": "Copied contact information",
        "properties": {
          "id": {
            "type": "string",
            "description": "Contact ID"
          },
          "name": {
            "type": "string",
            "description": "Contact name"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Contact email"
          }
        },
        "required": [
          "email"
        ]
      },
      "CheckboxGroupInfo": {
        "type": "object",
        "description": "Checkbox group configuration",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Checkbox group ID"
          },
          "group_name": {
            "type": "string",
            "nullable": true,
            "description": "Name of the checkbox group"
          },
          "recipient_id": {
            "type": "string",
            "nullable": true,
            "description": "Recipient ID associated with the group"
          },
          "checkbox_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of checkboxes in this group"
          },
          "validation": {
            "$ref": "#/components/schemas/CheckboxValidation",
            "nullable": true
          },
          "required": {
            "type": "boolean",
            "description": "Whether at least one checkbox must be checked"
          },
          "min_value": {
            "type": "integer",
            "description": "Minimum number of checkboxes to check"
          },
          "max_value": {
            "type": "integer",
            "description": "Maximum number of checkboxes to check"
          },
          "exact_value": {
            "type": "integer",
            "description": "Exact number of checkboxes that must be checked"
          }
        },
        "required": [
          "id",
          "checkbox_ids",
          "required"
        ]
      },
      "AttachmentRequestInfo": {
        "type": "object",
        "description": "Attachment request information",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the attachment request"
          },
          "url": {
            "type": "string",
            "format": "url",
            "description": "URL of the uploaded attachment (when available)"
          },
          "required": {
            "type": "boolean",
            "description": "Whether the attachment is required"
          }
        },
        "required": [
          "name",
          "required"
        ]
      },
      "ConditionalRuleRequest": {
        "type": "object",
        "description": "A conditional logic rule. Create requires target_id, action_type, action_field_ids and conditions; id and deleted are ignored on create. On an update (template update or document update-and-send) the rules are an incremental upsert keyed by id: send id + the fields to change to modify a rule, id + deleted: true to remove it, or omit id to add a new rule.",
        "properties": {
          "id": {
            "type": "string",
            "description": "The rule's persistent ID. Ignored on create (every rule is new). On an update (template update or document update-and-send) include it to modify an existing rule, or pair it with `deleted: true` to remove the rule; omit it to add a new rule."
          },
          "deleted": {
            "type": "boolean",
            "description": "Only meaningful on an update (template update or document update-and-send): set to true together with the rule's `id` to remove that rule. Ignored on create — there is no existing rule to delete."
          },
          "target_id": {
            "type": "string",
            "description": "api_id of the field that owns the rule, or the external_id of a checkbox group when the rule is owned by a group (groups have no api_id). Cannot also appear in action_field_ids (self-reference is forbidden)."
          },
          "action_type": {
            "type": "string",
            "enum": [
              "show",
              "hide",
              "require"
            ],
            "description": "Action applied to action_field_ids when the conditions are met: `show`, `hide`, or `require`."
          },
          "action_field_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "api_ids of the fields the action applies to. List a checkbox group's member api_ids to target the whole group."
          },
          "conditions": {
            "type": "array",
            "description": "The conditions that trigger the rule. At least 1, at most 5.",
            "items": {
              "type": "object",
              "properties": {
                "condition_type": {
                  "type": "string",
                  "enum": [
                    "any_of",
                    "all_of",
                    "none_of",
                    "not_all_of"
                  ],
                  "description": "How the field_api_ids combine within a condition: `any_of`, `all_of`, `none_of`, or `not_all_of`."
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "completed",
                    "not_completed"
                  ],
                  "description": "The field state the condition tests for: `completed` or `not_completed`."
                },
                "join_operator": {
                  "type": "string",
                  "enum": [
                    "and_operator",
                    "or_operator"
                  ],
                  "description": "How this condition joins the next one in the rule: `and_operator` or `or_operator`. The first condition's value is ignored."
                },
                "field_api_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "api_ids of the trigger fields the condition watches."
                },
                "position": {
                  "type": "integer",
                  "description": "1-indexed order of the condition within the rule."
                }
              },
              "required": [
                "condition_type",
                "status",
                "field_api_ids"
              ]
            }
          }
        }
      },
      "ConditionalRuleInfo": {
        "type": "object",
        "description": "Conditional rule configuration",
        "properties": {
          "id": {
            "type": "string",
            "description": "Conditional rule ID"
          },
          "target_id": {
            "type": "string",
            "description": "api_id of the field that owns the rule, or the external_id of a checkbox group when the rule is owned by a group (groups have no api_id)"
          },
          "action_type": {
            "type": "string",
            "enum": [
              "show",
              "hide",
              "require"
            ],
            "description": "Action applied to action_field_ids when the conditions are met"
          },
          "action_field_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "api_ids of fields the rule affects when triggered"
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "condition_type": {
                  "type": "string",
                  "enum": [
                    "any_of",
                    "all_of",
                    "none_of",
                    "not_all_of"
                  ],
                  "description": "How field_api_ids combine within this condition"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "completed",
                    "not_completed"
                  ],
                  "description": "Field state that satisfies this condition"
                },
                "join_operator": {
                  "type": "string",
                  "enum": [
                    "and_operator",
                    "or_operator"
                  ],
                  "description": "How this condition joins with the next one in the rule"
                },
                "field_api_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "api_ids of fields evaluated by this condition"
                },
                "position": {
                  "type": "integer",
                  "description": "Order of this condition within the rule"
                }
              }
            }
          }
        },
        "required": [
          "id",
          "target_id",
          "action_type"
        ]
      },
      "ConditionalLogicDecisionInfo": {
        "type": "object",
        "description": "Audit record of a signer-side decision about a CL rule that fired against a completed field.",
        "properties": {
          "rule_id": {
            "type": "string",
            "description": "External ID of the conditional rule that fired"
          },
          "field_api_id": {
            "type": "string",
            "description": "api_id of the field the decision applies to"
          },
          "decision_type": {
            "type": "string",
            "enum": [
              "kept_signature",
              "cleared_value"
            ],
            "description": "Whether the signer kept the existing signature or the value was cleared"
          },
          "decided_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the decision was recorded"
          },
          "description": {
            "type": "string",
            "description": "Human-readable summary of the decision"
          }
        },
        "required": [
          "rule_id",
          "field_api_id",
          "decision_type",
          "decided_at"
        ]
      },
      "CheckboxGroups": {
        "type": "array",
        "description": "Checkbox fields that are placed on a document can be grouped with selection requirements. At least 2 checkbox fields in an array of fields must be assigned to the same recipient.",
        "items": {
          "type": "object",
          "properties": {
            "group_name": {
              "type": "string",
              "description": "A unique identifier for the checkbox group."
            },
            "recipient_id": {
              "type": "string",
              "description": "The recipient ID associated with the checkbox group."
            },
            "checkbox_ids": {
              "type": "array",
              "items": {
                "type": "string",
                "description": "A unique identifier for each checkbox in a group. ID must match the api_id of the checkbox field."
              }
            },
            "validation": {
              "$ref": "#/components/schemas/CheckboxValidation",
              "description": "Set requirements for the group of one or multiple selections by the recipient. Defaults to minimum. Validation values: minimum, maximum, exact, range."
            },
            "required": {
              "type": "boolean",
              "default": false,
              "description": "Whether the group must be completed by the recipient. Defaults to false."
            },
            "min_value": {
              "type": "integer",
              "description": "The minimum number of checkboxes that must be checked in the group. (Only for validation: minimum and range)"
            },
            "max_value": {
              "type": "integer",
              "description": "The maximum number of checkboxes that can be checked in the group. (Only for validation: maximum and range)"
            },
            "exact_value": {
              "type": "integer",
              "description": "The exact number of checkboxes that must be checked in the group. (Only for validation: exact)"
            }
          },
          "required": [
            "group_name",
            "recipient_id",
            "checkbox_ids"
          ]
        }
      },
      "DocumentId": {
        "type": "string",
        "format": "uuid",
        "description": "Unique identifier for a document."
      },
      "TestModeHeader": {
        "type": "boolean",
        "description": "Alternative to the `test_mode` body parameter. Set to `true` to enable Test Mode or `false` to disable it. Only lowercase `true` and `false` are supported. If both are provided, the header takes precedence.\n\nThis is a request header only and is not included in API responses."
      },
      "LabelsUpdate": {
        "type": "array",
        "description": "Labels can be used to organize documents in a way that can make it easy to find using the document search in SignWell. A document can have multiple labels. Updating labels on a document will replace any existing labels for that document.",
        "items": {
          "$ref": "#/components/schemas/LabelRequest"
        }
      },
      "LabelRequest": {
        "type": "object",
        "description": "Labels can be used to organize documents and templates in a way that can make it easy to find using the document search/template search in SignWell. Labels can be used to organize documents in a way that can make it easy to find using the document search in SignWell.",
        "properties": {
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name"
        ]
      },
      "UpdateDocumentAndSendRequest": {
        "type": "object",
        "properties": {
          "test_mode": {
            "type": "boolean",
            "default": false,
            "description": "Set to `true` to enable Test Mode. Documents sent in Test Mode do not count towards API billing and are not legally binding. Defaults to `false`.\n\nTest Mode does not carry over from the draft. To send a draft in Test Mode, set `test_mode` to `true` or use the `X-TestMode-Enabled` header. Otherwise, the document is sent live."
          },
          "name": {
            "type": "string",
            "description": "The name of the document."
          },
          "subject": {
            "type": "string",
            "description": "Email subject for the signature request that recipients will see. Defaults to the default system subject or a template subject (if the document is created from a template). Applies to email notifications only; SMS notifications always use fixed system templates."
          },
          "message": {
            "type": "string",
            "description": "Email message for the signature request that recipients will see. Defaults to the default system message or a template message (if the document is created from a template). Applies to email notifications only; SMS notifications always use fixed system templates."
          },
          "expires_in": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of days before the signature request expires. Defaults to the account expiration setting or template expiration (if the document is created from a template)."
          },
          "reminders": {
            "type": "boolean",
            "default": true,
            "description": "Whether to send signing reminders to recipients. Reminders are sent on day 3, day 6, and day 10 if set to `true`. Defaults to `true`."
          },
          "apply_signing_order": {
            "type": "boolean",
            "default": false,
            "description": "When set to `true` recipients will sign one at a time in the order of the `recipients` collection of this request."
          },
          "api_application_id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for API Application settings to use. API Applications are optional and mainly used when isolating OAuth apps or for more control over embedded API settings"
          },
          "embedded_signing": {
            "type": "boolean",
            "default": false,
            "description": "When set to `true` it enables embedded signing in your website/web application. Embedded functionality works with an iFrame and email authentication is disabled. :embedded_signinig defaults to `false`."
          },
          "embedded_signing_notifications": {
            "type": "boolean",
            "default": false,
            "description": "On embedding signing, document owners (and CC'd contacts) do not get a notification email when documents have been completed. Setting this param to `true` will send out those final completed notifications. Default is `false`"
          },
          "embedded": {
            "$ref": "#/components/schemas/EmbeddedRequest"
          },
          "custom_requester_name": {
            "type": "string",
            "description": "Sets the custom requester name for the document. When set, this is the name used for all email communications, signing notifications, and in the audit file."
          },
          "custom_requester_email": {
            "type": "string",
            "format": "email",
            "description": "Sets the custom requester email for the document. When set, this is the email used for all email communications, signing notifications, and in the audit file."
          },
          "redirect_url": {
            "type": "string",
            "format": "url",
            "description": "A URL that recipients are redirected to after successfully signing a document."
          },
          "allow_decline": {
            "type": "boolean",
            "default": true,
            "description": "Whether to allow recipients the option to decline signing a document. If multiple signers are involved in a document, any single recipient can cancel the entire document signing process by declining to sign."
          },
          "allow_reassign": {
            "type": "boolean",
            "default": true,
            "description": "In some cases a signer is not the right person to sign and may need to reassign their signing responsibilities to another person. This feature allows them to reassign the document to someone else. Unavailable on 21 CFR Part 11 documents: omit it and reassignment stays off, while sending `true` returns a 422."
          },
          "decline_redirect_url": {
            "type": "string",
            "format": "url",
            "description": "A URL that recipients are redirected to if the document is declined."
          },
          "conditional_rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConditionalRuleRequest"
            },
            "description": "Conditional logic rules that show, hide, or require fields based on what a signer does to other fields. Every identifier is a field api_id. At most 10 rules per document or template."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Optional key-value data that can be associated with the document. If set, will be available every time the document data is returned."
          },
          "labels": {
            "$ref": "#/components/schemas/LabelsUpdate"
          },
          "checkbox_groups": {
            "$ref": "#/components/schemas/CheckboxGroups"
          },
          "sms_test_email": {
            "type": "boolean",
            "description": "Only applies when `test_mode` is `true`. When `true` and an SMS notification is scheduled for an SMS-only recipient, sends the document owner a preview email with a masked phone number. In embedded signing, the recipient's `send_sms` must be `true` to schedule that notification. Test mode delivers no SMS and uses no SMS credits. On newly created documents this setting defaults to `false`; omitting it in Update and Send preserves the stored setting."
          }
        }
      },
      "EmbeddedBrandingRequest": {
        "type": "object",
        "nullable": true,
        "description": "Branding for this document's embedded requesting and signing experiences. Every property is optional and independent. A property you supply overrides the selected API Application; one you omit inherits from it, then from the SignWell default. `company_logo` has one extra step between those two: the account's Settings > Branding logo, which applies on paid plans only. The colors and the border radius have no account step — omitting one falls straight through to the SignWell default. On Update and Send Document the object is a patch: only the properties you send change, and a property sent as `null` clears your override so the value inherits again. Sending `branding` itself as `null` clears every property.",
        "properties": {
          "company_logo": {
            "type": "object",
            "nullable": true,
            "description": "Logo shown on this document's embedded pages. Supply either `file_url` or `file_base64`, never both — sending both returns a `422`. Sending `company_logo` replaces the logo outright, so whichever source you omit is cleared; sending it as `null` removes the logo. Recommended size is 300 x 60 px with a transparent background; these are recommendations, not validated. In responses this property is `\"provided\"` — the URL and the Base64 payload are never returned.",
            "properties": {
              "file_url": {
                "type": "string",
                "description": "Public `http` or `https` URL of the logo image. The value has to parse as one — anything else returns a `422`. SignWell never requests the URL when the document is created, so it is not checked for reachability or for what it points at. If the URL turns out to be unreachable, slow, or not a usable image when the page loads, the page falls back to the no-logo experience rather than erroring.",
                "example": "https://example.com/customer-logo.png"
              },
              "file_base64": {
                "type": "string",
                "description": "RFC 4648 Base64 string of the logo image. The 300 KB limit applies to the decoded image, not to the string you send, so a valid string runs about a third larger. The decoded image must be one of image/jpeg, image/png, image/gif, image/tiff, image/webp, image/svg+xml, image/heic, image/heif, image/avif. A payload that cannot be decoded, is not one of those formats, or is over the size limit returns a `422`. A payload that is accepted here but still fails to render when the page loads falls back to the no-logo experience."
              }
            }
          },
          "accent_color": {
            "type": "string",
            "nullable": true,
            "description": "Accent color for this document's embedded pages, as a 6-digit HEX value. Returned normalized to `#RRGGBB`.",
            "example": "#51B6C4"
          },
          "button_label_color": {
            "type": "string",
            "nullable": true,
            "description": "Button label color for this document's embedded pages, as a 6-digit HEX value. Returned normalized to `#RRGGBB`.",
            "example": "#FFFFFF"
          },
          "link_color": {
            "type": "string",
            "nullable": true,
            "description": "Link color for this document's embedded pages, as a 6-digit HEX value. Returned normalized to `#RRGGBB`.",
            "example": "#1A0DAB"
          },
          "button_border_radius": {
            "type": "integer",
            "nullable": true,
            "minimum": 0,
            "maximum": 25,
            "description": "Corner radius of buttons on this document's embedded pages, in pixels. Must be between 0 and 25.",
            "example": 25
          }
        }
      },
      "EmbeddedRequest": {
        "type": "object",
        "description": "Optional container for embedded settings. Purely additive: requests that omit it behave exactly as before, and the existing top-level `api_application_id`, `embedded_signing` and `embedded_signing_notifications` parameters are unchanged. Not supported on template endpoints, which return a `422` if it is present.",
        "properties": {
          "branding": {
            "$ref": "#/components/schemas/EmbeddedBrandingRequest"
          }
        }
      },
      "EmbeddedBranding": {
        "type": "object",
        "nullable": true,
        "description": "The branding the caller set on THIS document, echoed back. Null when the caller set none: the document then renders with the API Application, workspace or system branding, and that resolved branding is deliberately not reported here.",
        "properties": {
          "branding": {
            "type": "object",
            "description": "Only the properties actually set on the document. Every one is optional: an unset property is absent rather than null, because null is how a request clears one.",
            "properties": {
              "company_logo": {
                "type": "string",
                "enum": [
                  "provided"
                ],
                "description": "Write-only. Reports only that a logo was set, never its URL or Base64 payload."
              },
              "accent_color": {
                "type": "string",
                "description": "Hex, as #RRGGBB."
              },
              "button_label_color": {
                "type": "string",
                "description": "Hex, as #RRGGBB."
              },
              "link_color": {
                "type": "string",
                "description": "Hex, as #RRGGBB."
              },
              "button_border_radius": {
                "type": "integer",
                "description": "Pixels, 0 to 25."
              }
            }
          }
        },
        "required": [
          "branding"
        ]
      },
      "DocumentResponse": {
        "type": "object",
        "properties": {
          "cfr_part11": {
            "type": "boolean",
            "description": "Whether 21 CFR Part 11 controls apply to this document. Read-only: the value is taken from the workspace setting when the document is created and never changes afterwards."
          },
          "cfr_part11_signing_mode": {
            "type": "string",
            "enum": [
              "streamlined",
              "per_signature"
            ],
            "nullable": true,
            "description": "The signing mode of a 21 CFR Part 11 document: streamlined (one final authentication) or per_signature (authentication at every signature and initials field). Null when Part 11 does not apply."
          },
          "test_mode": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "api_application_id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "requester_email_address": {
            "type": "string",
            "format": "email"
          },
          "custom_requester_name": {
            "type": "string",
            "nullable": true
          },
          "custom_requester_email": {
            "type": "string",
            "format": "email",
            "nullable": true
          },
          "name": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "nullable": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "recipients": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "body": {
                  "type": "string"
                },
                "message": {
                  "type": "string",
                  "nullable": true
                },
                "subject": {
                  "type": "string",
                  "nullable": true
                },
                "send_email": {
                  "type": "boolean",
                  "nullable": true
                },
                "send_email_delay": {
                  "type": "integer",
                  "nullable": true
                },
                "delivery_method": {
                  "type": "string",
                  "enum": [
                    "email",
                    "sms",
                    "email_and_sms"
                  ],
                  "description": "How the recipient is notified: email (default), sms, or email_and_sms."
                },
                "sms": {
                  "type": "object",
                  "description": "SMS delivery metadata. Only present when delivery_method includes SMS.",
                  "properties": {
                    "phone_number_masked": {
                      "type": "string",
                      "nullable": true,
                      "description": "Masked phone number; the full number never leaves the API."
                    },
                    "send_sms": {
                      "type": "boolean",
                      "nullable": true
                    },
                    "send_sms_delay": {
                      "type": "integer",
                      "nullable": true
                    },
                    "delivery_status": {
                      "type": "string",
                      "nullable": true
                    },
                    "message_type": {
                      "type": "string",
                      "nullable": true
                    },
                    "failed": {
                      "type": "boolean",
                      "nullable": true
                    },
                    "failed_details": {
                      "type": "string",
                      "nullable": true
                    }
                  }
                },
                "signing_order": {
                  "type": "integer"
                },
                "signing_url": {
                  "type": "string",
                  "format": "url",
                  "nullable": true
                },
                "embedded_signing_url": {
                  "type": "string",
                  "format": "url",
                  "nullable": true
                },
                "bounced": {
                  "type": "boolean",
                  "nullable": true
                },
                "bounced_details": {
                  "type": "string",
                  "nullable": true
                },
                "attachment_requests": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/AttachmentRequestInfo"
                  }
                },
                "passcode": {
                  "type": "string",
                  "nullable": true
                },
                "passcode_delivery": {
                  "type": "object",
                  "properties": {
                    "enabled": {
                      "type": "boolean"
                    },
                    "methods": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "nullable": true
                    },
                    "expire_after_access": {
                      "type": "boolean"
                    }
                  }
                },
                "status": {
                  "type": "string",
                  "nullable": true
                }
              },
              "required": [
                "name",
                "email"
              ]
            }
          },
          "status": {
            "type": "string",
            "description": "Possible values: Draft, Created, Sending, Sent, Pending, Viewed, Completed, Manually completed, Declined, Canceled, Bounced, Blocked, Error, Expired"
          },
          "reminders": {
            "type": "boolean"
          },
          "archived": {
            "type": "boolean"
          },
          "embedded": {
            "$ref": "#/components/schemas/EmbeddedBranding"
          },
          "embedded_signing": {
            "type": "boolean"
          },
          "embedded_edit_url": {
            "type": "string",
            "format": "url",
            "nullable": true
          },
          "embedded_preview_url": {
            "type": "string",
            "format": "url",
            "nullable": true
          },
          "apply_signing_order": {
            "type": "boolean"
          },
          "redirect_url": {
            "type": "string",
            "format": "url",
            "nullable": true
          },
          "decline_redirect_url": {
            "type": "string",
            "format": "url",
            "nullable": true
          },
          "language": {
            "type": "string"
          },
          "expires_in": {
            "type": "integer"
          },
          "decline_message": {
            "type": "string",
            "nullable": true
          },
          "error_message": {
            "type": "string",
            "nullable": true
          },
          "template_id": {
            "type": "string",
            "nullable": true
          },
          "template_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "embedded_signing_notifications": {
            "type": "boolean"
          },
          "attachment_requests": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "recipient_id": {
                  "type": "string"
                },
                "required": {
                  "type": "boolean"
                }
              },
              "required": [
                "name",
                "recipient_id"
              ]
            }
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileInfo"
            }
          },
          "copied_contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CopiedContactInfo"
            }
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "x": {
                    "type": "number",
                    "format": "float"
                  },
                  "y": {
                    "type": "number",
                    "format": "float"
                  },
                  "page": {
                    "type": "integer"
                  },
                  "recipient": {
                    "type": "object",
                    "properties": {
                      "email": {
                        "type": "string",
                        "format": "email"
                      },
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "email",
                      "name"
                    ]
                  },
                  "api_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "name": {
                    "type": "string",
                    "nullable": true
                  },
                  "date_format": {
                    "$ref": "#/components/schemas/DateFormat"
                  },
                  "fixed_width": {
                    "type": "boolean"
                  },
                  "formula": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "lock_sign_date": {
                    "type": "boolean"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "type": {
                    "$ref": "#/components/schemas/FieldType"
                  },
                  "validation": {
                    "$ref": "#/components/schemas/TextValidation"
                  },
                  "validation_regex": {
                    "$ref": "#/components/schemas/ValidationRegex"
                  },
                  "validation_regex_error_message": {
                    "$ref": "#/components/schemas/ValidationRegexErrorMessage"
                  },
                  "value": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "number"
                      }
                    ],
                    "nullable": true
                  },
                  "height": {
                    "type": "string"
                  },
                  "width": {
                    "type": "string"
                  },
                  "recipient_id": {
                    "type": "string",
                    "nullable": true
                  },
                  "signing_elements_group_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "placeholder_name": {
                    "type": "string"
                  },
                  "options": {
                    "type": "array",
                    "description": "Dropdown options (for dropdown/select fields)",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "api_id": {
                          "type": "string"
                        },
                        "is_other": {
                          "type": "boolean"
                        }
                      }
                    }
                  },
                  "default_option": {
                    "type": "string",
                    "description": "Default selected option"
                  },
                  "allow_other": {
                    "type": "boolean",
                    "description": "Whether \"Other\" option is allowed"
                  }
                },
                "required": [
                  "x",
                  "y",
                  "page"
                ]
              }
            }
          },
          "allow_decline": {
            "type": "boolean",
            "nullable": true
          },
          "allow_reassign": {
            "type": "boolean",
            "nullable": true
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LabelInfo"
            }
          },
          "checkbox_groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CheckboxGroupInfo"
            }
          },
          "conditional_rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConditionalRuleInfo"
            }
          },
          "conditional_logic_decisions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConditionalLogicDecisionInfo"
            }
          }
        },
        "required": [
          "id",
          "test_mode"
        ]
      },
      "ValidationErrorResponse": {
        "type": "object",
        "description": "Validation error response. The errors object contains field-specific error details with dynamic keys.",
        "properties": {
          "errors": {
            "type": "object",
            "additionalProperties": true,
            "description": "Field-specific validation errors. Keys are field names (e.g., recipients, fields, files). Values can be strings, arrays of strings, or nested objects with further field-specific errors."
          }
        },
        "required": [
          "errors"
        ]
      },
      "RateLimitErrorResponse": {
        "type": "object",
        "description": "Rate limit exceeded error response (HTTP 429)",
        "properties": {
          "error": {
            "type": "string",
            "description": "Rate limit error message indicating the limit and reset time"
          }
        },
        "required": [
          "error"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://www.signwell.com"
    }
  ]
}
```