Fetch all Transactional Messages
Get
bash
https://api.bunce.so/v1/messaging/transactional
Returns a paginated list of transactional messages.
Request
Query Parameters
per_page int | Specify how many records you want to retrieve per page. If not specify we use a default value of 20. |
cursor string | Specify exactly what cursor you want to retrieve. |
bash
curl --request GET \
--url 'https://api.bunce.so/v1/messaging/transactional' \
--header 'Accept: application/json' \
--header 'X-Authorization: sk_live_************************'
go
import (
"fmt"
"net/http"
"io/ioutil"
)
url := "https://api.bunce.so/v1/messaging/transactional"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept", "application/json")
req.Header.Add("X-Authorization", "sk_live_************************")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
js
import from 'node-fetch'
let = 'https://api.bunce.so/v1/messaging/transactional'
let = {
: 'GET',
: {
: 'application/json',
'X-Authorization': 'sk_live_************************',
},
}
(, )
.then(() => .json())
.then(() => .())
.catch(() => .('error:' + ))
php
<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://api.bunce.so/v1/messaging/transactional');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
'page' => '1',
'per_page' => '10'
]));
$request->setHeaders([
'Accept' => 'application/json',
'X-Authorization' => 'sk_live_************************'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
java
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.bunce.so/v1/messaging/transactional"))
.header("Accept", "application/json")
.header("X-Authorization", "sk_live_************************")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Response
json
{
"success": true,
"data": [
{
"id": "9c030d4e-b773-4492-8321-aa247abfdc0b",
"channel": "email",
"subject": "Reset Password OTP",
"title": "",
"message": "Your OTP is 2359",
"message_type": null,
"created_at": "2024-05-10 19:27:00",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c030de3-2ef7-4f28-ac6f-7fc33eaa90b2",
"channel": "email",
"subject": "Reset Password OTP",
"title": "",
"message": "Your OTP is 8893",
"message_type": null,
"created_at": "2024-05-10 19:28:38",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c031920-86ef-4269-974d-668420746e0a",
"channel": "email",
"subject": "Reset Password OTP",
"title": "",
"message": "Your OTP is 8893",
"message_type": null,
"created_at": "2024-05-10 20:00:03",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c031990-370c-4b6f-a86a-78ff3d6f3b14",
"channel": "email",
"subject": "Reset Password OTP",
"title": "",
"message": "Your OTP is 8893",
"message_type": null,
"created_at": "2024-05-10 20:01:17",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c031a4d-f86a-47d5-86c4-34107834e3aa",
"channel": "email",
"subject": "Reset Password OTP",
"title": "",
"message": "Your OTP is 8893",
"message_type": null,
"created_at": "2024-05-10 20:03:21",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c0734cf-2288-4a95-a5e8-50ecae912bc9",
"channel": "sms",
"subject": "",
"title": "",
"message": "Your OTP is 8893",
"message_type": null,
"created_at": "2024-05-12 21:00:46",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c0735ca-8fb8-49c3-b55a-37ab2689db71",
"channel": "email",
"subject": "Reset Password OTP",
"title": "",
"message": "Your OTP is 0000",
"message_type": null,
"created_at": "2024-05-12 21:03:31",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c073647-55f8-4cfc-b950-aaed4326c1fd",
"channel": "email",
"subject": "Reset Password OTP",
"title": "",
"message": "Your OTP is 0000",
"message_type": null,
"created_at": "2024-05-12 21:04:53",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c07383d-d904-46bc-99f3-d443f646f3de",
"channel": "email",
"subject": "Reset Password OTP",
"title": "",
"message": "Your OTP is 0000",
"message_type": null,
"created_at": "2024-05-12 21:10:22",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c0738ba-3452-4f25-ac1e-b4ad4e0d9b0e",
"channel": "sms",
"subject": "",
"title": "",
"message": "Your OTP is 8893",
"message_type": null,
"created_at": "2024-05-12 21:11:44",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c074577-3c04-4513-88ab-6f0f1031ee18",
"channel": "whatsapp",
"subject": "",
"title": "",
"message": "Your OTP is 8893",
"message_type": null,
"created_at": "2024-05-12 21:47:21",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
},
{
"id": "9c0749ca-5a4b-4fb5-9960-d5cdc7f5a1af",
"channel": "whatsapp",
"subject": "",
"title": "",
"message": "Your OTP is 8893",
"message_type": null,
"created_at": "2024-05-12 21:59:27",
"total_sent": 0,
"total_delivered": 0,
"total_failed": 0,
"total_complained": 0,
"total_bounced": 0
}
],
"meta": {
"has_next_page": false,
"has_prev_page": false,
"next_page_cursor": null,
"prev_page_cursor": null,
"per_page": 20
},
"message": "Transactional Messages fetched successfully"
}
json
{
"success": true,
"data": [],
"meta": {
"has_next_page": false,
"has_prev_page": false,
"next_page_cursor": null,
"prev_page_cursor": null,
"per_page": 20
},
"message": "Transactional Messages fetched successfully"
}