Skip to main content
POST
/
forms
/
slack
Send a form via Slack
curl --request POST \
  --url https://api.pokulabs.com/forms/slack \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "<string>",
  "title": "<string>",
  "fields": [
    {
      "id": "<string>",
      "label": "<string>",
      "type": "text",
      "required": false,
      "placeholder": "<string>",
      "helperText": "<string>",
      "options": [
        {
          "label": "<string>",
          "value": "<string>"
        }
      ],
      "validations": [
        {
          "title": "<string>",
          "pattern": "<string>"
        }
      ]
    }
  ],
  "to": "<string>",
  "description": "<string>",
  "brandImageUrl": "<string>",
  "submitLabel": "Submit",
  "from": "<string>",
  "waitTime": 60,
  "followUpTime": 6000
}
'
{
  "values": {
    "name": "John Smith",
    "email": "johnsmith@gmail.com"
  },
  "content": "First & Last Name: John Smith\nEmail: johnsmith@gmail.com"
}

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 Slack message body sent to the recipient. {{url}} inserts the full form link. {{replyToken}} inserts only the form ID — for use with approved templates that lock the base URL and only accept a variable token at the end.

title
string
required

The title displayed at the top of the form.

fields
object[]
required

An array of fields to display on the form.

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.
description
string

A subtitle or description shown below the title on the form.

brandImageUrl
string<uri>

URL of your logo, displayed at the top of the form above the title.

submitLabel
string
default:Submit

Label on the form's submit button. Defaults to "Submit".

from
string

Your Slack workspace or organization ID. When provided, Pokubot sends the message from within your own workspace.

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

How to find your workspace ID

waitTime
number
default:90

Either this parameter or followUpTime must be supplied.

The number of seconds the API request is held open waiting for the form to be submitted. This is displayed as a countdown on the form. When the window expires, the agent moves on. The recipient can still submit the form within the followUpTime window.

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

60

followUpTime
number
default:90

Either this parameter or waitTime must be supplied.

After waitTime expires, how long Poku continues to accept a form submission. When the form is submitted within this window, the response is sent to any webhooks you've configured. Once this window closes, the form will show "This form has expired".

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

6000

Response

200 - application/json

Form sent successfully.

values
object

The submitted form data, keyed by field ID.

content
string

A formatted text summary of the submitted values.

response
string

Returned when the waitTime expires with no form submission.