WelcomeMessages

class WelcomeMessages(val client: ApiClient) : Endpoint

Collection of api endpoints related to Welcome Messages.

See also

Parameters

client

Current ApiClient instance.

Constructors

Link copied to clipboard
fun WelcomeMessages(client: ApiClient)

Creates new WelcomeMessages endpoint instance.

Properties

Link copied to clipboard
open override val client: ApiClient

Extensions

Link copied to clipboard
fun WelcomeMessages.create(    messageData: JsonObject,     name: String? = null,     vararg options: Option): JsonObjectApiAction<WelcomeMessage.Single>

Creates a new Welcome Message that will be stored and sent in the future from the authenticating user in defined circumstances. Returns the message template if successful. Supports publishing with the same elements as Direct Messages (e.g. Quick Replies, media attachments). Requires a JSON POST body and Content-Type header to be set to application/json. Setting Content-Length may also be required if it is not automatically. See the Welcome Messages overview to learn how to work with Welcome Messages.

Link copied to clipboard
fun WelcomeMessages.delete(id: Long, vararg options: Option): EmptyApiAction

Deletes a Welcome Message by the given id.

Link copied to clipboard

Shorthand property to WelcomeMessages.list.

fun WelcomeMessages.list(    count: Int? = null,     cursor: String? = null,     vararg options: Option): JsonObjectApiAction<WelcomeMessage.List>

Returns a list of Welcome Messages.

Link copied to clipboard
fun WelcomeMessages.show(id: Long, vararg options: Option): JsonObjectApiAction<WelcomeMessage.Single>

Returns a Welcome Message by the given id.

Link copied to clipboard
fun WelcomeMessages.update(    id: String,     messageData: JsonObject,     vararg options: Option): JsonObjectApiAction<WelcomeMessage.Single>

Updates a Welcome Message by the given ID. Updates to the welcome_message object are atomic. For example, if the Welcome Message currently has quick_reply defined and you only provide text, the quick_reply object will be removed from the Welcome Message.