Cloud API Reference
Welcome to our robust WhatsApp Cloud API. Our platform enables businesses to scale their communication effortlessly with high-throughput messaging capabilities.
https://wameto.com/cloud/api/v1
Getting Started
Get your API Key
Navigate to the API Manager and click "Generate Key". You will use this key for all authentication.
Locate Phone ID
In the WhatsApp Accounts section, find your registered Phone Number ID. This identifies the sender.
Fire a Request
Use the code snippets below to send your first message using cURL, PHP, Java, or Node.js.
Authentication
Secure your requests by passing your API Key in the Authorization header. Use the 'Bearer' scheme for all calls.
Authorization: Bearer YOUR_API_KEY
Send Text
Deliver standard text messages with rich formatting support.
| Parameter | Description |
|---|---|
|
phone
String
Required |
E.164 format |
|
message
String
Required |
Text body |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-text" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"message": "Hello World!",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-text';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'message' => 'Hello World!',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"message\":\"Hello World!\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-text")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Bulk Broadcast
Send messages to multiple recipients in a single call. Templates are highly recommended for bulk broadcasting to avoid spam flags.
| Parameter | Description |
|---|---|
|
phones
Array
Required |
List of recipient numbers |
|
message_type
String
Required |
text | template | image | video | document |
|
data
Object
Required |
The message content payload |
|
phone_number_id
String
Required |
Your WABA Phone ID |
Payload Structure for "data" object
{
"text": "Your message content here"
}
{
"template_name": "marketing_val",
"language": "en_US",
"components": []
}
{
"url": "https:\/\/example.com\/image.jpg",
"caption": "Optional caption"
}
{
"url": "https:\/\/example.com\/video.mp4",
"caption": "Optional caption"
}
{
"url": "https:\/\/example.com\/report.pdf",
"caption": "Optional caption",
"filename": "report.pdf"
}
curl -X POST "https://wameto.com/cloud/api/v1/broadcast" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phones": [
"15551234567",
"15559876543"
],
"message_type": "template",
"data": {
"template_name": "hello_world",
"language": "en_US",
"components": []
},
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/broadcast';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phones' =>
array (
0 => '15551234567',
1 => '15559876543',
),
'message_type' => 'template',
'data' =>
array (
'template_name' => 'hello_world',
'language' => 'en_US',
'components' =>
array (
),
),
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phones\":[\"15551234567\",\"15559876543\"],\"message_type\":\"template\",\"data\":{\"template_name\":\"hello_world\",\"language\":\"en_US\",\"components\":[]},\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/broadcast")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Send Image
Send high-resolution images. You can use a public URL or a Meta Media ID.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
url
String
|
Public URL (Required if media_id not provided) |
|
media_id
String
|
Meta Media ID (Required if url not provided) |
|
caption
String
|
Text overlay |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-image" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"media_id": "10629...",
"caption": "Check this out!",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-image';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'media_id' => '10629...',
'caption' => 'Check this out!',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"media_id\":\"10629...\",\"caption\":\"Check this out!\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-image")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Send Video
Stream content directly via URL or Media ID.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
url
String
|
Public URL (Required if media_id not provided) |
|
media_id
String
|
Meta Media ID (Required if url not provided) |
|
caption
String
|
Overlay |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-video" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"media_id": "10629...",
"caption": "Enjoy!",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-video';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'media_id' => '10629...',
'caption' => 'Enjoy!',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"media_id\":\"10629...\",\"caption\":\"Enjoy!\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-video")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Send Document
Share PDFs or Office files via URL or Media ID.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
url
String
|
Public URL (Required if media_id not provided) |
|
media_id
String
|
Meta Media ID (Required if url not provided) |
|
filename
String
|
Custom name |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-document" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"media_id": "10629...",
"filename": "report.pdf",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-document';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'media_id' => '10629...',
'filename' => 'report.pdf',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"media_id\":\"10629...\",\"filename\":\"report.pdf\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-document")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Send Audio
Deliver voice notes or audio files.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
url
String
Required |
.mp3/.ogg link |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-audio" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"url": "https:\/\/www.soundhelix.com\/examples\/mp3\/SoundHelix-Song-1.mp3",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-audio';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'url' => 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"url\":\"https:\\/\\/www.soundhelix.com\\/examples\\/mp3\\/SoundHelix-Song-1.mp3\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-audio")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Send Sticker
Engage users with expressive static or animated stickers.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
url
String
Required |
.webp link |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-sticker" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"url": "https:\/\/raw.githubusercontent.com\/WhatsApp\/stickers\/master\/Android\/app\/src\/main\/assets\/1\/01_Cuppy_smile.webp",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-sticker';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'url' => 'https://raw.githubusercontent.com/WhatsApp/stickers/master/Android/app/src/main/assets/1/01_Cuppy_smile.webp',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"url\":\"https:\\/\\/raw.githubusercontent.com\\/WhatsApp\\/stickers\\/master\\/Android\\/app\\/src\\/main\\/assets\\/1\\/01_Cuppy_smile.webp\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-sticker")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Template Message
Communicate using pre-approved business templates.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
template_name
String
Required |
Template ID |
|
language
String
|
ISO code |
|
components
Array
|
Params |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-template" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"template_name": "hello_world",
"language": "en_US",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-template';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'template_name' => 'hello_world',
'language' => 'en_US',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"template_name\":\"hello_world\",\"language\":\"en_US\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-template")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}List Menu
Present complex choices with a structured menu list.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
message
String
Required |
Body |
|
button_label
String
Required |
Trigger |
|
sections
Array
Required |
Data |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-list" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"message": "Menu",
"button_label": "Select",
"sections": [
{
"title": "Cat 1",
"rows": [
{
"id": "1",
"title": "Item 1"
}
]
}
],
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-list';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'message' => 'Menu',
'button_label' => 'Select',
'sections' =>
array (
0 =>
array (
'title' => 'Cat 1',
'rows' =>
array (
0 =>
array (
'id' => '1',
'title' => 'Item 1',
),
),
),
),
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"message\":\"Menu\",\"button_label\":\"Select\",\"sections\":[{\"title\":\"Cat 1\",\"rows\":[{\"id\":\"1\",\"title\":\"Item 1\"}]}],\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-list")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Send Location
Share static coordinates or business addresses.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
latitude
Float
Required |
Lat |
|
longitude
Float
Required |
Long |
|
name
String
|
Title |
|
address
String
|
Full Address |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-location" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"latitude": 28.6139,
"longitude": 77.209,
"name": "HQ",
"address": "Delhi",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-location';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'latitude' => 28.6139,
'longitude' => 77.209,
'name' => 'HQ',
'address' => 'Delhi',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"latitude\":28.6139,\"longitude\":77.209,\"name\":\"HQ\",\"address\":\"Delhi\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-location")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Send Contact
Share digital contact cards (vCards) with recipients.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
name
String
Required |
Full Name |
|
phones
Array
Required |
Number list |
|
organization
String
|
Company |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-contact" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"name": "John Doe",
"phones": [
{
"phone": "+15559998888",
"type": "WORK"
}
],
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-contact';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'name' => 'John Doe',
'phones' =>
array (
0 =>
array (
'phone' => '+15559998888',
'type' => 'WORK',
),
),
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"name\":\"John Doe\",\"phones\":[{\"phone\":\"+15559998888\",\"type\":\"WORK\"}],\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-contact")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Send Product
Display catalog items for rapid e-commerce checkouts.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
catalog_id
String
Required |
Catalog ID |
|
product_retailer_id
String
Required |
SKU |
|
message
String
|
Text |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/send-product" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"catalog_id": "cat_123",
"product_retailer_id": "sku_99",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/send-product';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'catalog_id' => 'cat_123',
'product_retailer_id' => 'sku_99',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"catalog_id\":\"cat_123\",\"product_retailer_id\":\"sku_99\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/send-product")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Reaction
Express sentiment by reacting with any emoji character.
| Parameter | Description |
|---|---|
|
phone
String
Required |
Recipient |
|
message_id
String
Required |
Target ID |
|
emoji
String
Required |
Character |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/message-react" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "15551234567",
"message_id": "wamid.HBgL...",
"emoji": "\ufffd",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/message-react';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone' => '15551234567',
'message_id' => 'wamid.HBgL...',
'emoji' => '�',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone\":\"15551234567\",\"message_id\":\"wamid.HBgL...\",\"emoji\":\"\\ufffd\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/message-react")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Direct Media Upload
Upload a file directly to Meta's Cloud Servers. This is a POST request (multipart/form-data). It returns a Media ID that you can use in send-media requests.
| Parameter | Description |
|---|---|
|
file
Binary
Required |
The file content |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST (MULTIPART) "https://wameto.com/cloud/api/v1/media-upload" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number_id": "106...",
"_method": "POST (MULTIPART)"
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/media-upload';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'phone_number_id' => '106...',
'_method' => 'POST (MULTIPART)',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"phone_number_id\":\"106...\",\"_method\":\"POST (MULTIPART)\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/media-upload")
.method("POST (MULTIPART)", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Mark as Read
Programmatically confirm message delivery with read receipts.
| Parameter | Description |
|---|---|
|
message_id
String
Required |
Message ID |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/message-read" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"message_id": "wamid.HBgL...",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/message-read';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'message_id' => 'wamid.HBgL...',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"message_id\":\"wamid.HBgL...\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/message-read")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Download Media
Retrieve secure temporary links for media assets.
| Parameter | Description |
|---|---|
|
media_id
String
Required |
Media ID |
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X POST "https://wameto.com/cloud/api/v1/media-download" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"media_id": "media_777",
"phone_number_id": "106..."
}'<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/media-download';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(array (
'media_id' => 'media_777',
'phone_number_id' => '106...',
)));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"media_id\":\"media_777\",\"phone_number_id\":\"106...\"}");
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/media-download")
.method("POST", body)
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}Business Profile
Fetch your current public-facing profile configuration.
| Parameter | Description |
|---|---|
|
phone_number_id
String
Required |
WABA Phone ID |
curl -X GET "https://wameto.com/cloud/api/v1/business-profile" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
<?php
$apiUrl = 'https://wameto.com/cloud/api/v1/business-profile';
$apiKey = 'YOUR_API_KEY';
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "Status: $httpCode\n";
echo "Response: $response";
import okhttp3.*;
import java.io.IOException;
public class SendMessage {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient().newBuilder().build();
Request request = new Request.Builder()
.url("https://wameto.com/cloud/api/v1/business-profile")
.get()
.addHeader("Authorization", "Bearer YOUR_API_KEY")
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
}
}