> You are reading the Docusign Developer Documentation. For clean Markdown of any page, append .md to the page URL.
>
> Documentation indexes by section:
> - APIs and SDKs: https://docusign.docs.buildwithfern.com/docs/llms.txt
> - Platform 101: https://docusign.docs.buildwithfern.com/platform/llms.txt
> - Extension Apps: https://docusign.docs.buildwithfern.com/extension-apps/llms.txt
> - Docusign CLI: https://docusign.docs.buildwithfern.com/docusign-cli/llms.txt
>
> Authentication (OAuth, JWT Grant, M2M): https://docusign.docs.buildwithfern.com/platform/auth
> Webhooks and Connect: https://docusign.docs.buildwithfern.com/platform/webhooks
>
> OpenAPI specifications: https://docusign.docs.buildwithfern.com/openapi.json
> MCP server: https://docusign.docs.buildwithfern.com/_mcp/server

# TSP Complete Sign Hash Session Information

`POST /restapi/{apiVersion}/signature/completesignhash`

This method provides completed signing session information from the TSP. It builds the resulting signed PDF.

## Request Header Parameters

The following header parameters apply to the TSP API and the CMS API calls.

| Name                        | Type   | Description                                                                                                                     |
| --------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| Authentication              | String | Required. See [Authentication](/docs/tsp-api/tsp101/tsp-authentication)                                                         |
| Content-Type                | String | Required. Specifies the type of data returned in the request body. This parameter must be set to `application/json`.            |
| X-Docusign-CorrelationToken | GUID   | Optional. ID used for telemetry. Docusign recommends that you set up a correlation token for all the TSP API and CMS API calls. |

## Request Body Parameters

This table provides descriptions of the information in the request.

| Name                                                   | Description                                                                                                                                                                                                                                                                                                                                                                                              |
| ------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| documentUpdateInfos                                    | Required                                                                                                                                                                                                                                                                                                                                                                                                 |
| documentUpdateInfos.data                               | Required. The base 64 encoded value of the Cryptographic Message Syntax (CMS).                                                                                                                                                                                                                                                                                                                           |
| documentUpdateInfos.documentId                         | Required. String document identifier for the given document. **Note**: when using `completesignhash` to create timestamping data, the identifier must correspond to the value of `documentID` returned by the response to the previous `completesignhash` request. For more information, see [Long term validation of PDF signatures](/docs/tsp-api/tsp101/long-term-signature-validation).              |
| documentUpdateInfos.documentSecurityStore              | Optional. Embeds the validation information. PAdES B-LTA and PAdES B-LT formats require this parameter.                                                                                                                                                                                                                                                                                                  |
| documentUpdateInfos.documentSecurityStore.certificates | Optional. An array of the base64 certificates builds the chain of trust from the user certificate up to the AATL (Adobe Approved Trust List) trusted root. PAdES B-LTA and PAdES B-LT formats require this parameter.                                                                                                                                                                                    |
| documentUpdateInfos.documentSecurityStore.crls         | Optional. An array of the base64 CRLs (Certificate Revocation List) containing the revocation information on the certificate chain. PAdES B-LTA and PAdES B-LT formats require that the signature embeds the revocation status of the certificate chain either through CRLs or OCSP servers. **Important**: the size of the CRLs can impact the size of the resulting PDF. Consider using OCSPs instead. |
| documentUpdateInfos.documentSecurityStore.ocsps        | Optional. An array of the base64 encoded OCSPs (Online Certificate Status Protocol) that provide revocation information on the certificate chain. PAdES B-LTA and PAdES B-LT formats require that the signature embeds the revocation status of the certificate chain either through CRLs or OCSP servers.                                                                                               |
| documentUpdateInfos.name                               | Optional. String containing the suggested document name.                                                                                                                                                                                                                                                                                                                                                 |
| documentUpdateInfos.returnFormat                       | Required. A string indicating the requested return format. The only allowed return format is "CMS".                                                                                                                                                                                                                                                                                                      |
| documentUpdateInfos.timeStampField                     | Optional. PAdES B-LTA format requires that you set this parameter to an empty value in the request that creates the last signature. This configuration triggers the creation of a timestamp that is sent back to Docusign and added to the PDF. For more information, see [Long term validation of PDF signatures](/docs/tsp-api/tsp101/long-term-signature-validation).                                 |
| transactionId                                          | Optional. A string holding the TSP transaction ID. This parameter allows you to correlate information between Docusign and the TSP.                                                                                                                                                                                                                                                                      |

## Response Information

If successful, this returns completeSignResponse. The table below provides descriptions of the information in the response.

| Name                          | Description                                                                                                     |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------- |
| redirectionUrl                | The URL that is redirecting the user after signing completion.                                                  |
| remainingSignatureRequests    | A string representing the number of signature requests remaining for documents that require multiple signatures |
| documents                     | An array of documents if more signatures are required                                                           |
| documents.name                | A string representing the name of the document being signed.                                                    |
| documents.documentId          | A string representing the identifier for the document that must be returned in subsequent requests              |
| documents.data                | A Base 64 String representing the hash stream or ASN1Set SignedAttributes to be signed.                         |
| documents.remainingSignatures | A string representing the number of remaining signatures to apply to the document.                              |

**`Request syntax`**

```json title="Request syntax"
{
    "documentUpdateInfos": [{
        "documentId": "string",
        "data": "base 64 string",
        "returnFormat": "string",
        "documentSecurityStore": {
            "certificates": "array of base64 encoded certificates",
            "ocsps": "array of base64 encoded OCSPs",
        },
        "timestampField": "the empty string if a timestamp signature is required, null otherwise"
    }],
    "transactionId": "string"
}
```

**`Response syntax`**

```json title="Response syntax"
{
  "redirectionUrl": "string",
  "documents": [
    {
      "name": "string",
      "documentId": "string",
      "data": "base 64 string",
      "remainingSignatures": "string"
    }
  ],
  "remainingSignatureRequests": "string"
}
```

**`Example request`**

```json title="Example request"
{
  "documentUpdateInfos": {
    "data": "R0lBTl...tDUzc=",
    "returnFormat": "CMS",
    "documentSecurityStore": {
      "certificates": [
        "MIIDnTCCAySg...wl0XkgT+n/whzcOg=",
        "MIIDZGVmaW5p...seSBub3QgYSB1c2VyIGNlcnQ==",
        "MIIDnTYSByb2...GNlcnQ=cOg="
      ],
      "ocsps": [
        "Z3JlYXRlc3Qg...lciBjZXJ0IG9jc3A===",
        "aWNhIGNlcnQg...b2NzcA=="
      ]
    }
  }
}
```