Skip to main content

Update a Transaction

This guide walks you through updating an existing eSignature transaction using the Stewart Sign API. The PUT endpoint replaces the transaction's data with the provided payload.

When to Use

Updating a transaction is useful when you need to:

  • Modify participant details before signing begins
  • Change the transaction status (e.g., from draft to esign_pending)
  • Update document metadata or tags
  • Add or change a personalized message
  • Enable or disable signing order

Requirements

  1. You need to have Node.js installed on your system.
  2. You'll also need the axios library. You can install it using the following command:
npm install axios
  1. A valid Bearer token (JWT) for authentication.
  2. The transaction ID of the eSignature transaction you want to update.

Endpoint

PUT /transactions/{id}

ParameterTypeRequiredDescription
idstring (UUID)YesThe unique identifier of the eSignature transaction to update.

Request Body

The request body accepts the same fields as the create transaction endpoint. All fields are optional — only include the fields you want to update.

FieldTypeRequiredDescription
documentsarrayNoUpdated list of documents with tags
participantsarrayNoUpdated list of participants
statusstringNoTransaction status: draft, esign_pending, tagging_in_progress
notifyParticipantsobjectNoNotification preferences (e.g., { "email": true })
signingOrderbooleanNoEnable or disable signing order
personalizedMessagestringNoCustom email message body included in the signing email
emailSubjectstringNoCustom email subject line for signer notification emails (max 255 chars). If omitted, the system default subject is used.
referenceIdstringNoYour organization's unique reference ID
taggingOrganizationIdstringNoOrganization ID assigned to tag the document
taggingUserIdstringNoUser ID assigned to tag the document

Code Snippet

Use the following code snippet to update a transaction. Replace <transactionId> with the actual transaction ID, and <accessToken> with your API access token.

const axios = require("axios");

const transactionId = "<transactionId>";

const config = {
method: "put",
url: `https://public-api.sign.stewart.com/transactions/${transactionId}`,
headers: {
Authorization: "Bearer <accessToken>",
"Content-Type": "application/json",
},
data: {
status: "esign_pending",
personalizedMessage: "Please review and sign the updated documents.",
signingOrder: true,
notifyParticipants: {
email: true,
},
},
};

axios(config)
.then(function (response) {
console.log("Transaction updated successfully:", response.data);
})
.catch(function (error) {
console.log(error.response?.data || error.message);
});

Successful Response

On success, the API returns the updated transaction object:

{
"id": "391866a6-8ebb-4533-b6ab-c7bb4d6fbd38",
"status": "esign_pending",
"documents": [...],
"participants": [...]
}

Error Responses

StatusReason
400 Bad RequestInvalid request payload
401 UnauthorizedInvalid or expired Bearer token
409 ConflictCannot update a canceled eSign transaction

Steps to Execute the Code Snippet

  1. Create a new file named update_transaction.js.
  2. Copy and paste the code snippet provided above into the new file.
  3. Replace <transactionId> and <accessToken> with the appropriate values.
  4. Save the file and open a terminal or command prompt.
  5. Navigate to the folder where you saved the update_transaction.js file.
  6. Run the following command to execute the script:
node update_transaction.js

If the request is successful, you'll see the updated transaction details displayed in the console. In case of an error, the error details will be displayed instead.

Additional Resources

For more information about the eSignature API, visit the API reference.

If you need further assistance or have questions, feel free to reach out to our support team.