Slack Web API
  1. chat
Slack Web API
  • admin.apps
    • /admin.apps.approve
      POST
    • /admin.apps.restrict
      POST
  • admin.apps.approved
    • /admin.apps.approved.list
      GET
  • admin.apps.requests
    • /admin.apps.requests.list
      GET
  • admin.apps.restricted
    • /admin.apps.restricted.list
      GET
  • admin.conversations
    • /admin.conversations.archive
      POST
    • /admin.conversations.convertToPrivate
      POST
    • /admin.conversations.create
      POST
    • /admin.conversations.delete
      POST
    • /admin.conversations.disconnectShared
      POST
    • /admin.conversations.getConversationPrefs
      GET
    • /admin.conversations.getTeams
      GET
    • /admin.conversations.invite
      POST
    • /admin.conversations.rename
      POST
    • /admin.conversations.search
      GET
    • /admin.conversations.setConversationPrefs
      POST
    • /admin.conversations.setTeams
      POST
    • /admin.conversations.unarchive
      POST
  • admin.conversations.ekm
    • /admin.conversations.ekm.listOriginalConnectedChannelInfo
  • admin.conversations.restrictAccess
    • /admin.conversations.restrictAccess.addGroup
    • /admin.conversations.restrictAccess.listGroups
    • /admin.conversations.restrictAccess.removeGroup
  • admin.emoji
    • /admin.emoji.add
    • /admin.emoji.addAlias
    • /admin.emoji.list
    • /admin.emoji.remove
    • /admin.emoji.rename
  • admin.inviteRequests
    • /admin.inviteRequests.approve
    • /admin.inviteRequests.deny
    • /admin.inviteRequests.list
  • admin.inviteRequests.approved
    • /admin.inviteRequests.approved.list
  • admin.inviteRequests.denied
    • /admin.inviteRequests.denied.list
  • admin.teams.admins
    • /admin.teams.admins.list
  • admin.teams
    • /admin.teams.create
    • /admin.teams.list
  • admin.teams.owners
    • /admin.teams.owners.list
  • admin.teams.settings
    • /admin.teams.settings.info
    • /admin.teams.settings.setDefaultChannels
    • /admin.teams.settings.setDescription
    • /admin.teams.settings.setDiscoverability
    • /admin.teams.settings.setIcon
    • /admin.teams.settings.setName
  • admin.usergroups
    • /admin.usergroups.addChannels
    • /admin.usergroups.addTeams
    • /admin.usergroups.listChannels
    • /admin.usergroups.removeChannels
  • admin.users
    • /admin.users.assign
    • /admin.users.invite
    • /admin.users.list
    • /admin.users.remove
    • /admin.users.setAdmin
    • /admin.users.setExpiration
    • /admin.users.setOwner
    • /admin.users.setRegular
  • admin.users.session
    • /admin.users.session.invalidate
    • /admin.users.session.reset
  • api
    • /api.test
  • apps.event.authorizations
    • /apps.event.authorizations.list
  • apps.permissions
    • /apps.permissions.info
    • /apps.permissions.request
  • apps.permissions.resources
    • /apps.permissions.resources.list
  • apps.permissions.scopes
    • /apps.permissions.scopes.list
  • apps.permissions.users
    • /apps.permissions.users.list
    • /apps.permissions.users.request
  • apps
    • /apps.uninstall
  • auth
    • /auth.revoke
    • /auth.test
  • bots
    • /bots.info
  • calls
    • /calls.add
    • /calls.end
    • /calls.info
    • /calls.update
  • calls.participants
    • /calls.participants.add
    • /calls.participants.remove
  • chat
    • /chat.delete
      POST
    • /chat.deleteScheduledMessage
      POST
    • /chat.getPermalink
      GET
    • /chat.meMessage
      POST
    • /chat.postEphemeral
      POST
    • /chat.postMessage
      POST
    • /chat.scheduleMessage
      POST
    • /chat.unfurl
      POST
    • /chat.update
      POST
  • chat.scheduledMessages
    • /chat.scheduledMessages.list
  • conversations
    • /conversations.archive
    • /conversations.close
    • /conversations.create
    • /conversations.history
    • /conversations.info
    • /conversations.invite
    • /conversations.join
    • /conversations.kick
    • /conversations.leave
    • /conversations.list
    • /conversations.mark
    • /conversations.members
    • /conversations.open
    • /conversations.rename
    • /conversations.replies
    • /conversations.setPurpose
    • /conversations.setTopic
    • /conversations.unarchive
  • dialog
    • /dialog.open
  • dnd
    • /dnd.endDnd
    • /dnd.endSnooze
    • /dnd.info
    • /dnd.setSnooze
    • /dnd.teamInfo
  • emoji
    • /emoji.list
  • files.comments
    • /files.comments.delete
  • files
    • /files.delete
    • /files.info
    • /files.list
    • /files.revokePublicURL
    • /files.sharedPublicURL
    • /files.upload
  • files.remote
    • /files.remote.add
    • /files.remote.info
    • /files.remote.list
    • /files.remote.remove
    • /files.remote.share
    • /files.remote.update
  • migration
    • /migration.exchange
  • oauth
    • /oauth.access
    • /oauth.token
  • oauth.v2
    • /oauth.v2.access
  • pins
    • /pins.add
    • /pins.list
    • /pins.remove
  • reactions
    • /reactions.add
    • /reactions.get
    • /reactions.list
    • /reactions.remove
  • reminders
    • /reminders.add
    • /reminders.complete
    • /reminders.delete
    • /reminders.info
    • /reminders.list
  • rtm
    • /rtm.connect
  • search
    • /search.messages
  • stars
    • /stars.add
    • /stars.list
    • /stars.remove
  • team
    • /team.accessLogs
    • /team.billableInfo
    • /team.info
    • /team.integrationLogs
  • team.profile
    • /team.profile.get
  • usergroups
    • /usergroups.create
    • /usergroups.disable
    • /usergroups.enable
    • /usergroups.list
    • /usergroups.update
  • usergroups.users
    • /usergroups.users.list
    • /usergroups.users.update
  • users
    • /users.conversations
    • /users.deletePhoto
    • /users.getPresence
    • /users.identity
    • /users.info
    • /users.list
    • /users.lookupByEmail
    • /users.setActive
    • /users.setPhoto
    • /users.setPresence
  • users.profile
    • /users.profile.get
    • /users.profile.set
  • views
    • /views.open
    • /views.publish
    • /views.push
    • /views.update
  • workflows
    • /workflows.stepCompleted
    • /workflows.stepFailed
    • /workflows.updateStep
  1. chat

