Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Callback

Set a permanent callback URL to receive task status updates.

Configuring the Status Callback

To configure a callback URL, navigate to:

Subscription → Settings → Account Settings → Advanced Settings → Additional API Settings

Enter your full HTTPS callback URL (https://your-domain.com/callback) and save your changes.

The system automatically sends an HTTP POST request to the configured endpoint whenever a task's status changes.

You can also configure a template-specific callback URL for individual templates, allowing you to receive status updates at different endpoints based on the template used.

Status Callback - Payload Structure

When a document is signed, 2Sign sends an HTTP POST request to the callback URL configured in your account under Additional API Settings.

The callback is sent using the following content type:

Content-Type: application/x-www-form-urlencoded

Example Callback Request

POST /api/2sign/callback HTTP/1.1
Host: your-domain.com
Content-Type: application/x-www-form-urlencoded

Example Payload

The following example represents a callback sent after a document has been signed.

For readability, the payload is displayed in JSON format. The actual request is sent as URL-encoded form data.

Payload Fields

Field

Description

taskId

Unique numeric identifier of the task

taskGuid

Unique GUID identifying the task

taskUserId

Unique identifier of the task user

taskUserEmail

Email address associated with the task user

taskName

Name of the task

isTaskGroup

Indicates whether the task belongs to a task group

taskDeclineReason

Reason for declining the task, if applicable

clientMails

Email addresses associated with the task

signaturePositions

Base64-encoded JSON containing information about the signature fields

AdditionalParams

Allows you to pass custom data as a JSON object when creating a task.

Callback URL and Response

The callback URL must use HTTPS to ensure secure communication.

When a document is signed, 2Sign sends an HTTPS POST request to the configured callback endpoint with the task details.

Your server should acknowledge receipt of the callback by returning a successful HTTP response, such as:

The response is transmitted over the same secure HTTPS connection. Important: Make sure your callback endpoint is publicly accessible and configured to handle application/x-www-form-urlencoded requests rather than expecting a JSON request body.


AdditionalUserParamsObject parameter

The AdditionalUserParamsObject parameter allows you to pass custom data as a JSON object when creating a task.

You can include any additional information relevant to your integration, such as internal IDs, reference numbers, or custom metadata.

The data you provide will be returned in the callback after the document is signed, allowing you to easily associate the signed document with records in your system.

Last updated