Endpoint reference
Every endpoint
Section titled “Every endpoint”| Method | Path | Scope |
|---|---|---|
POST |
/messages/whatsapp |
WHATSAPP_SEND |
POST |
/messages/whatsapp/preview |
WHATSAPP_SEND |
GET |
/messages/whatsapp |
MESSAGES_READ |
GET |
/messages/whatsapp/:id |
MESSAGES_READ |
GET |
/messages/whatsapp/:id/media |
MEDIA_READ |
POST |
/messages/whatsapp/:id/read |
CONVERSATIONS_WRITE |
POST |
/conversations/:id/read |
CONVERSATIONS_WRITE |
GET |
/templates |
CATALOG_READ |
GET |
/numbers |
CATALOG_READ |
GET |
/conversations |
CONVERSATIONS_READ |
GET |
/calls |
CALLS_READ |
GET |
/calls/:id |
CALLS_READ |
GET |
/calls/ice |
CALLS_READ |
GET |
/calls/:id/offer |
CALLS_WRITE |
POST |
/calls/:id/answer |
CALLS_WRITE |
POST |
/calls/:id/action |
CALLS_WRITE |
POST |
/conversations/:id/call |
CALLS_WRITE |
GET |
/campaigns |
CAMPAIGNS_READ |
GET |
/campaigns/:id |
CAMPAIGNS_READ |
GET |
/campaigns/:id/recipients |
CAMPAIGNS_READ |
POST |
/campaigns |
CAMPAIGNS_WRITE |
PATCH |
/campaigns/:id |
CAMPAIGNS_WRITE |
POST |
/campaigns/:id/recipients |
CAMPAIGNS_WRITE |
DELETE |
/campaigns/:id/recipients |
CAMPAIGNS_WRITE |
POST |
/campaigns/:id/start |
CAMPAIGNS_WRITE |
POST |
/campaigns/:id/pause |
CAMPAIGNS_WRITE |
POST |
/campaigns/:id/cancel |
CAMPAIGNS_WRITE |
DELETE |
/campaigns/:id |
CAMPAIGNS_WRITE |
Everything else — keys, webhook endpoints, numbers, template submission — is managed from the console by a signed-in operator, not by an API key.
Sending a message
Section titled “Sending a message”One call, in whichever language you are writing. The tab you pick is remembered across every example on the site.
curl -X POST https://vaarto.com/api/v1/messages/whatsapp \ -H "Authorization: Bearer $KEY" \ -H "Content-Type: application/json" \ -d '{ "to": "+919876543210", "template": { "name": "order_shipped", "language": "en_US", "variables": { "name": "Ravi", "order_id": "BLR-4471" } }, "idempotencyKey": "order-4471-shipped" }'const response = await fetch("https://vaarto.com/api/v1/messages/whatsapp", { method: "POST", headers: { Authorization: `Bearer ${process.env.VAARTO_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ to: "+919876543210", template: { name: "order_shipped", language: "en_US", variables: { name: "Ravi", order_id: "BLR-4471" }, }, // Same key on a retry returns the first result instead of sending twice. idempotencyKey: `order-${orderId}-shipped`, metadata: { orderId }, }),});
const { data, error } = await response.json();if (!response.ok) throw new Error(error.message);
console.log(data.id, data.status);import os, requests
response = requests.post( "https://vaarto.com/api/v1/messages/whatsapp", headers={"Authorization": f"Bearer {os.environ['VAARTO_API_KEY']}"}, json={ "to": "+919876543210", "template": { "name": "order_shipped", "language": "en_US", "variables": {"name": "Ravi", "order_id": "BLR-4471"}, }, "idempotencyKey": f"order-{order_id}-shipped", }, timeout=10,)
body = response.json()response.raise_for_status()print(body["data"]["id"], body["data"]["status"])$response = Http::withToken(env('VAARTO_API_KEY')) ->post('https://vaarto.com/api/v1/messages/whatsapp', [ 'to' => '+919876543210', 'template' => [ 'name' => 'order_shipped', 'language' => 'en_US', 'variables' => ['name' => 'Ravi', 'order_id' => 'BLR-4471'], ], 'idempotencyKey' => "order-{$orderId}-shipped", ]);
$body = $response->json();