Skip to main content
POST
/
forms
/
whatsapp
Send a form via WhatsApp
curl --request POST \
  --url https://api.pokulabs.com/forms/whatsapp \
  --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",
  "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 WhatsApp 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 number you want to message, in E.164 format.

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".

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.