docs
This commit is contained in:
@@ -0,0 +1,247 @@
|
||||
# Form Webhook
|
||||
|
||||
During the form filling and signing process, 3 types of events may occur and are dispatched at different stages:
|
||||
|
||||
- **'form.viewed'** event is triggered when the submitter first opens the form.
|
||||
- **'form.started'** event is triggered when the submitter initiates filling out the form.
|
||||
- **'form.completed'** event is triggered upon successful form completion and signing by one of the parties.
|
||||
- **'form.declined'** event is triggered when a signer declines the submission.
|
||||
|
||||
It's important to note that each of these events contain information available at the time of dispatch, so some data may be missing or incomplete depending on the specific event. Failed webhook requests (4xx, 5xx) are automatically retried multiple times within 48 hours (every 2^attempt minutes) for all production accounts.
|
||||
**Related Guides**
|
||||
[Download Signed Documents](https://www.docuseal.com/guides/download-signed-documents)
|
||||
|
||||
```json
|
||||
{
|
||||
"event_type": {
|
||||
"type": "string",
|
||||
"description": "The event type.",
|
||||
"enum": [
|
||||
"form.viewed",
|
||||
"form.started",
|
||||
"form.completed"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"description": "The event timestamp.",
|
||||
"example": "2023-09-24T11:20:42Z",
|
||||
"format": "date-time"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"description": "Submitted data object.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"description": "The submitter's unique identifier."
|
||||
},
|
||||
"submission_id": {
|
||||
"type": "number",
|
||||
"description": "The unique submission identifier."
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"description": "The submitter's email address",
|
||||
"format": "email",
|
||||
"example": "john.doe@example.com"
|
||||
},
|
||||
"ua": {
|
||||
"type": "string",
|
||||
"description": "The user agent string that provides information about the submitter's web browser.",
|
||||
"example": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
|
||||
},
|
||||
"ip": {
|
||||
"type": "string",
|
||||
"description": "The submitter's IP address."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The submitter's name."
|
||||
},
|
||||
"phone": {
|
||||
"type": "string",
|
||||
"description": "The submitter's phone number, formatted according to the E.164 standard.",
|
||||
"example": "+1234567890"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"description": "The submitter's role name or title.",
|
||||
"example": "First Party"
|
||||
},
|
||||
"external_id": {
|
||||
"type": "string",
|
||||
"description": "Your application-specific unique string key to identify submitter within your app."
|
||||
},
|
||||
"application_key": {
|
||||
"type": "string",
|
||||
"description": "Your application-specific unique string key to identify submitter within your app. Backward compatibility with the previous version of the API. Use external_id instead."
|
||||
},
|
||||
"decline_reason": {
|
||||
"type": "string",
|
||||
"description": "Submitter provided decline message."
|
||||
},
|
||||
"sent_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "The submitter status.",
|
||||
"enum": [
|
||||
"completed",
|
||||
"declined",
|
||||
"opened",
|
||||
"sent",
|
||||
"awaiting"
|
||||
]
|
||||
},
|
||||
"opened_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"completed_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"declined_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"submission": {
|
||||
"type": "object",
|
||||
"description": "The submission details.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"description": "The submission's unique identifier."
|
||||
},
|
||||
"audit_log_url": {
|
||||
"type": "string",
|
||||
"description": "The audit log PDF URL. Available only if the submission was completed by all submitters."
|
||||
},
|
||||
"combined_document_url": {
|
||||
"type": "string",
|
||||
"description": "The URL of the combined documents with audit log. Combined documents can be enabled via <a href=\"https://docuseal.com/settings/account\" target=\"_blank\" class=\"link\">/settings/accounts</a>."
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "The submission status.",
|
||||
"enum": [
|
||||
"completed",
|
||||
"declined",
|
||||
"expired",
|
||||
"pending"
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The submission URL."
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"description": "The submission creation date.",
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"type": "object",
|
||||
"description": "Base template details.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"description": "The template's unique identifier."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The template's name."
|
||||
},
|
||||
"external_id": {
|
||||
"type": "string",
|
||||
"description": "Your application-specific unique string key to identify template within your app."
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"folder_name": {
|
||||
"type": "string",
|
||||
"description": "Template folder name."
|
||||
}
|
||||
}
|
||||
},
|
||||
"preferences": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"send_email": {
|
||||
"type": "boolean",
|
||||
"description": "The flag indicating whether the submitter has opted to receive an email."
|
||||
},
|
||||
"send_sms": {
|
||||
"type": "boolean",
|
||||
"description": "The flag indicating whether the submitter has opted to receive an SMS."
|
||||
}
|
||||
}
|
||||
},
|
||||
"values": {
|
||||
"type": "array",
|
||||
"description": "List of the filled values passed by the submitter.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"field": {
|
||||
"type": "string",
|
||||
"description": "The field name."
|
||||
},
|
||||
"values": {
|
||||
"type": "string",
|
||||
"description": "The field value."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"description": "Metadata object with additional submitter information."
|
||||
},
|
||||
"audit_log_url": {
|
||||
"type": "string",
|
||||
"description": "The audit log PDF URL. Available only if the submission was completed by all submitters."
|
||||
},
|
||||
"submission_url": {
|
||||
"type": "string",
|
||||
"description": "The submission URL."
|
||||
},
|
||||
"documents": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The document file name."
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The document file URL."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,317 @@
|
||||
# Submission Webhook
|
||||
|
||||
Get submission creation, completion, expiration, and archiving notifications using these events:
|
||||
|
||||
- **'submission.created'** event is triggered when the submission is created.
|
||||
- **'submission.completed'** event is triggered when the submission is completed by all signing parties.
|
||||
- **'submission.expired'** event is triggered when the submission expires.
|
||||
- **'submission.archived'** event is triggered when the submission is archived.
|
||||
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"event_type": {
|
||||
"type": "string",
|
||||
"description": "The event type.",
|
||||
"enum": [
|
||||
"submission.created",
|
||||
"submission.archived"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"description": "The event timestamp.",
|
||||
"example": "2023-09-24T11:20:42Z",
|
||||
"format": "date-time"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"description": "Submitted data object.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"description": "The submission's unique identifier."
|
||||
},
|
||||
"archived_at": {
|
||||
"type": "string",
|
||||
"description": "The submission archive date."
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"description": "The submission creation date."
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"description": "The submission update date."
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "The submission source.",
|
||||
"enum": [
|
||||
"invite",
|
||||
"bulk",
|
||||
"api",
|
||||
"embed",
|
||||
"link"
|
||||
]
|
||||
},
|
||||
"submitters_order": {
|
||||
"type": "string",
|
||||
"description": "The submitters order.",
|
||||
"enum": [
|
||||
"random",
|
||||
"preserved"
|
||||
]
|
||||
},
|
||||
"audit_log_url": {
|
||||
"type": "string",
|
||||
"description": "Audit log file URL."
|
||||
},
|
||||
"submitters": {
|
||||
"type": "array",
|
||||
"description": "The list of submitters for the submission.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"description": "The submitter's unique identifier."
|
||||
},
|
||||
"submission_id": {
|
||||
"type": "number",
|
||||
"description": "The unique submission identifier."
|
||||
},
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "The submitter UUID."
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"description": "The email address of the submitter.",
|
||||
"format": "email",
|
||||
"example": "john.doe@example.com"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string",
|
||||
"description": "The unique slug of the document template."
|
||||
},
|
||||
"sent_at": {
|
||||
"type": "string",
|
||||
"description": "The date and time when the signing request was sent to the submitter."
|
||||
},
|
||||
"opened_at": {
|
||||
"type": "string",
|
||||
"description": "The date and time when the submitter opened the signing form."
|
||||
},
|
||||
"completed_at": {
|
||||
"type": "string",
|
||||
"description": "The date and time when the submitter completed the signing form."
|
||||
},
|
||||
"declined_at": {
|
||||
"type": "string",
|
||||
"description": "The date and time when the submitter declined the signing form."
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"description": "The date and time when the submitter was created."
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"description": "The date and time when the submitter was last updated."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The name of the submitter."
|
||||
},
|
||||
"phone": {
|
||||
"type": "string",
|
||||
"description": "The phone number of the submitter, formatted according to the E.164 standard.",
|
||||
"example": "+1234567890"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"description": "The role name or title of the submitter.",
|
||||
"example": "First Party"
|
||||
},
|
||||
"external_id": {
|
||||
"type": "string",
|
||||
"description": "Your application-specific unique string key to identify this submitter within your app."
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"description": "Metadata object with additional submitter information.",
|
||||
"example": "{ 'customField': 'value' }"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "The submitter status.",
|
||||
"enum": [
|
||||
"completed",
|
||||
"declined",
|
||||
"opened",
|
||||
"sent",
|
||||
"awaiting"
|
||||
]
|
||||
},
|
||||
"application_key": {
|
||||
"type": "string",
|
||||
"description": "Your application-specific unique string key to identify this submitter within your app."
|
||||
},
|
||||
"values": {
|
||||
"type": "object",
|
||||
"description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
|
||||
},
|
||||
"documents": {
|
||||
"type": "array",
|
||||
"description": "The list of documents for the submission.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The document file name."
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "The document file URL."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"preferences": {
|
||||
"type": "object",
|
||||
"description": "The submitter preferences."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"template": {
|
||||
"type": "object",
|
||||
"description": "Base template details.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"description": "The template's unique identifier."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The template's name."
|
||||
},
|
||||
"external_id": {
|
||||
"type": "string",
|
||||
"description": "Your application-specific unique string key to identify template within your app."
|
||||
},
|
||||
"folder_name": {
|
||||
"type": "string",
|
||||
"description": "The folder name."
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"description": "The date and time when the template was created."
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"description": "The date and time when the template was last updated."
|
||||
}
|
||||
}
|
||||
},
|
||||
"created_by_user": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "Unique identifier of the user who created the submission."
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string",
|
||||
"description": "The first name of the user who created the submission."
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string",
|
||||
"description": "The last name of the user who created the submission."
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"description": "The email address of the user who created the submission."
|
||||
}
|
||||
}
|
||||
},
|
||||
"submission_events": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "Submission event unique ID number."
|
||||
},
|
||||
"submitter_id": {
|
||||
"type": "integer",
|
||||
"description": "Unique identifier of the submitter that triggered the event."
|
||||
},
|
||||
"event_type": {
|
||||
"type": "string",
|
||||
"description": "Event type.",
|
||||
"enum": [
|
||||
"send_email",
|
||||
"bounce_email",
|
||||
"complaint_email",
|
||||
"send_reminder_email",
|
||||
"send_sms",
|
||||
"send_2fa_sms",
|
||||
"open_email",
|
||||
"click_email",
|
||||
"click_sms",
|
||||
"phone_verified",
|
||||
"start_form",
|
||||
"start_verification",
|
||||
"complete_verification",
|
||||
"view_form",
|
||||
"invite_party",
|
||||
"complete_form",
|
||||
"decline_form",
|
||||
"api_complete_form"
|
||||
]
|
||||
},
|
||||
"event_timestamp": {
|
||||
"type": "string",
|
||||
"description": "Date and time when the event was triggered."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"documents": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Document name."
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "Document URL."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "The status of the submission.",
|
||||
"enum": [
|
||||
"completed",
|
||||
"declined",
|
||||
"expired",
|
||||
"pending"
|
||||
]
|
||||
},
|
||||
"completed_at": {
|
||||
"type": "string",
|
||||
"description": "The date and time when the submission was fully completed."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,235 @@
|
||||
# Template Webhook
|
||||
|
||||
Get template creation and update notifications using these events:
|
||||
|
||||
- **'template.created'** is triggered when the template is created.
|
||||
- **'tempate.updated'** is triggered when the template is updated.
|
||||
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"event_type": {
|
||||
"type": "string",
|
||||
"description": "The event type.",
|
||||
"enum": [
|
||||
"template.created",
|
||||
"template.updated"
|
||||
]
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"description": "The event timestamp.",
|
||||
"example": "2023-09-24T11:20:42Z",
|
||||
"format": "date-time"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"description": "Submitted data object.",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number",
|
||||
"description": "The template's unique identifier."
|
||||
},
|
||||
"slug": {
|
||||
"type": "string",
|
||||
"description": "The template's unique slug."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The template's name."
|
||||
},
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"description": "The template document files.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"attachment_uuid": {
|
||||
"type": "string",
|
||||
"description": "The attachment UUID."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The attachment name."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"fields": {
|
||||
"type": "array",
|
||||
"description": "The template fields.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "The field UUID."
|
||||
},
|
||||
"submitter_uuid": {
|
||||
"type": "string",
|
||||
"description": "The submitter role UUID."
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The field name."
|
||||
},
|
||||
"required": {
|
||||
"type": "boolean",
|
||||
"description": "The flag indicating whether the field is required."
|
||||
},
|
||||
"preferences": {
|
||||
"type": "object",
|
||||
"description": "The field preferences."
|
||||
},
|
||||
"areas": {
|
||||
"type": "array",
|
||||
"description": "List of areas where the field is located in the document.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"x": {
|
||||
"type": "number",
|
||||
"description": "X coordinate of the area where the field is located in the document."
|
||||
},
|
||||
"y": {
|
||||
"type": "number",
|
||||
"description": "Y coordinate of the area where the field is located in the document."
|
||||
},
|
||||
"w": {
|
||||
"type": "number",
|
||||
"description": "Width of the area where the field is located in the document."
|
||||
},
|
||||
"h": {
|
||||
"type": "number",
|
||||
"description": "Height of the area where the field is located in the document."
|
||||
},
|
||||
"attachment_uuid": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier of the attached document where the field is located."
|
||||
},
|
||||
"page": {
|
||||
"type": "integer",
|
||||
"description": "Page number of the attached document where the field is located."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"submitters": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Submitter name."
|
||||
},
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier of the submitter."
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"author_id": {
|
||||
"type": "integer",
|
||||
"description": "Unique identifier of the author of the template."
|
||||
},
|
||||
"account_id": {
|
||||
"type": "integer",
|
||||
"description": "Unique identifier of the account of the template."
|
||||
},
|
||||
"archived_at": {
|
||||
"type": "string",
|
||||
"description": "Date and time when the template was archived."
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"description": "Date and time when the template was created."
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"description": "Date and time when the template was updated."
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"description": "Source of the template.",
|
||||
"enum": [
|
||||
"native",
|
||||
"api",
|
||||
"embed"
|
||||
]
|
||||
},
|
||||
"external_id": {
|
||||
"type": "string",
|
||||
"description": "Identifier of the template in the external system."
|
||||
},
|
||||
"folder_id": {
|
||||
"type": "integer",
|
||||
"description": "Unique identifier of the folder where the template is placed."
|
||||
},
|
||||
"folder_name": {
|
||||
"type": "string",
|
||||
"description": "Folder name where the template is placed."
|
||||
},
|
||||
"application_key": {
|
||||
"type": "string",
|
||||
"description": "Your application-specific unique string key to identify tempate_id within your app."
|
||||
},
|
||||
"author": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "Unique identifier of the author."
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string",
|
||||
"description": "First name of the author."
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string",
|
||||
"description": "Last name of the author."
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"description": "Author email."
|
||||
}
|
||||
}
|
||||
},
|
||||
"documents": {
|
||||
"type": "array",
|
||||
"description": "List of documents attached to the template.",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
"description": "Unique identifier of the document."
|
||||
},
|
||||
"uuid": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier of the document."
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "URL of the document."
|
||||
},
|
||||
"preview_image_url": {
|
||||
"type": "string",
|
||||
"description": "Document preview image URL."
|
||||
},
|
||||
"filename": {
|
||||
"type": "string",
|
||||
"description": "Document filename."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user