Send WhatsApp login codes by API
Send one-time codes and other transactional WhatsApp messages from an approved template with POST /v3/whatsapp/sendMessage, then read each delivery event.

How it works
curl --request POST \
--url https://api.brevo.com/v3/whatsapp/sendMessage \
--header 'accept: application/json' \
--header 'api-key: YOUR_API_KEY' \
--header 'content-type: application/json' \
--data '{
"contactNumbers": [
"4915778559164"
],
"templateId": 465118589032810,
"senderNumber": "917878172050"
}'
Use the whatsapp_management_send_whatsapp_message tool to send template 123 from my WhatsApp number 919876543210 to 4915778559164, passing the code 482913 in params.
curl --request POST \
--url https://api.brevo.com/v3/whatsappCampaigns/template \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'api-key: YOUR_API_KEY' \
--data '{
"category": "MARKETING",
"name": "Test template",
"language": "en",
"mediaUrl": "https://attachment.domain.com",
"bodyText": "making it look like readable English",
"headerText": "Test WhatsApp campaign"
}'
Use the whatsapp_management_create_whats_app_template tool to create an English UTILITY template named otp_code with a short code message, then submit it for approval with whatsapp_campaigns_send_whats_app_template_approval.
curl --request GET \
--url 'https://api.brevo.com/v3/whatsapp/statistics/events?limit=50&offset=0&startDate=2024-01-01&endDate=2024-01-31' \
--header 'accept: application/json' \
--header 'api-key: YOUR_API_KEY'
Show my WhatsApp delivery report for the last 7 days.
The cURL send panel is a template message without variables. To put the code in the message, pass it in params as the MCP prompt does, and test it on your account first.
Setup steps
Activate WhatsApp
Enable the WhatsApp feature in your Brevo account, then sign up for Facebook and WhatsApp Business accounts. Do this before using the WhatsApp APIs.
Create and submit a template
After creating the campaign, use the template list endpoint to fetch the templateId. Templates must be approved before use in campaigns. The first message you send using the API must contain a Template ID.
Send the message
POST /v3/whatsapp/sendMessage with templateId, senderNumber and contactNumbers. A 201 response means the message was sent successfully.
Read the WhatsApp activity
Call GET /v3/whatsapp/statistics/events to retrieve unaggregated WhatsApp events for the past 30 days by default, or a custom date range. You can filter by contactNumber and event.



