Skip to content

admin create_message.json

Timothy Duffy edited this page Mar 8, 2015 · 1 revision

###admin/create_message.json###

All admin api's require a token to be passed in. See get_access_token.json for more information.

admin/create_message.json?token=238236fa-0e1a-499c-8051-c46e2f416387

This call is an HTTP POST API. The command takes the following fields:

to_client_id
    This is the client if of the user that you are sending the message to.

subject
    This is free-form text that is the subject of the message.

text
    This is the free-form text contents of the message.

[optional]
parent_message_id
    If this is the first message of a chain, then you do not need to include this (and you shouldn't).
    If this is a response to a message that a client sent back to an admin/mod/sub, then 
    this field needs to be included.

Responses:

{
    "error_text": "Invalid auth token.",
    "success": false
}

{
    "error_text": "One or more of the following fields is missing or invalid: to_client_id, subject, text.\n",
    "success": false
}

This can happen if you are trying to respond to the message twice
{
    "success": false
}

This will be returned on a valid posting.
{
    "message_id": 3,
    "success": true 
}
Clone this wiki locally