Send user a manual message

This method creates a manual message (chat, a big/small pop-up or email) and immediately sends it to the user.

Created conversation will appear in the "Inbox" section only after the user answers it.

URL

POST https://api.dashly.app/users/{id}/sendmessage

For {id} you can use:

  • Dashly ID
  • User ID (add by_user_id=true parameter) 400 LookupError will be returned if there's no user with such id.

Parameters

Authentification parameters.
id_as_string parameter.

Parameter Type Description
by_user_id Optional[boolean] Should be true in case you're using User ID instead of Dashly ID. Default: false
body string Message text
type Optional[popup_chat/popup_small/popup_big] Message type. Default: popup_chat
app Optional[ID] ID of requesting application. Default: calculated based on access token.

Response

data will contain 2 identifiers:

  • conversation — conversation id
  • message — manual message id
{
  "meta": {
    "status": 200
  },
  "data": {
    "conversation": 1128184,
    "message": 2804
  }
}

Example

curl -X POST \
  --data-urlencode 'body=Hello' \
  -H "Authorization: Token XXX" \
  https://api.dashly.app/users/2137216/sendmessage