Quickstart
Warsita turns a WhatsApp number into a REST API. You link the number once by scanning a QR code, the same way you would with WhatsApp Web, and then your app sends messages with a single HTTP request and receives incoming messages by webhook. This guide takes you from a new workspace to a delivered message in a few minutes.
1. Get access
Warsita is invitation-only. Request access and we set up a workspace and email you an invitation. Open it, choose a password, and you land in the dashboard at https://app.warsita.com.
2. Link a number
In the dashboard, open Sessions → New session, give it a name and enter the number you will link. Then, on that phone, open WhatsApp → Linked devices → Link a device and scan the QR code. If scanning is awkward, choose Get pairing code and type the 8-character code on the phone instead.
The session turns Connected within a few seconds. The session works through the phone's WhatsApp, so keep the phone connected to the internet: WhatsApp logs out linked devices when the phone stays offline for about 14 days.
Use a number you are allowed to automate. WhatsApp can ban numbers that send spam; see Sessions.
3. Copy the API key
Creating the session showed its API key (wsk_…). It is shown once, so store it in your secret manager or environment. You can regenerate it on the session's page; the old key stops working at once.
4. Send a message
curl https://api.warsita.com/v1/messages \
-H "Authorization: Bearer $WARSITA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+6281234567890", "text": "Your order has shipped."}'
Warsita accepts the message and queues it:
{
"data": {
"id": "msg_8sJq2LwP0aZx4TnB6kRv",
"session_id": "ses_3kV9mQ2pX7aL0zR5tN8w",
"to": "+6281234567890",
"type": "text",
"payload": { "to": "+6281234567890", "text": "Your order has shipped." },
"wa_message_id": "",
"status": "queued",
"error": "",
"attempts": 0,
"created_at": "2026-10-27T10:00:00Z",
"updated_at": "2026-10-27T10:00:00Z"
}
}
The session sends it within seconds and the status moves to sent, then delivered and read as the recipient's phone reports back. Follow it with GET /v1/messages/{id} or the message.sent and message-receipt.update webhooks.
In other languages
JavaScript (Node.js 18+):
const res = await fetch("https://api.warsita.com/v1/messages", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WARSITA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ to: "+6281234567890", text: "Your order has shipped." }),
});
const { data } = await res.json();
console.log(data.id, data.status);
Python (requests):
import os, requests
res = requests.post(
"https://api.warsita.com/v1/messages",
headers={"Authorization": f"Bearer {os.environ['WARSITA_API_KEY']}"},
json={"to": "+6281234567890", "text": "Your order has shipped."},
timeout=10,
)
res.raise_for_status()
print(res.json()["data"]["id"])
PHP:
$ch = curl_init("https://api.warsita.com/v1/messages");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("WARSITA_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => json_encode(["to" => "+6281234567890", "text" => "Your order has shipped."]),
]);
$message = json_decode(curl_exec($ch), true)["data"];
echo $message["id"];
C# (.NET 6+):
using System.Net.Http.Headers;
using System.Net.Http.Json;
var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("WARSITA_API_KEY"));
var res = await http.PostAsJsonAsync("https://api.warsita.com/v1/messages",
new { to = "+6281234567890", text = "Your order has shipped." });
Console.WriteLine(await res.Content.ReadAsStringAsync());
Java (11+):
var request = HttpRequest.newBuilder(URI.create("https://api.warsita.com/v1/messages"))
.header("Authorization", "Bearer " + System.getenv("WARSITA_API_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(
"{\"to\": \"+6281234567890\", \"text\": \"Your order has shipped.\"}"))
.build();
var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
5. Receive messages
Point the session's webhook at your server (session page → Webhook, or PUT /v1/sessions/{id}/webhook) and subscribe to messages.received. Every incoming message then arrives as a signed POST. Webhooks shows how to verify the signature.
Next steps
- Authentication: API keys and personal access tokens.
- Send Messages: images, documents, locations, groups and mentions.
- API Reference: every endpoint, and the OpenAPI file for Postman and code generators.