WhatsApp API Platform

Overview

Official client libraries for the Messages API. Send WhatsApp messages from your backend in TypeScript, PHP, Java, or C#.

Type-safe client libraries for the Messages API. Send WhatsApp text, media, templates, interactive messages, and bulk broadcasts from your own backend without hand-writing HTTP calls or modelling request bodies.

Every library is generated from the same OpenAPI spec, so all four track the API exactly and move in lockstep when it changes.

Pick a language

LanguagePackageRequiresPage
TypeScript / JavaScript@pingmate/sdkNode 18+, or any modern browser bundlerTypeScript
PHPPingmate\SdkPHP 8.1+PHP
Javacom.pingmate:pingmate-sdkJava 8+, Maven or GradleJava
C#Pingmate.Sdk.NET on HttpClientC#

Version 0.1.0

All libraries are currently published at 0.1.0. Pin the version you build against; the API itself is versioned separately at 2.0.0.

Three things that hold everywhere

The semantics below are identical across all four SDKs. The language pages cover install and syntax; this is the behaviour underneath.

One key, one header

Every request authenticates with an API key in the X-API-Key header. Create and manage keys in the dashboard under Settings → API Keys. Treat them like passwords: keep them server-side, never ship them in client code or a public repo.

One endpoint, many message types

Every outbound message goes through a single call, POST /api/v1/messages/send. The message.message_type field is the discriminator that selects the variant:

message_typeSends
textA plain text message
image video audio document stickerMedia, by URL or uploaded media ID
location contactA pin or a contact card
buttons interactive_listReply buttons or a tappable list
carouselA swipeable card carousel
templateA pre-approved WhatsApp template

In each SDK this becomes a tagged union, sealed class, or sum type, so the compiler enforces the right fields for the type you chose. New message types are added to the union without changing the call you already wrote: no method explosion, no breaking change.

One base URL, set by you

The generated clients default to http://localhost. Point them at your PingMate host before sending, for example https://pingmate.app. On a white-labelled deployment, use the host your account runs on. Each language page shows exactly where to set it.

Scheduling

Any message can be scheduled by adding scheduleTime at the top level of the request, alongside to and message.

  • Format: DD-MM-YYYY:HH-MM, interpreted in IST (Asia/Kolkata, UTC+5:30).
  • Must be in the future and within 30 days.
  • The wallet is charged at request time, not at send time. There is no cancel or refund flow.
  • The dispatcher runs every 2 minutes, so delivery can lag the scheduled minute by up to 2 minutes.
  • For a bulk send, the same scheduleTime applies to every recipient.

When a message is scheduled, the response shape switches to ScheduledMessageResponse, which carries id and scheduledAt.

Billing and limits

Every message is charged against your wallet at your plan's per-message rate. If the balance is insufficient or the subscription is inactive, the API returns 402 Payment Required. Watch your wallet balance on the Billing page before a large broadcast.

Prefer raw HTTP?

The SDKs are a convenience over a plain REST API. If your language is not listed here, or you would rather call the endpoints directly, see the API reference.

How is this guide?

On this page