WatificationDocs

Ask a question

Send a Yes/No question on WhatsApp and get the answer by API or webhook.

Ask a question with POST /questions. The customer gets an approved message with 2 or 3 buttons and taps one. Read the answer with GET /questions/{questionId} or receive signed webhooks.

When to use it

Use a question for a short account check, such as:

  • a login approval: "Was this you?"
  • a delivery check: "Did you receive your order?"
  • any choice with 2 or 3 answers.

Do not use a question to send a code. Send codes with the OTP API.

Set up the message

Create a Utility message template in Channels with 2 or 3 quick-reply buttons. Use the template ID in your request.

Write it in an account-alert style:

  • Do not put codes in the message.
  • Do not promote anything.
  • Show the device and location, for example "New sign-in from Chrome on Windows at 10:42. Was this you?"
  • Keep the buttons short, such as Yes and No.

Use Utility, not Authentication. Authentication templates allow only code buttons. Meta may move a promotional-looking Utility template to Marketing, which costs more, or reject it. Templates that stop being Utility are refused with QUESTION_TEMPLATE_NOT_USABLE.

Ask the question

Send the customer's phone number and the channel connection, with the template and its parameters:

curl -X POST https://api.watification.com/api/v1/questions \
  -H "Authorization: Bearer $WATIFICATION_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: login-8f3k2x-try-1" \
  -d '{
    "phone": "+201001234567",
    "channelConnectionId": "chc_example",
    "templateId": "tpl_example",
    "parameters": { "body": ["Chrome on Windows", "10:42"] },
    "reference": "login-8f3k2x",
    "expiresInSeconds": 300
  }'

A 202 answer means the question was accepted and the template is being sent. It does not mean the customer has answered.

{
  "questionId": "question_example",
  "messageId": "msg_example",
  "conversationId": "conv_example",
  "contactId": "contact_example",
  "status": "awaiting",
  "reference": "login-8f3k2x",
  "expiresAt": "2026-10-01T09:05:00.000Z"
}
  • reference is your own value, 1 to 128 characters. It is not unique, so use it to link the question to your login or order.
  • expiresInSeconds is 60 to 86400. The default is 300.
  • Send the same Idempotency-Key when you retry, so a repeated request does not ask twice.
  • Do not send buttons. Watification sets the buttons itself.

Get the answer

You can use either of these methods.

Poll. Call GET /questions/{questionId} every 1 to 2 seconds until status is no longer awaiting. This suits a login screen that waits for the answer.

Webhooks. Subscribe to question.answered, question.expired and question.failed. See Webhook events for the payloads. An answered question looks like this:

{
  "questionId": "question_example",
  "reference": "login-8f3k2x",
  "status": "answered",
  "answer": { "index": 0, "title": "Yes" },
  "answeredAt": "2026-10-01T09:00:00.000Z",
  "expiresAt": "2026-10-01T09:05:00.000Z",
  "messageId": "msg_example",
  "conversationId": "conv_example",
  "contactId": "contact_example",
  "failure": null,
  "createdAt": "2026-10-01T09:00:00.000Z"
}

answer.index is the position of the tapped button, starting at 0. answer.title is the button text the customer tapped. status is one of awaiting, answered, expired or failed.

Rules

  • The first tap wins. A later tap does not change the answer.
  • A tap after expiresAt is ignored, and the question becomes expired.
  • No answer means treat it as No.
  • Treat No as a reason to lock or reset, not as a final decision.
  • A contact can have at most 3 open questions at the same time. A fourth returns QUESTION_TOO_MANY_OPEN.
  • A tap does not reopen the chat or alert your agents.
  • The customer must have opted in to WhatsApp messages.
  • Taps from WhatsApp Web may not arrive. Then the question expires, so plan for that case.
  • Questions are kept for 30 days after they are created.

Errors

CodeHTTPWhen
QUESTION_TEMPLATE_NOT_USABLE409The template is not an approved Utility template with 2 or 3 quick-reply buttons.
QUESTION_TOO_MANY_OPEN409The contact already has 3 questions waiting for an answer.
QUESTION_BUTTONS_NOT_ALLOWED422The body sent buttons. Watification sets them.
QUESTION_NOT_FOUND404No question with this ID exists in your workspace.

The question also returns the send errors listed in Send messages.

On this page