Delete a channel
DELETE
/api/v3/channels/{channelSlug}
const url = 'https://api.tryletterhead.com/api/v3/channels/example';const form = new FormData();form.append('api', 'true');
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
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/channels/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form api=trueThis API deletes a channel with the provided channel identifier. Authorization is scoped to the channel’s own brand — a key tied to that brand authorizes deletion; a company-wide administrative key is not required.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” channelSlug
required
string
The newsletter’s channel identifier (slug).
Request Body required
Section titled “Request Body required ” Media type multipart/form-data
object
api
required
When set to true, this endpoint will accept authorization with your API Key.
string
Example
trueResponses
Section titled “ Responses ”The channel was deleted. No response body.
The deletion failed.
Media type application/json
object
message
string
Example
{ "message": "Unable to delete channel."}Still can’t find what you need? Contact support.