Messages

Send a one-time password (OTP) copy-code button message

Sends a WhatsApp message carrying a single copy-code button. When the recipient taps it, the one-time password in `code` is copied to their clipboard. An optional image header is supported (remote URL or base64). WUTS attaches the native-flow business nodes required for the button to render on the recipient's device.

POST
/send/button-otp

Sends a WhatsApp message carrying a single copy-code button. When the recipient taps it, the one-time password in code is copied to their clipboard. An optional image header is supported (remote URL or base64). WUTS attaches the native-flow business nodes required for the button to render on the recipient's device.

Authorization

bearerAuth
AuthorizationBearer <token>

Per-user API token (UUID v4) sent as Authorization: Bearer <token>. Identifies the tenant and user.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/send/button-otp" \  -H "Content-Type: application/json" \  -d '{    "to": "5511999999999",    "message": "Your verification code is ready. Tap the button to copy it.",    "code": "123456",    "buttonText": "Copiar código",    "footer": "Valid for 10 minutes"  }'
{  "success": true,  "message_id": "3EB0XXXXOTP1234567890ABCD",  "timestamp": "2026-06-19T14:32:10Z",  "status": "sent",  "chat_jid": "5511999999999@s.whatsapp.net",  "message": "OTP button message sent successfully"}
{  "error": "Invalid recipient: empty input"}
{  "error": "unauthorized"}
{  "error": "failed to upload header image: timeout"}
{  "error": "WhatsApp device is not connected"}