Visit api.envoke.com to test APIs and get examples in 20+ languages
All examples below show the POST URL followed by the POST data. Each example below also includes a cURL request. Make sure to change the API_ID and API_KEY with your values.
Send a message
Endpoint: /messages/{id}/send
βHTTP method: POST
βURL: https://e1.envoke.com/v2/messages/{MESSAGE_ID}/send
Supply the message send time and date in POST data:
https://e1.envoke.com/v2/messages/1234/send
{
"send_time": "2024-12-01 15:35:00"
}
curl -X POST -u API_ID:API_KEY -d '{"send_time": "2024-12-01 15:35:00"}' "https://e1.envoke.com/v2/messages/1234/send"
Successful response:
{
"success": true,
"result_text": "Message scheduled for send",
"result_data": {
"id": "1234",
"send_time": "2024-12-01 15:35:00",
"recipients": {
"total_selected": 47,
"emails_to_be_sent": 45,
"excluded_unsubscribed_contacts": 0,
"excluded_invalid_emails": 0,
"excluded_bounced_emails": 2,
"excluded_unverified_emails": 0
}
}
}
Cancel a message that is scheduled to send
Endpoint: /messages/{id}/cancel
βHTTP method: POST
βURL: https://e1.envoke.com/v2/messages/{MESSAGE_ID}/cancel
Send an empty POST request to cancel a scheduled message:
https://e1.envoke.com/v2/messages/1234/cancel
curl -X POST -u API_ID:API_KEY "https://e1.envoke.com/v2/messages/1234/cancel"
Successful response:
{
"success": true,
"result_text": "Message reverted to draft status",
"result_data": {
"id": "1234",
"status": "Draft",
...
}
}