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);{
"message": "<string>",
"cleanup": {
"emailAddressesUpdated": 123,
"emailAddresses": [
"<string>"
],
"domainsUpdated": 123,
"domains": [
"<string>"
],
"groupEmailsDeleted": 123,
"deliveriesDeleted": 123
}
}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)
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);{
"message": "<string>",
"cleanup": {
"emailAddressesUpdated": 123,
"emailAddresses": [
"<string>"
],
"domainsUpdated": 123,
"domains": [
"<string>"
],
"groupEmailsDeleted": 123,
"deliveriesDeleted": 123
}
}Was this page helpful?