---
title: Upload Doc Signer Class 2 Certificate
slug: contract360/upload-doc-signer-class-2-certificate
description: Learn how to securely incorporate digital signatures into your document workflow with the Upload Doc Signer Class 2 Certificate API. This API allows users to upload a PFX file and password to enable authorized access. Discover sample cURL commands, input 
docTags: 
createdAt: 2023-08-07T06:34:05.459Z
---

# Introduction

Introducing the "**Upload Doc Sign Config**" – a powerful tool designed to streamline the process of securely incorporating digital signatures into your document workflow. **This API enables you to effortlessly upload your Document Signer Certificate Class 2, represented as a PFX file, along with its corresponding password.** Once uploaded, the API employs robust encryption mechanisms to safeguard this sensitive information within the server. This ensures that your certificate remains protected and confidential, ready to be utilized for the seamless and secure signing of documents. With this innovative solution, you can confidently enhance your document signing procedures, maintaining the highest standards of security and integrity throughout the process.

# Authentication

API authentication is a crucial security process that ensures authorized access to an application programming interface (API). It involves validating the identity of users or systems seeking to interact with the API. Please use the `access token` shared with you by your assigned Signzy's CSM. Please set the value of the key `Authorization` in the headers to the `access token`, while making an API call. In this way, Signzy's system will be able to authenticate you and you will be able to make a successful API call.&#x20;

# API Details

The details of the API can be found here.

## Sample cURL

:::CodeblockTabs
Pre Production

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/esign/uploadDocSignConfig' \
--header 'Authorization: XXXXXXXXXXXXXXXXXXXX' \
--form 'type="DocSignerClass2"' \
--form 'certificateName="test certificate"' \
--form 'docSignerClass2PfxFile=@"/path/to/file"' \
--form 'passwordOfPfxFile=""' \
--form 'docSignerClass2PfxUrl=""' \
--form 'logoUrl=""' \
--form 'ttl="1 year"'
```

Production

```curl
curl --location 'https://api.signzy.app/api/v3/esign/uploadDocSignConfig' \
--header 'Authorization: XXXXXXXXXXXXXXXXXXXX' \
--form 'type="DocSignerClass2"' \
--form 'certificateName="test certificate"' \
--form 'docSignerClass2PfxFile=@"/path/to/file"' \
--form 'docSignerClass2PfxUrl=""' \
--form 'passwordOfPfxFile=""' \
--form 'logoUrl=""' \
--form 'ttl="1 year"'
```
:::

## Input Parameters

| **Parameter Name**     | **Type** | **Mandatory/Optional**       | **Description**                                                                                                                                                                                                    |
| ---------------------- | -------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| type                   | String   | Mandatory                    | For uploading DSC class 2 certificate, pass 'DocSignerClass2'                                                                                                                                                      |
| certificateName        | String   | Optional                     | Name for the certificate uploaded. This will be used in the signature appearance printed on the document. If not passed, origianal name fetched from certificate details will be used in the signature appearance. |
| docSignerClass2PfxFile | File     | Conditionally<br />Mandatory | Upload the PFX file. This will be in the name of organization and will be used for signing of the documents<br />Note: Not required incase docSignerClass2PfxUrl is passed                                         |
| docSignerClass2PfxUrl  | String   | Conditionally<br />Mandatory | Pass the URL of PFX file. This will be used for signing the documents.<br />Note: Not required incase docSignerClass2PfxFile is uploaded                                                                           |
| passwordOfPfxFile      | String   | Mandatory                    | Password of the PFX file                                                                                                                                                                                           |
| logoUrl                | String   | Optional                     | URL of the logo of the client which will be used in the sign that will appear on the signed pdf file.<br /><br />It can have 3 allowed formats -<br /><br />PNG (.png)<br />JPG (.jpg)<br />JPEG (.jpeg)           |
| ttl                    | String   | Mandatory                    | Number of days/months/year for which the PFX file uploaded by you will be in Signzy's system. Post that, it will be purged permanently. For example, 1 days, 2 days, 10 days, 1 month, 3 month, etc.               |

## Sample Response

:::CodeblockTabs
200

```json
{
    "certificateId": "66547fb11ddbd3b75a893ff2",
    "isUploadSuccessful": true,
    "certificateName": "DS SIGNZY TECHNOLOGIES PRIVATE LIMITED 10",
    "validFrom": "2024-02-22T12:18:24.000Z",
    "validTill": "2027-02-21T12:18:24.000Z",
    "ttl": "2025-05-27T12:42:25.021Z"
}
```
:::

## Output Parameters

| **Parameter Name** | **Type** | **Description**                                                                                                                                                      |
| ------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| certificateId      | String   | ID of the certificate that has been uploaded, the certificate ID has to be used while doing the eSign.                                                               |
| isUploadSuccessful | Boolean  | - If the upload is successful, the value would be <font color="">`TRUE`</font><br />- If the upload is unsucessful, the value would be <font color="">`FALSE`</font> |
| certificateName    | String   | Title of the certificate                                                                                                                                             |
| validFrom          | String   | The start date of the validity of the certificate                                                                                                                    |
| validTill          | String   | The end date of the validity of the certificate                                                                                                                      |

## Sample Errors

:::CodeblockTabs
400

```json
{
    "name": "error",
    "message": "docSignerClass2PfxFile is not allowed to be empty",
    "reason": "VALIDATION_ERROR",
    "type": "Bad Request",
    "statusCode": 400
}
```

400

```json
{
    "name": "error",
    "message": "Validation failed for DSC certificate",
    "reason": "Bad Request",
    "type": "Bad Request",
    "statusCode": 400
}
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

404

```json
{
    "name": "error",
    "message": "Unable to download file",
    "reason": "NOT FOUND ERROR",
    "type": "Not Found",
    "statusCode": 404
}
```

500

```json
{
    "message": "Internal Server Error"
}
```

504

```json
{
    "message": "The upstream server is timing out"
}
```
:::

## Error Parameter

| **Parameter** | **Type** | **Description**                                 |
| ------------- | -------- | ----------------------------------------------- |
| name          | String   | In case of error, the name will come as "error" |
| message       | String   | Error Message                                   |
| reason        | String   | Reason for the Error                            |
| type          | String   | Type of Error                                   |
| statusCode    | String   | Status code of the Error                        |

## Error Codes

| **Error Code** | **Error Message**     | **Explanation**                                                    |
| -------------- | --------------------- | ------------------------------------------------------------------ |
| 400            | Bad Request           | Input parameter has a missing required parameter or invalid inputs |
| 401            | Authorization Failed  | Authorization token is invalid                                     |
| 500            | Internal Server Error | Internal error at Signzy, Please write to us at help\@signzy.com   |

