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

Request Body

{
    "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:

{
	"group_id": "--",
	"message": {
		"channel_id": "--",
		"content": "Hello, this is my first message !",
		"_once_ephemeral_message": false // Set true if you want this message ephemeral
	}
}

Last updated