Delete document
curl --request DELETE \
--url https://api.{environment}.corti.app/v2/documents/{documentID} \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <tenant-name>'const options = {
method: 'DELETE',
headers: {'Tenant-Name': '<tenant-name>', Authorization: 'Bearer <token>'}
};
fetch('https://api.{environment}.corti.app/v2/documents/{documentID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.{environment}.corti.app/v2/documents/{documentID}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Tenant-Name", "<tenant-name>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
import requests
url = "https://api.{environment}.corti.app/v2/documents/{documentID}"
headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/documents/{documentID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Tenant-Name: <tenant-name>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.{environment}.corti.app/v2/documents/{documentID}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Tenant-Name", "<tenant-name>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.{environment}.corti.app/v2/documents/{documentID}")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.asString();{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}Guided Documents
Delete document
Deletes the document. This cannot be undone.
DELETE
/
documents
/
{documentID}
Delete document
curl --request DELETE \
--url https://api.{environment}.corti.app/v2/documents/{documentID} \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <tenant-name>'const options = {
method: 'DELETE',
headers: {'Tenant-Name': '<tenant-name>', Authorization: 'Bearer <token>'}
};
fetch('https://api.{environment}.corti.app/v2/documents/{documentID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));using RestSharp;
var options = new RestClientOptions("https://api.{environment}.corti.app/v2/documents/{documentID}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Tenant-Name", "<tenant-name>");
request.AddHeader("Authorization", "Bearer <token>");
var response = await client.DeleteAsync(request);
Console.WriteLine("{0}", response.Content);
import requests
url = "https://api.{environment}.corti.app/v2/documents/{documentID}"
headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/documents/{documentID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Tenant-Name: <tenant-name>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.{environment}.corti.app/v2/documents/{documentID}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Tenant-Name", "<tenant-name>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.{environment}.corti.app/v2/documents/{documentID}")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.asString();{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}Was this page helpful?
⌘I