Ze da API icon

Ze da API

WhatsApp API powered by Ze da API - Send messages, manage groups, contacts and more

Actions137

Interactive Message → Send Button OTP

AI-generated

Summary

Sends an interactive message with an OTP button to a phone number.

Inputs

  • phone (required) — Recipient phone number with country code
  • delayMessage — Delay in seconds before sending the message (0 = API default 1-3s random)
  • delayTyping — Show typing indicator for this many seconds before sending (1-15, 0 = off)
  • scheduledFor — ISO 8601 timestamp for scheduled delivery (overrides Delay Message). Must be in the future.
  • messageId — Message ID to reply to
  • message — Message text to send
  • code (required) — OTP code to send
  • title — Title displayed with the button
  • footer — Footer text displayed with the button
  • requestOptions — Configuration options such as batching, proxy, or timeout
  • proxy — HTTP proxy to use, e.g. http://username:password@myproxy:3128
  • timeout — Request timeout in milliseconds

Output shape

JSON object indicating success and containing the sent message identifier

Success responses include the identifier of the sent interactive message; errors follow the standard error envelope.

Examples

Example 1: Send OTP to a user with a custom title and message

Phone: 5511999999999, Code: 123456, Title: "Verify your account", Message: "Your verification code is {{code}}", Request Options: { batching: { batchSize: -1 } }

Example 2: Schedule delivery for a future time

Phone: 5511999999999, Code: 987654, Scheduled For: "2025-01-01T12:00:00Z", Title: "Reminder", Message: "Your OTP will be sent shortly"

Example 3: Batch multiple OTPs using batching option

Phone: 5511999999999, Code: 111111, Request Options: { batching: { batchSize: 50, batchInterval: 1000 } }

Links

Discussion