> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pokulabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send form via Slack

> Send a link to a form via Slack. When the recipient completes and submits the form, the contents are returned as a tool call response.

**Prerequisites:** You must either [join the Poku Slack workspace](https://pokulabs.slack.com/join/shared_invite/zt-334pmqhy9-oZN8cMAXLFUdmDCgNZX9rA) or add the Poku bot to your own Slack workspace before using this endpoint.



## OpenAPI

````yaml POST /forms/slack
openapi: 3.1.0
info:
  title: Poku API
  version: 1.0.0
  description: OpenAPI document for the authenticated Poku API routes.
servers:
  - url: https://api.pokulabs.com
security:
  - bearerAuth: []
tags:
  - name: calls
  - name: messages
  - name: forms
  - name: interactions
  - name: numbers
  - name: webhooks
paths:
  /forms/slack:
    post:
      tags:
        - forms
      summary: Send a form via Slack
      description: >-
        Send a link to a form via Slack. When the recipient completes and
        submits the form, the contents are returned as a tool call response.


        **Prerequisites:** You must either [join the Poku Slack
        workspace](https://pokulabs.slack.com/join/shared_invite/zt-334pmqhy9-oZN8cMAXLFUdmDCgNZX9rA)
        or add the Poku bot to your own Slack workspace before using this
        endpoint.
      operationId: sendSlackForm
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SlackFormInput'
      responses:
        '200':
          description: Form sent successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormResponse'
              examples:
                formSubmitted:
                  summary: Form submitted
                  value:
                    values:
                      name: John Smith
                      email: johnsmith@gmail.com
                    content: |-
                      First & Last Name: John Smith
                      Email: johnsmith@gmail.com
                noReply:
                  summary: No response received
                  value:
                    response: Human did not respond. Continue where you left off.
components:
  schemas:
    SlackFormInput:
      type: object
      required:
        - message
        - title
        - fields
        - to
      properties:
        message:
          type: string
          description: >-
            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:
          type: string
          description: The title displayed at the top of the form.
        description:
          type: string
          description: A subtitle or description shown below the title on the form.
        brandImageUrl:
          type: string
          format: uri
          description: URL of your logo, displayed at the top of the form above the title.
        submitLabel:
          type: string
          default: Submit
          description: Label on the form's submit button. Defaults to `"Submit"`.
        fields:
          type: array
          items:
            $ref: '#/components/schemas/CaptureFormField'
          description: An array of fields to display on the form.
        to:
          type: string
          description: >-
            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:
          type: string
          description: >-
            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](https://pokulabs.slack.com/join/shared_invite/zt-334pmqhy9-oZN8cMAXLFUdmDCgNZX9rA).


            [How to find your workspace
            ID](https://slack.com/help/articles/221769328-Locate-your-Slack-URL-or-ID#find-your-workspace-or-org-id)
        waitTime:
          type: number
          minimum: 1
          maximum: 600
          description: >-
            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.
          example: 60
          default: 90
        followUpTime:
          type: number
          minimum: 1
          maximum: 60000
          description: >-
            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".
          example: 6000
          default: 90
      additionalProperties: false
    FormResponse:
      type: object
      properties:
        values:
          type: object
          description: The submitted form data, keyed by field ID.
          additionalProperties:
            type: string
        content:
          type: string
          description: A formatted text summary of the submitted values.
        response:
          type: string
          description: Returned when the waitTime expires with no form submission.
    CaptureFormField:
      type: object
      required:
        - id
        - label
        - type
      properties:
        id:
          type: string
          description: >-
            Unique identifier for the field. Used as the key in the returned
            response payload. Accepts letters, numbers, hyphens, and
            underscores.
        label:
          type: string
          description: The text displayed above the field.
        type:
          type: string
          enum:
            - text
            - textarea
            - email
            - phone_number
            - select
            - checkbox
            - address
          description: >-
            The input type for the field:

            - `text` — single-line text input

            - `textarea` — multi-line text input

            - `email` — text input with built-in validation (checks for `@` and
            a valid domain)

            - `phone_number` — lets the recipient select or search a country
            code from a dropdown, then enter their phone number

            - `select` — dropdown with predefined options (see `options`)

            - `checkbox` — boolean checkbox

            - `address` — text input with address validation powered by Google
            Places API, ensuring only real addresses are accepted
        required:
          type: boolean
          description: >-
            Whether the field must be completed before the form can be
            submitted.
          default: false
        placeholder:
          type: string
          description: >-
            Placeholder text shown inside the input before the recipient types
            anything.
        helperText:
          type: string
          description: Supplementary text shown below the field to guide the recipient.
        options:
          type: array
          items:
            $ref: '#/components/schemas/CaptureFormFieldOption'
          description: >-
            Predefined options for `select` fields. Each option requires a
            `label` (shown to the recipient) and a `value` (returned in the
            response payload). Only valid for `select` type.
        validations:
          type: array
          items:
            $ref: '#/components/schemas/CaptureFormStringValidationRule'
          description: >-
            Custom validation rules applied to the field. Each rule requires a
            `title` — which is shown below the field, and a `pattern`, a regular
            expression the input must match.


            Only valid for `text`, `textarea`, `email`, and `phone_number`
            fields.


            **Example:**

            ```json

            [
              { "title": "Must be 5 to 10 characters long", "pattern": "^.{5,10}$" },
              { "title": "Starts with a letter", "pattern": "^[A-Za-z].*" },
              { "title": "Does not contain Z", "pattern": "^(?!.*[Z]).*$" }
            ]

            ```
      additionalProperties: false
    CaptureFormFieldOption:
      type: object
      required:
        - label
        - value
      properties:
        label:
          type: string
        value:
          type: string
      additionalProperties: false
    CaptureFormStringValidationRule:
      type: object
      required:
        - title
        - pattern
      properties:
        title:
          type: string
        pattern:
          type: string
          description: Must be a valid regular expression.
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authentication header containing your Poku API key. Find it in the [Poku
        dashboard](https://dashboard.pokulabs.com/). The format is "Bearer
        YOUR_API_KEY"

````