/chat.postEphemeral

POST
/chat.postEphemeral
chat
Sends an ephemeral message to a user in a channel.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://slack.com/api/chat.postEphemeral' \
--header 'token;' \
--data-urlencode 'channel=' \
--data-urlencode 'user='
Response Response Example
200 - response
{
    "message_ts": "1502210682.580145",
    "ok": true
}

Request

Header Params
token
string 
required
Authentication token. Requires scope: chat:write
Body Params application/x-www-form-urlencoded
as_user
string 
optional
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.
attachments
string 
optional
A JSON-based array of structured attachments, presented as a URL-encoded string.
blocks
string 
optional
A JSON-based array of structured blocks, presented as a URL-encoded string.
channel
string 
required
Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.
icon_emoji
string 
optional
Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.
icon_url
string 
optional
URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.
link_names
string 
optional
Find and link channel names and usernames.
parse
string 
optional
Change how messages are treated. Defaults to none. See below.
text
string 
optional
How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
thread_ts
string 
optional
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.
user
string 
required
id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.
username
string 
optional
Set your bot's user name. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.

Responses

🟢200Typical success response
application/json
Body
Schema for successful response from chat.postEphemeral method
message_ts
string 
required
Match pattern:
^\d{10}\.\d{6}$
ok
enum<boolean> 
required
Allowed value:
true
🔴500Typical error response
Previous
/chat.meMessage
Next
/chat.postMessage
Built with