Packages

A Slack Web & Real Time Messaging API client.

Current section

Files

Jump to
slack_kit priv docs methods chat.postEphemeral.json
Raw

priv/docs/methods/chat.postEphemeral.json

{
"args": {
"as_user": {
"desc": "(Legacy) Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.",
"example": "true",
"required": false,
"type": "boolean"
},
"attachments": {
"desc": "A JSON-based array of structured attachments, presented as a URL-encoded string. The `text` field is not enforced as required when using `blocks` or `attachments`.",
"example": "[{\"pretext\": \"pre-hello\", \"text\": \"text-world\"}]",
"required": false
},
"blocks": {
"desc": "A JSON-based array of structured blocks, presented as a URL-encoded string. The usage of the `text` field changes depending on whether you're using `blocks`. The `text` field is not enforced as required when using `blocks` or `attachments`. However, we highly recommended that you include `text` to provide a fallback when using `blocks`, as described above.",
"example": "[{\"type\": \"section\", \"text\": {\"type\": \"plain_text\", \"text\": \"Hello world\"}}]",
"required": false
},
"channel": {
"desc": "Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.",
"required": true,
"type": "string"
},
"icon_emoji": {
"desc": "Emoji to use as the icon for this message. Overrides `icon_url`.",
"example": ":chart_with_upwards_trend:",
"required": false,
"type": "string"
},
"icon_url": {
"desc": "URL to an image to use as the icon for this message.",
"example": "http://lorempixel.com/48/48",
"required": false,
"type": "string"
},
"link_names": {
"desc": "Find and link channel names and usernames. You can specify values for `parse` and `link_names` to change formatting behavior.",
"example": "true",
"required": false,
"type": "boolean"
},
"markdown_text": {
"desc": "Accepts message text formatted in markdown. This argument should not be used in conjunction with `blocks` or `text`. Limit this field to 12,000 characters.",
"example": "**This is bold text**",
"required": false,
"type": "string"
},
"parse": {
"desc": "Change how messages are treated. Defaults to `none`. See below. _Acceptable values:_ `none` `full` `mrkdwn` `false`. You can specify values for `parse` and `link_names` to change formatting behavior.",
"example": "full",
"required": false
},
"text": {
"desc": "How this field works and whether it is required depends on other fields you use in your API call. See below for more detail. The usage of the `text` field changes depending on whether you're using `blocks`. The `text` field is not enforced as required when using `blocks` or `attachments`. However, we highly recommended that you include `text` to provide a fallback when using `blocks`, as described above.",
"example": "Hello world",
"required": false
},
"thread_ts": {
"desc": "Provide another message's `ts` value to post this message in a thread. Avoid using a reply's `ts` value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread.",
"required": false
},
"user": {
"desc": "`id` of the user who will receive the ephemeral message. The user should be in the channel specified by the `channel` argument.",
"example": "U0BPQUNTA",
"required": true
},
"username": {
"desc": "Set your bot's user name.",
"example": "My Bot",
"required": false,
"type": "string"
}
},
"desc": "Sends an ephemeral message to a user in a channel.",
"errors": {
"cannot_reply_to_message": "This message type cannot have thread replies.",
"channel_not_found": "Value passed for `channel` was invalid.",
"invalid_attachments": "Attachments that contain blocks are not valid",
"invalid_blocks": "Blocks submitted with this message are not valid",
"invalid_blocks_format": "The `blocks` is not a valid JSON object or doesn't match the Block Kit syntax.",
"is_archived": "Channel has been archived.",
"markdown_text_conflict": "Markdown text cannot be used in conjunction with `blocks` or `text` argument.",
"message_limit_exceeded": "Members on this team are sending too many messages. For more details, see https://slack.com/help/articles/115002422943-Usage-limits-for-free-workspaces",
"messages_tab_disabled": "Messages tab for the app is disabled.",
"msg_too_long": "Message text is too long",
"no_text": "No message text provided",
"not_in_channel": "Cannot post user messages to a channel they are not in.",
"restricted_action": "A workspace preference prevents the authenticated user from posting.",
"too_many_attachments": "Too many attachments were provided with this message. A maximum of 100 attachments are allowed on a message.",
"user_not_in_channel": "Intended recipient is not in the specified channel."
},
"rate_limit": {
"label": "Tier 4: 100+ per minute",
"url": "https://docs.slack.dev/apis/web-api/rate-limits"
},
"scopes": {
"bot": [
{
"name": "chat:write",
"url": "https://docs.slack.dev/reference/scopes/chat.write"
}
],
"user": [
{
"name": "chat:write",
"url": "https://docs.slack.dev/reference/scopes/chat.write"
}
]
}
}