« Back to Documentation Overview

delete_newsletter

Section: Messages
Version: 1.5.0


Delete newsletter from campaign.
Warning: You can delete only newsletters that have send_on date in future.
Warning: Message must not be in use by another entity such as segment or action based autoresponder, otherwise Message cannot be deleted error will be thrown.


Parameters
stringAPI_KEY
object
stringmessageMESSAGE_ID
Return Value
integerdeleted1

Example Request JSON

[
    "API_KEY",
    {
        "message": "MESSAGE_ID"
    }
]

Example Response JSON

{
    "deleted": 1
}

Example Error Response JSON

{
    "code": -1,
    "message": "Message cannot be deleted"
}
Method-specific Errors
Missing message
Message is not newsletter
Message send event already passed
Message cannot be deleted
API-wide Errors
API key verification failed API key verification failed
API client IP not allowed API client IP not allowed
Invalid params Attribute params must be reference to hash