Skip to main content
POST
/
messages
/
slack
Send a Slack message
curl --request POST \
  --url https://api.pokulabs.com/messages/slack \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "<string>",
  "to": "<string>",
  "from": "<string>",
  "waitTime": 60,
  "followUpTime": 6000
}
'
{
  "interactionId": "092f9eb4-3694-4718-9084-5c786afa87ec"
}

Authorizations

Authorization
string
header
required

Authentication header containing your Poku API key. Find it in the Poku dashboard. The format is "Bearer YOUR_API_KEY"

Body

application/json
message
string
required

The content of the Slack message.

to
string
required

The Slack user, member, or channel ID to send the message to.

  • User/Member ID: Open the Slack user's profile, click the three-dot menu (⋮), and select "Copy Member ID."
  • Channel ID: Right-click the channel, select "View channel details," and copy the channel ID at the bottom of the page.
from
string

If left blank, the message is sent from the Poku Slack workspace — you must join it first.

Your Slack workspace ID. When provided, Pokubot sends the message from within your own workspace. How to find your workspace ID

waitTime
number

When undefined or not supplied, no reply is captured.

When supplied, this is the number of seconds the API request is held open waiting for a reply. The recipient MUST reply directly to the Slack thread and the reply will be captured in the HTTP response.

Required range: 1 <= x <= 600
Example:

60

followUpTime
number

Duration in seconds to keep listening for a reply after the waitTime window closes.

When a reply arrives within this window, Poku sends it to any webhooks you've configured.

Required range: 1 <= x <= 60000
Example:

6000

Response

200 - application/json

Message sent successfully.

interactionId
string

Returned when no waitTime is set. Unique identifier for this interaction.

response
string

Returned when waitTime is set. Contains the recipient reply, or a timeout message if no reply was received.