.NET Core C# / DocuSign eSignature REST API / 13. Delete Existing Lock on an Envelope
Back to Collection Items
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
Chilkat.Http http = new Chilkat.Http();
bool success;
// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>";
http.SetRequestHeader("X-DocuSign-Edit","<DocuSignEdit><LockToken>{{lockToken}}</LockToken></DocuSignEdit>");
Chilkat.HttpResponse resp = http.QuickRequest("DELETE","https://domain.com/{{apiVersion}}/accounts/{{accountId}}/envelopes/{{envelopeId}}/lock");
if (http.LastMethodSuccess == false) {
Debug.WriteLine(http.LastErrorText);
return;
}
Debug.WriteLine(Convert.ToString(resp.StatusCode));
Debug.WriteLine(resp.BodyStr);
Curl Command
curl -X DELETE
-H "Authorization: Bearer <access_token>"
-H "X-DocuSign-Edit: <DocuSignEdit><LockToken>{{lockToken}}</LockToken></DocuSignEdit>"
https://domain.com/{{apiVersion}}/accounts/{{accountId}}/envelopes/{{envelopeId}}/lock
Postman Collection Item JSON
{
"name": "13. Delete Existing Lock on an Envelope",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{accessToken}}",
"type": "string"
}
]
},
"method": "DELETE",
"header": [
{
"key": "X-DocuSign-Edit",
"value": "<DocuSignEdit><LockToken>{{lockToken}}</LockToken></DocuSignEdit>",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{baseUrl}}/{{apiVersion}}/accounts/{{accountId}}/envelopes/{{envelopeId}}/lock",
"host": [
"{{baseUrl}}"
],
"path": [
"{{apiVersion}}",
"accounts",
"{{accountId}}",
"envelopes",
"{{envelopeId}}",
"lock"
]
},
"description": "This example will delete the lock we created on the envelope."
},
"response": [
]
}