Deletes a Contact defined by id.
DELETE
https://api.usetrust.app/v1/contacts/{id}
Path Parameters
- idstringrequired
Responses
200
400
- string
404
- string
500
- string
curl
curl --request DELETE \
--url https://api.usetrust.app/v1/contacts/{id} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'DELETE',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.usetrust.app/v1/contacts/{id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.usetrust.app/v1/contacts/{id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.usetrust.app/v1/contacts/{id}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
csharp
var options = new RestClientOptions("https://api.usetrust.app")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/v1/contacts/{id}", Method.Delete);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);200
// Contact deleted
400
// Bad Request
""404
// Not Found
""500
// Internal Server Error
""