Skip to main content
POST/message/

Create message

You can send a message to your user. Message content can be just plain text or HTML.

Hi <b>user</b>, enjoy our product!

The message will be shown as follow:

Hi user, enjoy our product!

Attributes

Optional unless marked required

conversationintegerrequired
A unique identifier for the conversation which is given by User automatically.
userintegerrequired
A unique identifier for the agent which is given by User automatically.
contentstringrequired
A content of a message sent to the user.
sourceinteger
Where the message was sent from: 1 chat, 2 email, 3 API (the default), 4 SMS, 8 Facebook, 9 Instagram, 10 ChatAI. See Message source types.
source_contextstring
An additional context for your source (only visible for you).

Request​

curl -X POST "https://<your_app_subdomain>.user.com/api/public/message/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"conversation": 12345,
"user": 2,
"content": "Following up on your question.",
"source": 3
}'

Response examples​

No response body.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.