layout | title |
---|---|
default |
Send Helper |
This document defines the Send Helper resource.
The Send Helper is a helper endpoint that sends a Message via POST or stops an already sending Message via DELETE.
The Send Helper POST and DELETE body is empty.
Typically, the response to a successful Send Helper POST or DELETE is a confirmation message and a 200 server code. Some servers may only allow you to send messages after some conditions are met (such as the message has a target list). Errors should be returned if your POST or DELETE is not successful.
{% include endpoints_and_url_structures.md %}
The link relation label for the Send Helper is osdi:send_helper
.
{% include scenarios_helper_intro.md %}
Posting to the send helper endpoint with a blank body will allow you to send a message.
POST https://osdi-sample-system.org/api/v1/messages/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/send
Header:
OSDI-API-Token:[your api key here]
{}
200 OK
Content-Type: application/hal+json
Cache-Control: max-age=0, private, must-revalidate
{
"notice": "Your message has been sent."
}
Sending a DELETE to the send helper endpoint with a blank body will stop the message from sending mid-send, if it hasn't already all gone out.
DELETE https://osdi-sample-system.org/api/v1/messages/d91b4b2e-ae0e-4cd3-9ed7-d0ec501b0bc3/send
Header:
OSDI-API-Token:[your api key here]
{}
200 OK
Content-Type: application/hal+json
Cache-Control: max-age=0, private, must-revalidate
{
"notice": "Your message has been stopped."
}