POST Request

This method allow to send message to a specific channel.

Before starting, make sure you added message_save into write privileges. See the Application access and privileges section.

POST message

POST https://api.twake.app/api/v1/messages/save

Headers

Name
Type
Description

Authorization

string

Basic base64(public_id:private_api_key)

Content-Type

string

application/json

Request Body

Name
Type
Description

message

object

Require channel_id and content, see the Body section

group_id

string

See the group_id and channel_id section

{
    "object": {
        "id": "--", // Message Id
        "channel_id": "--", // Channel
        "parent_message_id": "--", // Thread id
        "sender": null, // User who send the message
        "application_id": "--", // Application who send the message
        "edited": false, 
        "pinned": null,
        "hidden_data": null,
        "reactions": [],
        "modification_date": 1598518289, // Last modification date
        "creation_date": 1598518289, // Creation date
        "content": "Hello !", // Object (see Twacode) or string
    }
}

Body example:

Last updated

Was this helpful?