Direct Message Channel Chat Messages

Add a Direct Message Channel Message

PUT /direct_message_channels/{channel_id}/chat_messages

Path Parameters

Parameter

Description

channel_id

Id of the direct message channel you are adding a message to.

Body Parameters

Parameter

Required

Description

user_id

No

The id of the user that you wish to attribute the message to. The user must be a member of the given channel. If not provided the message will be attributed to the "System User"

content

No

The content of the message that you would like to create.

parent_id

No

If you would like the message to appear as a comment to a previously created message you can provide the id of that message.

notification_image_url

No

If you provide a valid URL to an image it will be rendered in iOS watch notifications. NOTE: only .png, .jpg, and .gif images are supported. URL must also be secure (beginning with https://). Max file size is 10MB. Smaller image will appear faster.

notification_image_type

Only if notification_image_url is used

Type of image represented by the notification_image_url. Only png, jpg, and gif are supported.

Example Request Body

{
    "user_id" : "5b225b52-7a5f-4cf2-8869-fb97266e0ce8",
    "content" : "Hello ĀLO"
}

Success Response

A successful direct message channel chat message add response will have an HTTP status of 200. The payload of the response will contain the id of the message that was created.

Error Response

If there was a problem creating the message you will receive a response that contains status and message properties.

Example error response:

{
    "status": 422,
    "message": {
        "error": "Invalid Channel User",
        "invalid_user_id": "bogus-id"
    }
}

Last updated