> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.payroc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.payroc.com/_mcp/server.

# Cancel signature instruction

DELETE https://api.payroc.com/v1/signature-instructions/{signatureInstructionId}

Use this method to cancel a signature instruction.  

To cancel a signature instruction, you need its signatureInstructionId. Our gateway returned the signatureInstructionId in the response of the [Submit signature instruction](https://docs.payroc.com/api/schema/payroc-cloud/signature-instructions/submit) method.


Reference: https://docs.payroc.com/api/schema/payroc-cloud/signature-instructions/delete

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.payroc.com/v1` (Production, default)
- `https://api.uat.payroc.com/v1` (UAT)

## Request

### Path parameters

- `signatureInstructionId` (string, required) — Unique identifier that our gateway assigned to the signature instruction.

## Response

### 204

Successful request. We canceled the signature instruction.

## Errors

### 400 Bad Request Error

Invalid request

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem
- `errors` (list of object, optional)
  - `message` (string, optional) — Error message

### 401 Unauthorized Error

Identity could not be verified

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem

### 403 Forbidden Error

Do not have permissions to perform this action

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem
- `instance` (string, optional) — Resource path the action was attempted on
- `resource` (string, optional) — Resource the action was attempted on

### 404 Not Found Error

Resource not found

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem
- `resource` (string, optional) — Resource that was not found

### 406 Not Acceptable Error

Not acceptable

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem

### 409 Conflict Error

Conflict

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem
- `instance` (string, optional) — Resource path to the existing resource
- `errors` (list of object, optional)
  - `message` (string, optional) — Error message
- `link` (object, optional) — Object that contains HATEOAS links for the resource.
  - `rel` (string, required) — Indicates the relationship between the current resource and the target resource.
  - `method` (string, required) — HTTP method that you need to use with the target resource.
  - `href` (string, required) — URL of the target resource.

### 500 Internal Server Error

An error has occured

- `type` (string, required) — URI reference identifying the problem type
- `title` (string, required) — Short description of the issue.
- `status` (integer, required) — Http status code
- `detail` (string, required) — Explanation of the problem
- `errors` (list of object, optional)
  - `message` (string, optional) — Error message

## Examples

**SDK Code**

```python
import requests

url = "https://api.payroc.com/v1/signature-instructions/a37439165d134678a9100ebba3b29597"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.payroc.com/v1/signature-instructions/a37439165d134678a9100ebba3b29597';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.payroc.com/v1/signature-instructions/a37439165d134678a9100ebba3b29597"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.payroc.com/v1/signature-instructions/a37439165d134678a9100ebba3b29597")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.delete("https://api.payroc.com/v1/signature-instructions/a37439165d134678a9100ebba3b29597")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('DELETE', 'https://api.payroc.com/v1/signature-instructions/a37439165d134678a9100ebba3b29597', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.payroc.com/v1/signature-instructions/a37439165d134678a9100ebba3b29597");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.payroc.com/v1/signature-instructions/a37439165d134678a9100ebba3b29597")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```