JavaScript
import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const endpoint = await client.endpoints.delete('id');
console.log(endpoint.cleanup);curl --request DELETE \
--url https://inbound.new/api/e2/endpoints/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://inbound.new/api/e2/endpoints/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://inbound.new/api/e2/endpoints/{id}",
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>"
],
]);
$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://inbound.new/api/e2/endpoints/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
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://inbound.new/api/e2/endpoints/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://inbound.new/api/e2/endpoints/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"cleanup": {
"emailAddressesUpdated": 123,
"emailAddresses": [
"<string>"
],
"domainsUpdated": 123,
"domains": [
"<string>"
],
"groupEmailsDeleted": 123,
"deliveriesDeleted": 123
}
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123
}{
"error": "<string>"
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123
}Endpoints
Delete endpoint
Delete an endpoint and clean up associated resources (email addresses become store-only, domains lose catch-all config, group entries and delivery history are deleted)
DELETE
/
api
/
e2
/
endpoints
/
{id}
JavaScript
import Inbound from 'inboundemail';
const client = new Inbound({
apiKey: process.env['INBOUND_API_KEY'], // This is the default and can be omitted
});
const endpoint = await client.endpoints.delete('id');
console.log(endpoint.cleanup);curl --request DELETE \
--url https://inbound.new/api/e2/endpoints/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://inbound.new/api/e2/endpoints/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://inbound.new/api/e2/endpoints/{id}",
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>"
],
]);
$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://inbound.new/api/e2/endpoints/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
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://inbound.new/api/e2/endpoints/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://inbound.new/api/e2/endpoints/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"cleanup": {
"emailAddressesUpdated": 123,
"emailAddresses": [
"<string>"
],
"domainsUpdated": 123,
"domains": [
"<string>"
],
"groupEmailsDeleted": 123,
"deliveriesDeleted": 123
}
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123
}{
"error": "<string>"
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123
}Was this page helpful?
⌘I