Send single message
curl --request POST \
--url https://api-message.nativehub.live/api/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "+8801712345678",
"from": "+8801912345678",
"body": "Your OTP is 123456. Valid for 5 minutes.",
"provider": "provider-uuid"
}
'import requests
url = "https://api-message.nativehub.live/api/v1/messages"
payload = {
"to": "+8801712345678",
"from": "+8801912345678",
"body": "Your OTP is 123456. Valid for 5 minutes.",
"provider": "provider-uuid"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '+8801712345678',
from: '+8801912345678',
body: JSON.stringify('Your OTP is 123456. Valid for 5 minutes.'),
provider: 'provider-uuid'
})
};
fetch('https://api-message.nativehub.live/api/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-message.nativehub.live/api/v1/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => '+8801712345678',
'from' => '+8801912345678',
'body' => 'Your OTP is 123456. Valid for 5 minutes.',
'provider' => 'provider-uuid'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-message.nativehub.live/api/v1/messages"
payload := strings.NewReader("{\n \"to\": \"+8801712345678\",\n \"from\": \"+8801912345678\",\n \"body\": \"Your OTP is 123456. Valid for 5 minutes.\",\n \"provider\": \"provider-uuid\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-message.nativehub.live/api/v1/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"+8801712345678\",\n \"from\": \"+8801912345678\",\n \"body\": \"Your OTP is 123456. Valid for 5 minutes.\",\n \"provider\": \"provider-uuid\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-message.nativehub.live/api/v1/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"+8801712345678\",\n \"from\": \"+8801912345678\",\n \"body\": \"Your OTP is 123456. Valid for 5 minutes.\",\n \"provider\": \"provider-uuid\"\n}"
response = http.request(request)
puts response.read_body{
"id": "d4e5f6a7-b8c9-0123-def4-567890123456",
"tenant_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"account_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"user_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"batch_id": "e5f6a7b8-c9d0-1234-ef56-789012345678",
"from": "+8801912345678",
"to": "+8801712345678",
"body": "Your OTP is 123456. Valid for 5 minutes.",
"status": "delivered",
"part_count": 1,
"sell_price": 0.05,
"cost_price": 0.03,
"connection_id": "f6a7b8c9-d0e1-2345-fa67-890123456789",
"provider_message_id": "sm_abc123xyz",
"priority": "normal",
"is_encrypted": false,
"sent_at": "2026-02-14T10:15:30Z",
"delivered_at": "2026-02-14T10:15:32Z",
"created_at": "2026-02-14T10:15:28Z",
"updated_at": "2026-02-14T10:15:32Z"
}{
"error": "Invalid request parameters"
}{
"error": "Invalid request parameters"
}Messages
Send single message
Send SMS message to a single recipient
POST
/
messages
Send single message
curl --request POST \
--url https://api-message.nativehub.live/api/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "+8801712345678",
"from": "+8801912345678",
"body": "Your OTP is 123456. Valid for 5 minutes.",
"provider": "provider-uuid"
}
'import requests
url = "https://api-message.nativehub.live/api/v1/messages"
payload = {
"to": "+8801712345678",
"from": "+8801912345678",
"body": "Your OTP is 123456. Valid for 5 minutes.",
"provider": "provider-uuid"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '+8801712345678',
from: '+8801912345678',
body: JSON.stringify('Your OTP is 123456. Valid for 5 minutes.'),
provider: 'provider-uuid'
})
};
fetch('https://api-message.nativehub.live/api/v1/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-message.nativehub.live/api/v1/messages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => '+8801712345678',
'from' => '+8801912345678',
'body' => 'Your OTP is 123456. Valid for 5 minutes.',
'provider' => 'provider-uuid'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-message.nativehub.live/api/v1/messages"
payload := strings.NewReader("{\n \"to\": \"+8801712345678\",\n \"from\": \"+8801912345678\",\n \"body\": \"Your OTP is 123456. Valid for 5 minutes.\",\n \"provider\": \"provider-uuid\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-message.nativehub.live/api/v1/messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"+8801712345678\",\n \"from\": \"+8801912345678\",\n \"body\": \"Your OTP is 123456. Valid for 5 minutes.\",\n \"provider\": \"provider-uuid\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-message.nativehub.live/api/v1/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"+8801712345678\",\n \"from\": \"+8801912345678\",\n \"body\": \"Your OTP is 123456. Valid for 5 minutes.\",\n \"provider\": \"provider-uuid\"\n}"
response = http.request(request)
puts response.read_body{
"id": "d4e5f6a7-b8c9-0123-def4-567890123456",
"tenant_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"account_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"user_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"batch_id": "e5f6a7b8-c9d0-1234-ef56-789012345678",
"from": "+8801912345678",
"to": "+8801712345678",
"body": "Your OTP is 123456. Valid for 5 minutes.",
"status": "delivered",
"part_count": 1,
"sell_price": 0.05,
"cost_price": 0.03,
"connection_id": "f6a7b8c9-d0e1-2345-fa67-890123456789",
"provider_message_id": "sm_abc123xyz",
"priority": "normal",
"is_encrypted": false,
"sent_at": "2026-02-14T10:15:30Z",
"delivered_at": "2026-02-14T10:15:32Z",
"created_at": "2026-02-14T10:15:28Z",
"updated_at": "2026-02-14T10:15:32Z"
}{
"error": "Invalid request parameters"
}{
"error": "Invalid request parameters"
}Authorizations
BearerAuthApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Message sent successfully
Available options:
pending, queued, submitted, delivered, failed, rejected, expired ⌘I