> ## Documentation Index
> Fetch the complete documentation index at: https://docs.robase.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For chatbots and coding agents, start at /guides/ai-agents.
> Hosted MCP: POST https://api.robase.dev/mcp (Streamable HTTP). Auth: Authorization: Bearer robe_… or robe_agent_….
> Phase 1 tools: get_pricing, send_otp, verify_otp, get_otp, send_sms, get_sms. No payment or top-up tools.
> Call get_pricing; treat listed:true as marketed markets (NG, GH, KE, ZA, GB, BJ, CI, US). Do not invent countries or delivery percentages.
> Prefer OTP-shaped tests such as "Your Robase test OTP is 123456". Do not send Hello or Good morning as tests. Match errors on error.type.

# WhatsApp OTP

> Deliver one-time codes over WhatsApp Authentication (copy-code) with workspace delivery modes and live credit pricing.

WhatsApp OTP on Robase is **OTP delivery only**: a Meta Authentication template with a copy-code button. It is not a general WhatsApp messaging API.

## Set the workspace mode

In **Settings → General** (also post-signup setup and Getting started), set **OTP delivery**:

| Mode       | Behaviour                         |
| ---------- | --------------------------------- |
| `sms`      | SMS only (default)                |
| `whatsapp` | WhatsApp only                     |
| `both`     | One code on SMS **and** WhatsApp  |
| `either`   | Choose per request with `channel` |

## Send

```bash theme={null}
curl -X POST https://api.robase.dev/v1/otp/send \
  -H "Authorization: Bearer robe_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "phone_number": "+2348012345678", "channel": "whatsapp" }'
```

On `either`, omit `channel` for SMS. On `both`, omit `channel` — naming one leg is refused. Verify with the same `otp_id` as SMS.

## No silent fallback

A failed WhatsApp leg is refunded and reported failed. It is **never** silently re-sent as SMS.

## Credits

Live figures: `GET /v1/pricing` → `whatsapp` array. Same formula as send: `ceil(cost_ngn * 1.20 / credit_price)`, minimum 1, from `whatsapp_otp_costs` + FX.
