GET WhatsApp Delivery Record by UUID
This endpoint retrieves the full delivery record for a specific WhatsApp message by its unique identifier. Use this to check the current status of a message after it has been sent — for example, to confirm whether it was delivered or read by the recipient.
Configure the API Endpoint
https://api.betatel.com/api/v1/connect-hub/whatsapp/{uuid}/wdr
- Method:
GET
Set Up the Headers
| Param | Value | Description |
|---|---|---|
| Content-type | application/json | Specifies the payload format. |
| x-api-key | {{x-api-key}} | API key for authorization. |
| x-account-id | {{x-account-id}} | User identifier for added security and tracking. |
URL Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| uuid | string | Yes | The unique identifier of the WhatsApp message, returned when the OTP was sent. |
Code Snippets
- cUrl
- Python
- Node.js
- PHP
- Java
- C#
Example - cURL
curl --location 'https://api.betatel.com/api/v1/connect-hub/whatsapp/01JV5V54KPYK9GB29265EQRZ2P/wdr' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-account-id: YOUR_ACCOUNT_ID'
Example - Python
import http.client
uuid = "01JV5V54KPYK9GB29265EQRZ2P"
conn = http.client.HTTPSConnection("api.betatel.com")
headers = {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY',
'x-account-id': 'YOUR_ACCOUNT_ID'
}
conn.request("GET", f"/api/v1/connect-hub/whatsapp/{uuid}/wdr", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Example - Node.js
const axios = require('axios');
const uuid = '01JV5V54KPYK9GB29265EQRZ2P';
axios.get(`https://api.betatel.com/api/v1/connect-hub/whatsapp/${uuid}/wdr`, {
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY',
'x-account-id': 'YOUR_ACCOUNT_ID'
}
})
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Example - PHP
<?php
$uuid = "01JV5V54KPYK9GB29265EQRZ2P";
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.betatel.com/api/v1/connect-hub/whatsapp/{$uuid}/wdr",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'x-api-key: YOUR_API_KEY',
'x-account-id: YOUR_ACCOUNT_ID'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Example - Java
String uuid = "01JV5V54KPYK9GB29265EQRZ2P";
HttpResponse<String> response = Unirest.get("https://api.betatel.com/api/v1/connect-hub/whatsapp/" + uuid + "/wdr")
.header("Content-Type", "application/json")
.header("x-api-key", "YOUR_API_KEY")
.header("x-account-id", "YOUR_ACCOUNT_ID")
.asString();
System.out.println(response.getBody());
Example - C#
string uuid = "01JV5V54KPYK9GB29265EQRZ2P";
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"https://api.betatel.com/api/v1/connect-hub/whatsapp/{uuid}/wdr");
request.Headers.Add("x-api-key", "YOUR_API_KEY");
request.Headers.Add("x-account-id", "YOUR_ACCOUNT_ID");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Understanding the Response
The endpoint returns the full WhatsApp Delivery Record (WDR) for the requested message.
JSON Schema:
{
"uuid": "01JV5V54KPYK9GB29265EQRZ2P",
"wam_id": "wamid.HBgLMzg3NjE0NDQ1NTUVAgARGBI",
"to": "38761444555",
"text": "482910",
"status": "DELIVERED",
"timestamp": "2024-01-15T10:30:00.000Z",
"delivery_timestamp": "2024-01-15T10:30:02.000Z",
"delivery_time": 2143,
"webhook_delivered": true
}
| Field | Type | Description |
|---|---|---|
| uuid | string | The unique identifier for the WhatsApp message. |
| wam_id | string | The WhatsApp platform message ID assigned by Meta. |
| to | string | The recipient's phone number. |
| text | string | The message text that was sent. |
| status | string | The current delivery status of the message (see table below). |
| timestamp | string | ISO 8601 timestamp of when the message was created. |
| delivery_timestamp | string | ISO 8601 timestamp of when the message was delivered (if applicable). |
| delivery_time | number | Time in milliseconds between sending and delivery confirmation. |
| webhook_delivered | boolean | Whether the status update was successfully delivered to your webhook. |
Message Status Values
| Status | Description |
|---|---|
PENDING | Message accepted and queued for delivery. |
SENT | Message dispatched to the WhatsApp platform. |
DELIVERED | Message delivered to the recipient's device. |
READ | Recipient has opened and read the message. |
FAILED | Message could not be delivered. |
EXPIRED | Message expired before delivery was confirmed. |
DELETED | Message was deleted by the recipient. |
UNKNOWN | Status could not be determined. |
Error Handling
- 401 - Unauthorized: Authentication failed
- 404 - Not Found: No message found with the provided UUID
- 500 - Internal Server Error: An unexpected error occurred on the server