chat.scheduleMessage
method
We're still building and not all features are available quite yet. Enjoy this peek into the future!
Not ready for the future? Return to the past at api.slack.com.
Usage info
Messages scheduled with chat.scheduleMessage
will not post if the metadata
parameter is used.
This method schedules a message for delivery to a public channel, private channel, or direct message (DM, or IM) conversation at a specified time in the future.Think of chat.scheduleMessage
and chat.postMessage
as two siblings in the Slack family. They aren't twins, but they still share many similarities, such as their ability to send messages and include various features like attachments and emojis.
The text
, blocks
and attachments
fields
The usage of the text
field changes depending on whether you're using blocks
. If you're using blocks
, this is used as a fallback string to display in notifications. If you aren't, this is the main body text of the message. It can be formatted as plain text, or with mrkdwn
.
Restrictions
You will only be able to schedule a message up to 120 days into the future. If you specify a post_at
timestamp beyond this limit, you’ll receive a time_too_far
error response. Additionally, you cannot schedule more than 30 messages to post within a 5-minute window to the same channel. Exceeding this will result in a restricted_too_many
error.
Response
The response includes the scheduled_message_id
assigned to your message. Use it with the chat.deleteScheduledMessage
method to delete the message before it is sent.
For details on formatting, usage in threads, and rate limiting, check out chat.postMessage
documentation.## Channels
You must specify a public channel, private channel, or DM conversation with the channel
argument. Each one behaves slightly differently based on the authenticated user's permissions and additional arguments:
Post to a channel
You can either pass the channel's name (#general
) or encoded ID (C123ABC456
), and the message will be posted to that channel. The channel's ID can be retrieved through the conversations.list
API method.
Post to a DM
Pass the DM conversation's channel ID (D123ABC456
) or a user's user ID (U123ABC456
) as the value of channel
to post to that DM conversation.
The DM conversation's channel ID can be retrieved through the conversations.list
API method. Use the types
parameters to return only im
conversations.
You might receive a channel_not_found
error if your app doesn't have permission to enter into an IM with the intended user.