# Cancel Incomplete Signature Request POST https://api.hellosign.com/v3/signature_request/cancel/{signature_request_id} Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. Reference: https://developer.hellosign.com/api/signature-request/cancel ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Cancel Incomplete Signature Request version: endpoint_signatureRequest.cancel paths: /signature_request/cancel/{signature_request_id}: post: operationId: cancel summary: Cancel Incomplete Signature Request description: >- Cancels an incomplete signature request. This action is **not reversible**. The request will be canceled and signers will no longer be able to sign. If they try to access the signature request they will receive a HTTP 410 status code indicating that the resource has been deleted. Cancelation is asynchronous and a successful call to this endpoint will return an empty 200 OK response if the signature request is eligible to be canceled and has been successfully queued. This 200 OK response does not indicate a successful cancelation of the signature request itself. The cancelation is confirmed via the `signature_request_canceled` event. It is recommended that a [callback handler](/api/reference/tag/Callbacks-and-Events) be implemented to listen for the `signature_request_canceled` event. This callback will be sent only when the cancelation has completed successfully. If a callback handler has been configured and the event has not been received within 60 minutes of making the call, check the status of the request in the [API Dashboard](https://app.hellosign.com/apidashboard) and retry the cancelation if necessary. To be eligible for cancelation, a signature request must have been sent successfully, must not yet have been signed by all signers, and you must either be the sender or own the API app under which it was sent. A partially signed signature request can be canceled. **NOTE:** To remove your access to a completed signature request, use the endpoint: `POST /signature_request/remove/[:signature_request_id]`. tags: - - subpackage_signatureRequest parameters: - name: signature_request_id in: path description: The id of the incomplete SignatureRequest to cancel. required: true schema: type: string - name: Authorization in: header description: Basic authentication of the form `Basic `. required: true schema: type: string responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/signatureRequest_cancel_Response_200' '400': description: failed_operation content: {} components: schemas: signatureRequest_cancel_Response_200: type: object properties: {} ``` ## SDK Code Examples ```php PHP setUsername("YOUR_API_KEY"); // $config->setAccessToken("YOUR_ACCESS_TOKEN"); try { (new Dropbox\Sign\Api\SignatureRequestApi(config: $config))->signatureRequestCancel( signature_request_id: "fa5c8a0b0f492d768749333ad6fcc214c111e967", ); } catch (Dropbox\Sign\ApiException $e) { echo "Exception when calling SignatureRequestApi#signatureRequestCancel: {$e->getMessage()}"; } ``` ```csharp C# using System; using System.Collections.Generic; using System.IO; using System.Text.Json; using Dropbox.Sign.Api; using Dropbox.Sign.Client; using Dropbox.Sign.Model; namespace Dropbox.SignSandbox; public class SignatureRequestCancelExample { public static void Run() { var config = new Configuration(); config.Username = "YOUR_API_KEY"; // config.AccessToken = "YOUR_ACCESS_TOKEN"; try { new SignatureRequestApi(config).SignatureRequestCancel( signatureRequestId: "fa5c8a0b0f492d768749333ad6fcc214c111e967" ); } catch (ApiException e) { Console.WriteLine("Exception when calling SignatureRequestApi#SignatureRequestCancel: " + e.Message); Console.WriteLine("Status Code: " + e.ErrorCode); Console.WriteLine(e.StackTrace); } } } ``` ```typescript TypeScript import * as fs from 'fs'; import api from "@dropbox/sign" import models from "@dropbox/sign" const apiCaller = new api.SignatureRequestApi(); apiCaller.username = "YOUR_API_KEY"; // apiCaller.accessToken = "YOUR_ACCESS_TOKEN"; apiCaller.signatureRequestCancel( "fa5c8a0b0f492d768749333ad6fcc214c111e967", // signatureRequestId ).catch(error => { console.log("Exception when calling SignatureRequestApi#signatureRequestCancel:"); console.log(error.body); }); ``` ```java Java package com.dropbox.sign_sandbox; import com.dropbox.sign.ApiException; import com.dropbox.sign.Configuration; import com.dropbox.sign.api.*; import com.dropbox.sign.auth.*; import com.dropbox.sign.JSON; import com.dropbox.sign.model.*; import java.io.File; import java.math.BigDecimal; import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.List; import java.util.Map; public class SignatureRequestCancelExample { public static void main(String[] args) { var config = Configuration.getDefaultApiClient(); ((HttpBasicAuth) config.getAuthentication("api_key")).setUsername("YOUR_API_KEY"); // ((HttpBearerAuth) config.getAuthentication("oauth2")).setBearerToken("YOUR_ACCESS_TOKEN"); try { new SignatureRequestApi(config).signatureRequestCancel( "fa5c8a0b0f492d768749333ad6fcc214c111e967" // signatureRequestId ); } catch (ApiException e) { System.err.println("Exception when calling SignatureRequestApi#signatureRequestCancel"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); e.printStackTrace(); } } } ``` ```ruby Ruby require "json" require "dropbox-sign" Dropbox::Sign.configure do |config| config.username = "YOUR_API_KEY" # config.access_token = "YOUR_ACCESS_TOKEN" end begin Dropbox::Sign::SignatureRequestApi.new.signature_request_cancel( "fa5c8a0b0f492d768749333ad6fcc214c111e967", # signature_request_id ) rescue Dropbox::Sign::ApiError => e puts "Exception when calling SignatureRequestApi#signature_request_cancel: #{e}" end ``` ```python Python import json from datetime import date, datetime from pprint import pprint from dropbox_sign import ApiClient, ApiException, Configuration, api, models configuration = Configuration( username="YOUR_API_KEY", # access_token="YOUR_ACCESS_TOKEN", ) with ApiClient(configuration) as api_client: try: api.SignatureRequestApi(api_client).signature_request_cancel( signature_request_id="fa5c8a0b0f492d768749333ad6fcc214c111e967", ) except ApiException as e: print("Exception when calling SignatureRequestApi#signature_request_cancel: %s\n" % e) ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.hellosign.com/v3/signature_request/cancel/fa5c8a0b0f492d768749333ad6fcc214c111e967" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Basic :") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```swift import Foundation let headers = ["Authorization": "Basic :"] let request = NSMutableURLRequest(url: NSURL(string: "https://api.hellosign.com/v3/signature_request/cancel/fa5c8a0b0f492d768749333ad6fcc214c111e967")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ```