Docs
Email ›

Delete email message

DELETE/v1/sandboxes/{id}/email/messages/{messageId}

Deletes one message. It makes room in what the account may keep. What the message counted for, in the day's limits and on the bill, stays counted.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const sandbox = await agental.sandboxes.get("sbx_2a9a47e50daec64a");
  4. await sandbox.email.delete("eml_9c41d0a7b2e65f38");
Answer204 No Content

No body: the status says it was done.

The message is deleted.

Path

idrequired
string
e.g. "sbx_0123456789abcdef"
messageIdrequired
string
e.g. "eml_9c41d0a7b2e65f38"

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

204 The message is deleted.

Errors and other answers

404 Not found.

Every error answers { "error": { "code", "message" } }; a key without the action a call needs answers 403 key_action_forbidden, naming it.