Delete a letter
const url = 'https://api.tryletterhead.com/api/v3/letters/example?api=true';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url 'https://api.tryletterhead.com/api/v3/letters/example?api=true' \ --header 'Authorization: Bearer <token>'Permanently delete a letter (or template) by its unique identifier. The letter is removed from every list and can no longer be retrieved, scheduled, or sent.
If the letter is attached to an Automation Series step, that step is detached so the automation keeps running.
What is the letter’s unique identifier? An alphanumeric string, often around ten characters, e.g. ludctamgd6.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The letter’s unique identifier — an alphanumeric string around ten characters, e.g. ludctamgd6.
Query Parameters
Section titled “Query Parameters ”When true, tells the endpoint you are authenticating with a company API key (the key you generate under a company’s administrative settings) rather than a logged-in user session. For API integrations you will almost always set this to true.
Responses
Section titled “ Responses ”Letter deleted
object
Example
{ "items": null, "message": "Company letter ludctamgd6 has been deleted.", "total": 0}Still can’t find what you need? Contact support.