Delete Envelope
The Yoti sign API has the functionality to delete envelopes on demand.
Sandbox:
DELETE https://demo.api.yotisign.com/v2/envelopes/{envelope_id}
Production:
DELETE https://api.yotisign.com/v2/envelopes/{envelope_id}
Headers Explained
The following elements are needed:
Headers | Content |
|---|---|
Authorization | API Key to call the Yoti Sign API. This should be sent as a bearer token. |
Example code
const rp = require("request-promise");
const deleteEnvelope = () => {
const request = {
method: "DELETE",
uri: "<BASE_URL>/v2/envelopes/{envelope_id}",
headers: {
authorization: "Bearer <API_KEY>",
},
};
return rp(request)
.then((body) => body)
.catch((err) => err);
};
//send request
let result = await deleteEnvelope();
package com.yoti.sign;
import java.io.IOException;
import java.net.URI;
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonReader;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
public class MainDeleteEnvelope {
private static final String YOTI_SIGN_AUTH_TOKEN = "<YOUR_AUTH_TOKEN>";
private static final String YOTI_SIGN_BASE_URL = "https://api.yotisign.com/v2";
public static void main(String[] args) {
CloseableHttpClient client = HttpClients.createDefault();
HttpDelete httpDelete = new HttpDelete();
httpDelete.setHeader("Authorization", "Bearer " + YOTI_SIGN_AUTH_TOKEN);
<?php
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\Request;
$request = new Request(
'DELETE',
API_BASE_URL . "/envelopes/{envelope_id}",
[
'headers' => [
'Authorization' => 'Bearer ' . YOUR_API_KEY
],
]
);
$client = new Client();
$response = $client->send($request);
$json = json_decode($response->getBody());
Error codes
If the request is unsuccessful a response code and a message will be sent
Last updated on
Was this page helpful?
Next to read:
Find envelopeGot a question? Contact us here.
Welcome
eSignatures API