Skip to content
Wazapin
Esc
navigateopen⌘Jpreview
On this page

Quickstart

Send your first WhatsApp message in a few minutes.

Send your first message today — you only need an API key and a connected WhatsApp number.

Prerequisites

  • Base URL: https://api.wazapin.com
  • API key (X-Api-Key)
  • Connected WhatsApp channel_id

Send your first text message

curl -X POST "https://api.wazapin.com/v1/messages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "wzp_abc123",
    "to": "6281234567890",
    "type": "text",
    "content": {"body": "Hello from Wazapin"}
  }'
import { WazapinClient, textMessage } from "@wazapin/sdk";

const wazapin = new WazapinClient({ apiKey: process.env.WAZAPIN_API_KEY! });

const { data: message } = await wazapin.messages.send(
  textMessage({
    channel_id: "wzp_abc123",
    to: "6281234567890",
    body: "Hello from Wazapin",
  }),
);
import os
import requests

resp = requests.post(
    "https://api.wazapin.com/v1/messages",
    headers={
        "X-Api-Key": os.environ["WAZAPIN_API_KEY"],
        "Content-Type": "application/json",
    },
    json={
        "channel_id": "wzp_abc123",
        "to": "6281234567890",
        "type": "text",
        "content": {"body": "Hello from Wazapin"},
    },
    timeout=30,
)
resp.raise_for_status()
message = resp.json()["data"]

Save the id from the response data object for the next step.

Track message status

curl -sS "https://api.wazapin.com/v1/messages/{messageID}" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Accept: application/json"
const { data: message } = await wazapin.messages.get("MESSAGE_ID");
import os
import requests

resp = requests.get(
    "https://api.wazapin.com/v1/messages/MESSAGE_ID",
    headers={"X-Api-Key": os.environ["WAZAPIN_API_KEY"]},
    timeout=30,
)
resp.raise_for_status()
message = resp.json()["data"]

Replace {messageID} / MESSAGE_ID with the UUID from the create response.

Receive events (recommended)

Configure a webhook URL in the app to get inbound messages and delivery updates without polling. See Webhook payload examples.

Was this page helpful?