---
title: Delete Contract
slug: v2-apis/delete-contract
description: Learn how to delete a contract from the Signzy system with this comprehensive document. Discover the necessary API call, including the required contract ID and customer ID, along with an optional delete reason. Find detailed instructions on making the req
createdAt: 2023-02-28T10:32:10.000Z
---

## Introduction

Client can choose to delete the contract from Signzy system once the contract is executed and need not be available in Signzy system. Parameters contactId and customerId are used to identify the contract to be deleted. Optional parameter deleteReason can be used to specify the reason of deletion to the signers.

## How to call the API

You will need to log in before sending the request. You are required to pass the access token received from the login call, as the authorization header in the request.

## API Input Guidelines

Need to pass follow information

### Sample Curl

::::Tabs
:::Tab{title="Preproduction"}
```curl
curl --location --request POST 'https://contracting-preproduction.signzy.tech/api/contractdetails/deleteContract' \
--header 'Authorization: <Auth Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
        "contractId": "..contractId..",
        "customerId": "..customerId..",
        "deleteReason": "..deleteReason..."
    }'

```
:::

:::Tab{title="Production"}
```curl
curl --location --request POST 'https://contracting.signzy.tech/api/contractdetails/deleteContract' \
--header 'Authorization: <Auth Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
        "contractId": "..contractId..",
        "customerId": "..customerId..",
        "deleteReason": "..deleteReason..."
    }'



```
:::
::::

### Input Parameters

| **PARAMETERS** | **DESCRIPTION**                                                                        | **REQUIRED/OPTIONAL** |
| -------------- | -------------------------------------------------------------------------------------- | --------------------- |
| contractId     | Unique Id of the contract                                                              | Required              |
| customerId     | Unique Id of the customer                                                              | Required              |
| deleteReason   | Reason of deletion. If present, it will be displayed in the email sent to the signers. | Optional              |

### Sample Response

```json
{
    "deleteResponse": "SUCCESS"
}
```

### Response Parameter

| **PARAMETERS** | **DESCRIPTION**                         |
| -------------- | --------------------------------------- |
| deleteResponse | delete response status for the contract |

## Sample Error

:::CodeblockTabs
400

```json
{
  "type": "Error",
  "status": 400,
  "code": "Invalid Customer Id",
  "statusCode": 400
}
```

400

```json
{
  "type": "Error",
  "status": 400,
  "code": "Invalid Contract Id",
  "statusCode": 400
}
```

400

```json
{
  "type": "Error",
  "status": 400,
  "code": "Invalid delete reason",
  "statusCode": 400
}
```

401

```json
{
    "error": {
        "statusCode": 401,
        "name": "Error",
        "message": "Authorization failed"
    }
}
```

500

```json
{
    "error": {
        "name": "Error",
        "message": "Internal Server Error",
        "statusCode": 500
    }
}
```
:::

### Error Parameter

| **PARAMETER NAME** | **DESCRIPTION**                    |
| ------------------ | ---------------------------------- |
| error              | This parameter contains the error. |
| error.statusCode   | Request Status code from Signzy    |
| error.name         | the name of the error              |
| error.message      | the error message                  |
| type               | type of the error                  |

### Error Codes

| **CODE** | **DESCRIPTION**       | **INTERPRETATION**                                                   |
| -------- | --------------------- | -------------------------------------------------------------------- |
| 400      | Bad Request           | Input Parameter has a missing required parameter or not a valid one. |
| 401      | Authorization Failed  | Authorization token is invalid.                                      |
| 500      | Internal Server Error | Internal error at Signzy, please contact support.                    |





:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

