-
Notifications
You must be signed in to change notification settings - Fork 0
Server Message
POST /message/draft
With a <draft_object> in the body of the request.
Pushes a the supplied <draft_object> into draft list of the client.
PUT /message/draft/<draft_id>/
With a <draft_object> in the body of the request.
Pushes a new version of the <draft_object> into draft list of the client.
GET /message/draft/list
Returns the draft list associated with current the client.
GET /message/listReturns a list of previously sent messages
The client is responsible for deciding which contacts (at which organizations) should receive a message - and for indicating the wished visibility of the recipient. The actual recipient visibility may be lower with some messaging protocols.
The server maps a contact at an organization to a number of actual delivery addresses (using the messaging_addresses table). An actual delivery address will only appear once in a message delivery (with the highest of the selected visibilities for that address).
POST /message/send
{
"to" : [<contact_id>@<organization_id>+],
"cc" : [<contact_id>@<organization_id>*],
"bcc" : [<contact_id>@<organization_id>*],
"message" : <message>Sends <message> to the listed contacts using the selected visibilities ("to", "cc" or "bcc").
HTTP status: 200 OK
An empty object is returned.
HTTP 400 Bad Request
{
"status": "bad request",
"description": "passed message argument is too long, missing or invalid"
}HTTP 400 Bad Request
{
"status": "bad request",
"description": "no contacts selected"
}HTTP 404 Not Found
{
"status": "not found",
"description": "one of the passed contacts could not be found in the database"
}HTTP 404 Not Found
{
"status": "not found",
"description": "none of the passed contacts have an enabled messaging address in the database"
}