Create Message

CUSTOM-IMPORTANT

Apps are only allowed to create a special kind of update with type app_update.

CUSTOM-ENDPOINT

POST https://api.speakap.io/networks/:eid/messages/

Use Cases

  • Create updates directed at a group
  • Create updates directed at a single user

CUSTOM-AUTHORIZATION

Permissions: post_updates, post_to_any_group

CUSTOM-REQUEST

  • URI: /networks/{networkEID}/messages/
  • Method: POST
  • Content-Type: application/json
  • Authentication: OAuth 2.0

Parameters

NameTypeDescription
networkEIDEIDNetwork EID

Request body

Supply a complete message resource in the request body possibly supplemented with a recipient or parent object. You should omit created date as it will be set server-side. The author relation will be automatically set to the logged in user.

NameTypeDescription
recipientobjectMessage recipient
recipient.EIDEIDUnique entity identifier
recipient.typestringRecipient type ('network''group''user' or 'conversation')
parentobjectParent message in case of a comment
parent.EIDEIDUnique entity identifier
parent.typestringMessage type

Examples

Sending an update as an Application client:

{
    "messageType": "app_update",
    "localizableBody": {
        "en-US" : "I would like to buy a hamburger.",
        "fr-FR" : "Je voudrais acheter un hamburger.",
        "nl-NL" : "Ik wil graag een hamburger kopen."
    },
    "recipient": {
        "EID": "1234567890ABCDEF",
        "type": "network"
    }
}

Response

StatusData
202Accepted for insertion: returns a Feedback object
400Invalid data: returns an Error object
403Unauthorized: returns an Error object
404Unknown network: returns an Error object