WhatsApp API Reference

Send outbound WhatsApp text messages programmatically using your team token. Messages are sent with the WhatsApp number configured for your team (local Baileys service or Twilio).

Base URL
https://staging.humano.app/api/team/whatsapp/send

This endpoint uses team token authentication. The team is determined by the Bearer token, not by a team_id parameter.

Authentication

Generate a token in Team Settings → API Tokens, then include it in every request:

Authorization: Bearer YOUR_API_TOKEN
Note: WhatsApp must be connected for your team (QR linked in Chat) when using the local driver. With Twilio, ensure team WhatsApp settings are configured.
Send a text message
POST Send WhatsApp message
https://staging.humano.app/api/team/whatsapp/send
Request body (JSON)
Field Tipo Required Descripción
to string Recipient phone number (E.164 or digits only, 10–15 digits)
message string Text message body (max 4096 characters)
Example request
curl -X POST "https://staging.humano.app/api/team/whatsapp/send" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "to": "+34722372858",
    "message": "Mensaje de prueba desde la API de Humano"
  }'
Success response (200)
{
  "success": true,
  "message": "WhatsApp message sent",
  "to": "34722372858"
}
Error responses
HTTP When
401 Missing or invalid team API token
422 Validation error (missing fields or invalid phone number)
503 WhatsApp not connected (local driver — scan QR in Chat)
500 Send failed (provider misconfiguration, service unreachable, etc.)
Related endpoints

For interactive chat from a mobile app with user login (Sanctum), see also:

  • POST /api/chat/whatsapp-send — Send message (user token, supports audio and attachments)
  • GET /api/chat/whatsapp-list — List WhatsApp conversations
  • GET /api/chat/whatsapp-messages/{phone} — Thread messages for a contact