Skip to content
WhatSync/DocsAPI v1

Send a WhatsApp form to one person

SENDS a real WhatsApp message with a button that opens a form, from the official Business number to exactly one person.

POST/api/v1/tools/send_whatsapp_formWrite
Key permissions
Read chats and messages + Send messages
Authentication
Authorization: Bearer $WHATSYNC_API_KEY
How keys work

How it works

  • Use only when the user asks to send this form to this person.
  • The person must have messaged the Business number in the last 24 hours.
  • A DRAFT form is sent in test mode with a banner; use that only to test with the user's own phone or team.
  • Read the answers later with list_form_responses.
  • Never use for bulk sends or automatic retries; acceptance is not delivery.

Body parameters

idempotencyKeystringbody or header

A fresh random UUID for each new action; never build it from dates, names, counters or step numbers, which repeat across runs. Reuse it exactly only to retry the same action.

form_idstringrequired

Form ID from list_whatsapp_forms or create_whatsapp_form.

conversationIdstringoptional

The exact conversation_id from another WhatSync tool

phoneNumberstringoptional

One recipient's phone number with country code

bodystringrequired

Message text shown above the button

buttonTextstringrequired

Button label that opens the form, no emoji

headerstringoptional

See the example and input schema for this value.

footerstringoptional

See the example and input schema for this value.

Conditions and pagination

  • Provide phoneNumber or an exact conversationId from a previous result. If you supply both, they must identify the same person. send_message with a group's conversationId sends text as send_group_message does; the other two tools do not take groups.
  • Requires an official Business connection and an incoming message from this person within 24 hours. Draft forms send in test mode; inspect the form before sending.
  • Use a unique idempotency key for each intended action. Reuse the same key and exactly the same input on a retry. The body key takes precedence over Idempotency-Key.

Response

intent_id identifies the durable send. accepted means the provider accepted it, not confirmed delivery. Inspect get_send_status using intentId; delivery_status may remain null. An uncertain send returns HTTP 409 with error.intent_id.

Every response includes X-Request-Id. Errors use the shared error format and retry rules.

Schemas

Input JSON Schema
Input JSON Schema
{
  "type": "object",
  "properties": {
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9._:-]{8,128}$",
      "description": "A fresh random UUID for each new action; never build it from dates, names, counters or step numbers, which repeat across runs. Reuse it exactly only to retry the same action."
    },
    "form_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 30
    },
    "conversationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 250,
      "description": "The exact conversation_id from another WhatSync tool"
    },
    "phoneNumber": {
      "type": "string",
      "minLength": 7,
      "maxLength": 30,
      "description": "One recipient's phone number with country code"
    },
    "body": {
      "type": "string",
      "minLength": 1,
      "maxLength": 1024,
      "description": "Message text shown above the button"
    },
    "buttonText": {
      "type": "string",
      "minLength": 1,
      "maxLength": 30,
      "description": "Button label that opens the form, no emoji"
    },
    "header": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    },
    "footer": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    }
  },
  "required": [
    "idempotencyKey",
    "form_id",
    "body",
    "buttonText"
  ],
  "additionalProperties": false,
  "$schema": "http://json-schema.org/draft-07/schema#",
  "anyOf": [
    {
      "required": [
        "phoneNumber"
      ]
    },
    {
      "required": [
        "conversationId"
      ]
    }
  ]
}
Response JSON Schema
Response JSON Schema
{
  "type": "object",
  "properties": {
    "intent_id": {
      "type": "string",
      "format": "uuid"
    },
    "status": {
      "type": "string"
    },
    "recipient_phone": {
      "type": "string"
    },
    "channel": {
      "type": "string"
    },
    "provider_message_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "delivery_status": {
      "type": [
        "string",
        "null"
      ]
    },
    "delivery_status_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "delivery_errors": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "description": "Provider or tool-specific fields; preserve unknown fields."
      }
    },
    "next_action": {
      "type": [
        "string",
        "null"
      ]
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    },
    "form_id": {
      "type": "string"
    },
    "form_mode": {
      "type": "string"
    },
    "message_preview": {
      "type": "string"
    },
    "answers": {
      "type": "string"
    }
  },
  "required": [],
  "additionalProperties": true
}