hub WhatsApp Gateway

On-Site Documentation

SDK Examples

Use language-specific examples with the public WhatsApp Gateway API contract.

SDK Examples

SDK Examples

SDK examples are available now. Official package releases are being prepared.

Current Status

These pages show plain HTTP examples you can adapt in your application today. They do not require an official Composer, npm, or PyPI package.

PHP

Native cURL examples for sending messages, handling errors, and verifying customer webhook signatures.

Node.js

Fetch and Express examples for API sends, webhook verification, and normalized event handling.

Python

Requests and Flask examples for API sends, API errors, and customer webhook receivers.

What The Examples Cover

  • Initialize a client with a Customer API Key.
  • Send a message through POST /api/send-message.
  • Use allowed message_purpose values: transactional, operational, support, internal_team, and authentication.
  • Handle API errors such as module_not_enabled, recipient_suppressed, and message_purpose_not_allowed.
  • Verify customer webhook signatures.
  • Parse message.received, recipient.opted_out, message.sent, and message.failed.

Responsible Messaging

WhatsApp Gateway is for transactional, operational, support, internal, and authentication-style messages. Marketing, cold outreach, and bulk campaigns are not allowed.