Get your API key
Create a key in the dashboard or with POST /v1/api-keys. See Authentication.
Choose channel and recipient
Use your connected channel_id and the customer’s phone number in international format (for example 6281234567890).
Send the 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": "Your order is on the way!"}
}'import { WazapinClient, textMessage } from "@wazapin/sdk";
const wazapin = new WazapinClient({ apiKey: process.env.WAZAPIN_API_KEY! });
await wazapin.messages.send(
textMessage({
channel_id: "wzp_abc123",
to: "6281234567890",
body: "Your order is on the way!",
}),
);import requests
requests.post(
"https://api.wazapin.com/v1/messages",
headers={"X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
json={
"channel_id": "wzp_abc123",
"to": "6281234567890",
"type": "text",
"content": {"body": "Your order is on the way!"},
},
timeout=30,
).raise_for_status()Check message status
Use returned id to query message state.
curl -X GET "https://api.wazapin.com/v1/messages/{messageID}" \
-H "X-Api-Key: YOUR_API_KEY"import { WazapinClient } from "@wazapin/sdk";
const wazapin = new WazapinClient({ apiKey: process.env.WAZAPIN_API_KEY! });
const { data: message } = await wazapin.messages.get("{messageID}");
console.log(message.status);import requests
response = requests.get(
"https://api.wazapin.com/v1/messages/{messageID}",
headers={"X-Api-Key": "YOUR_API_KEY"},
timeout=30,
)
response.raise_for_status()
print(response.json())