Documentation Index
Fetch the complete documentation index at: https://orbit-docs.devotel.io/llms.txt
Use this file to discover all available pages before exploring further.
Messaging API
Send messages on any supported channel, retrieve delivery status, retry failed sends, and manage reusable templates. Base path:/v1/messages
Send SMS
POST /v1/messages/sms
Send an SMS message to a single recipient.
Recipient phone number in E.164 format (e.g.,
+14155552671)The text content of the SMS (max 1600 characters; automatically segmented)
URL to receive delivery status callbacks for this message
Arbitrary key-value pairs attached to the message for your reference
cURL
curl -X POST "https://orbit-api.devotel.io/api/v1/messages/sms" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"to": "+14155552671",
"body": "Your verification code is 123456",
"webhook_url": "https://example.com/webhooks/sms",
"metadata": {
"campaign": "onboarding"
}
}'
Node.js
import { Orbit } from '@devotel/orbit-sdk'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
const res = await fetch('https://orbit-api.devotel.io/api/v1/messages/sms', {
method: 'POST',
headers: {
'X-API-Key': process.env.ORBIT_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"to": "+14155552671",
"body": "Your verification code is 123456",
"webhook_url": "https://example.com/webhooks/sms",
"metadata": {
"campaign": "onboarding"
}
}),
})
console.log(await res.json())
Python
import os, requests
headers = {"X-API-Key": os.environ["ORBIT_API_KEY"]}
headers["Content-Type"] = "application/json"
r = requests.post("https://orbit-api.devotel.io/api/v1/messages/sms", headers=headers, json={
"to": "+14155552671",
"body": "Your verification code is 123456",
"webhook_url": "https://example.com/webhooks/sms",
"metadata": {
"campaign": "onboarding"
}
})
print(r.json())
Go
package main
import (
"bytes"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("POST", "https://orbit-api.devotel.io/api/v1/messages/sms", bytes.NewBuffer([]byte(`{
"to": "+14155552671",
"body": "Your verification code is 123456",
"webhook_url": "https://example.com/webhooks/sms",
"metadata": {
"campaign": "onboarding"
}
}`)))
req.Header.Set("X-API-Key", os.Getenv("ORBIT_API_KEY"))
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
Ruby
require 'net/http'
require 'json'
uri = URI('https://orbit-api.devotel.io/api/v1/messages/sms')
req = Net::HTTP::Post.new(uri)
req['X-API-Key'] = ENV['ORBIT_API_KEY']
req['Content-Type'] = 'application/json'
req.body = {
"to": "+14155552671",
"body": "Your verification code is 123456",
"webhook_url": "https://example.com/webhooks/sms",
"metadata": {
"campaign": "onboarding"
}
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body
PHP
<?php
$ch = curl_init('https://orbit-api.devotel.io/api/v1/messages/sms');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . getenv('ORBIT_API_KEY'),
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<JSON
{
"to": "+14155552671",
"body": "Your verification code is 123456",
"webhook_url": "https://example.com/webhooks/sms",
"metadata": {
"campaign": "onboarding"
}
}
JSON);
echo curl_exec($ch);
{
"data": {
"message_id": "msg_abc123",
"channel": "sms",
"to": "+14155552671",
"status": "queued",
"created_at": "2026-03-08T12:00:00Z"
},
"meta": {
"request_id": "req_xyz789",
"timestamp": "2026-03-08T12:00:00Z"
}
}
Send WhatsApp Message
POST /v1/messages/whatsapp
Send a WhatsApp message — free-form text, a pre-approved template, or media.
Recipient phone number in E.164 format
Free-form text message object
Show child attributes
Show child attributes
Message text content
Pre-approved WhatsApp template (use instead of
text for business-initiated conversations)Show child attributes
Show child attributes
Registered template name
Media attachment
Show child attributes
Show child attributes
Publicly accessible URL to the media file
Arbitrary key-value pairs attached to the message
cURL
curl -X POST "https://orbit-api.devotel.io/api/v1/messages/whatsapp" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"to": "+905551234567",
"text": {
"body": "Hello from Orbit!"
}
}'
Node.js
import { Orbit } from '@devotel/orbit-sdk'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
const res = await fetch('https://orbit-api.devotel.io/api/v1/messages/whatsapp', {
method: 'POST',
headers: {
'X-API-Key': process.env.ORBIT_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"to": "+905551234567",
"text": {
"body": "Hello from Orbit!"
}
}),
})
console.log(await res.json())
Python
import os, requests
headers = {"X-API-Key": os.environ["ORBIT_API_KEY"]}
headers["Content-Type"] = "application/json"
r = requests.post("https://orbit-api.devotel.io/api/v1/messages/whatsapp", headers=headers, json={
"to": "+905551234567",
"text": {
"body": "Hello from Orbit!"
}
})
print(r.json())
Go
package main
import (
"bytes"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("POST", "https://orbit-api.devotel.io/api/v1/messages/whatsapp", bytes.NewBuffer([]byte(`{
"to": "+905551234567",
"text": {
"body": "Hello from Orbit!"
}
}`)))
req.Header.Set("X-API-Key", os.Getenv("ORBIT_API_KEY"))
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
Ruby
require 'net/http'
require 'json'
uri = URI('https://orbit-api.devotel.io/api/v1/messages/whatsapp')
req = Net::HTTP::Post.new(uri)
req['X-API-Key'] = ENV['ORBIT_API_KEY']
req['Content-Type'] = 'application/json'
req.body = {
"to": "+905551234567",
"text": {
"body": "Hello from Orbit!"
}
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body
PHP
<?php
$ch = curl_init('https://orbit-api.devotel.io/api/v1/messages/whatsapp');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . getenv('ORBIT_API_KEY'),
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<JSON
{
"to": "+905551234567",
"text": {
"body": "Hello from Orbit!"
}
}
JSON);
echo curl_exec($ch);
{
"data": {
"message_id": "msg_wa_456",
"channel": "whatsapp",
"to": "+905551234567",
"status": "queued",
"created_at": "2026-03-08T12:00:00Z"
},
"meta": {
"request_id": "req_abc456",
"timestamp": "2026-03-08T12:00:00Z"
}
}
Send Email
POST /v1/messages/email
Send a transactional email.
Recipient email address or array of addresses
Email subject line
HTML body of the email (provide
html or text, or both)Plain-text body of the email
Arbitrary key-value pairs attached to the message
cURL
curl -X POST "https://orbit-api.devotel.io/api/v1/messages/email" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"to": "user@example.com",
"subject": "Welcome to Orbit",
"html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
}'
Node.js
import { Orbit } from '@devotel/orbit-sdk'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
const res = await fetch('https://orbit-api.devotel.io/api/v1/messages/email', {
method: 'POST',
headers: {
'X-API-Key': process.env.ORBIT_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"to": "user@example.com",
"subject": "Welcome to Orbit",
"html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
}),
})
console.log(await res.json())
Python
import os, requests
headers = {"X-API-Key": os.environ["ORBIT_API_KEY"]}
headers["Content-Type"] = "application/json"
r = requests.post("https://orbit-api.devotel.io/api/v1/messages/email", headers=headers, json={
"to": "user@example.com",
"subject": "Welcome to Orbit",
"html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
})
print(r.json())
Go
package main
import (
"bytes"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("POST", "https://orbit-api.devotel.io/api/v1/messages/email", bytes.NewBuffer([]byte(`{
"to": "user@example.com",
"subject": "Welcome to Orbit",
"html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
}`)))
req.Header.Set("X-API-Key", os.Getenv("ORBIT_API_KEY"))
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
Ruby
require 'net/http'
require 'json'
uri = URI('https://orbit-api.devotel.io/api/v1/messages/email')
req = Net::HTTP::Post.new(uri)
req['X-API-Key'] = ENV['ORBIT_API_KEY']
req['Content-Type'] = 'application/json'
req.body = {
"to": "user@example.com",
"subject": "Welcome to Orbit",
"html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body
PHP
<?php
$ch = curl_init('https://orbit-api.devotel.io/api/v1/messages/email');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . getenv('ORBIT_API_KEY'),
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<JSON
{
"to": "user@example.com",
"subject": "Welcome to Orbit",
"html": "<h1>Welcome!</h1><p>Thanks for signing up.</p>"
}
JSON);
echo curl_exec($ch);
{
"data": {
"message_id": "msg_em_789",
"channel": "email",
"to": "user@example.com",
"status": "queued",
"created_at": "2026-03-08T12:00:00Z"
},
"meta": {
"request_id": "req_em_101",
"timestamp": "2026-03-08T12:00:00Z"
}
}
Send RCS / Viber Message
POST /v1/messages/rcs | POST /v1/messages/viber
Send a message on the RCS or Viber channel. Both use the same generic payload.
Recipient phone number in E.164 format
Message text content
Arbitrary key-value pairs attached to the message
cURL
curl -X POST "https://orbit-api.devotel.io/api/v1/messages/rcs" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"to": "+14155552671",
"body": "Your order has shipped!"
}'
Node.js
import { Orbit } from '@devotel/orbit-sdk'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
const res = await fetch('https://orbit-api.devotel.io/api/v1/messages/rcs', {
method: 'POST',
headers: {
'X-API-Key': process.env.ORBIT_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"to": "+14155552671",
"body": "Your order has shipped!"
}),
})
console.log(await res.json())
Python
import os, requests
headers = {"X-API-Key": os.environ["ORBIT_API_KEY"]}
headers["Content-Type"] = "application/json"
r = requests.post("https://orbit-api.devotel.io/api/v1/messages/rcs", headers=headers, json={
"to": "+14155552671",
"body": "Your order has shipped!"
})
print(r.json())
Go
package main
import (
"bytes"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("POST", "https://orbit-api.devotel.io/api/v1/messages/rcs", bytes.NewBuffer([]byte(`{
"to": "+14155552671",
"body": "Your order has shipped!"
}`)))
req.Header.Set("X-API-Key", os.Getenv("ORBIT_API_KEY"))
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
Ruby
require 'net/http'
require 'json'
uri = URI('https://orbit-api.devotel.io/api/v1/messages/rcs')
req = Net::HTTP::Post.new(uri)
req['X-API-Key'] = ENV['ORBIT_API_KEY']
req['Content-Type'] = 'application/json'
req.body = {
"to": "+14155552671",
"body": "Your order has shipped!"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body
PHP
<?php
$ch = curl_init('https://orbit-api.devotel.io/api/v1/messages/rcs');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . getenv('ORBIT_API_KEY'),
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<JSON
{
"to": "+14155552671",
"body": "Your order has shipped!"
}
JSON);
echo curl_exec($ch);
{
"data": {
"message_id": "msg_rcs_321",
"channel": "rcs",
"to": "+14155552671",
"status": "queued",
"created_at": "2026-03-08T12:00:00Z"
},
"meta": {
"request_id": "req_rcs_555",
"timestamp": "2026-03-08T12:00:00Z"
}
}
List Messages
GET /v1/messages
Retrieve a paginated list of sent messages with optional filters.
Cursor for pagination (returned in previous response)
Number of results per page (max 100)
Filter by channel:
sms, whatsapp, rcs, viber, emailFilter by status:
queued, sent, delivered, failed, readFilter by recipient (exact match)
cURL
curl -X GET "https://orbit-api.devotel.io/api/v1/messages?channel=sms&status=delivered&limit=10" \
-H "X-API-Key: dv_live_sk_your_key_here"
Node.js
import { Orbit } from '@devotel/orbit-sdk'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
const res = await fetch('https://orbit-api.devotel.io/api/v1/messages?channel=sms&status=delivered&limit=10', {
method: 'GET',
headers: {
'X-API-Key': process.env.ORBIT_API_KEY!,
},
})
console.log(await res.json())
Python
import os, requests
headers = {"X-API-Key": os.environ["ORBIT_API_KEY"]}
r = requests.get("https://orbit-api.devotel.io/api/v1/messages?channel=sms&status=delivered&limit=10", headers=headers)
print(r.json())
Go
package main
import (
"bytes"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://orbit-api.devotel.io/api/v1/messages?channel=sms&status=delivered&limit=10", nil)
req.Header.Set("X-API-Key", os.Getenv("ORBIT_API_KEY"))
http.DefaultClient.Do(req)
}
Ruby
require 'net/http'
require 'json'
uri = URI('https://orbit-api.devotel.io/api/v1/messages?channel=sms&status=delivered&limit=10')
req = Net::HTTP::Get.new(uri)
req['X-API-Key'] = ENV['ORBIT_API_KEY']
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body
PHP
<?php
$ch = curl_init('https://orbit-api.devotel.io/api/v1/messages?channel=sms&status=delivered&limit=10');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . getenv('ORBIT_API_KEY'),
]);
echo curl_exec($ch);
{
"data": [
{
"message_id": "msg_001",
"channel": "sms",
"to": "+14155552671",
"status": "delivered",
"created_at": "2026-03-08T11:00:00Z"
}
],
"meta": {
"request_id": "req_list_001",
"timestamp": "2026-03-08T12:00:00Z",
"pagination": {
"cursor": "cur_msg_abc",
"has_more": true,
"total": 1542
}
}
}
Get Message
GET /v1/messages/{id}
Retrieve details of a single message, including delivery status and timestamps.
Message ID (e.g.,
msg_abc123)cURL
curl -X GET "https://orbit-api.devotel.io/api/v1/messages/msg_abc123" \
-H "X-API-Key: dv_live_sk_your_key_here"
Node.js
import { Orbit } from '@devotel/orbit-sdk'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
const res = await fetch('https://orbit-api.devotel.io/api/v1/messages/msg_abc123', {
method: 'GET',
headers: {
'X-API-Key': process.env.ORBIT_API_KEY!,
},
})
console.log(await res.json())
Python
import os, requests
headers = {"X-API-Key": os.environ["ORBIT_API_KEY"]}
r = requests.get("https://orbit-api.devotel.io/api/v1/messages/msg_abc123", headers=headers)
print(r.json())
Go
package main
import (
"bytes"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://orbit-api.devotel.io/api/v1/messages/msg_abc123", nil)
req.Header.Set("X-API-Key", os.Getenv("ORBIT_API_KEY"))
http.DefaultClient.Do(req)
}
Ruby
require 'net/http'
require 'json'
uri = URI('https://orbit-api.devotel.io/api/v1/messages/msg_abc123')
req = Net::HTTP::Get.new(uri)
req['X-API-Key'] = ENV['ORBIT_API_KEY']
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body
PHP
<?php
$ch = curl_init('https://orbit-api.devotel.io/api/v1/messages/msg_abc123');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . getenv('ORBIT_API_KEY'),
]);
echo curl_exec($ch);
{
"data": {
"message_id": "msg_abc123",
"channel": "sms",
"to": "+14155552671",
"body": "Your verification code is 123456",
"status": "delivered",
"created_at": "2026-03-08T12:00:00Z",
"delivered_at": "2026-03-08T12:00:03Z"
},
"meta": {
"request_id": "req_get_001",
"timestamp": "2026-03-08T12:01:00Z"
}
}
Retry Message
POST /v1/messages/{id}/retry
Re-send a message that previously failed. The original message parameters are reused.
ID of the failed message to retry
cURL
curl -X POST "https://orbit-api.devotel.io/api/v1/messages/msg_fail_001/retry" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{}'
Node.js
import { Orbit } from '@devotel/orbit-sdk'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
const res = await fetch('https://orbit-api.devotel.io/api/v1/messages/msg_fail_001/retry', {
method: 'POST',
headers: {
'X-API-Key': process.env.ORBIT_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
})
console.log(await res.json())
Python
import os, requests
headers = {"X-API-Key": os.environ["ORBIT_API_KEY"]}
headers["Content-Type"] = "application/json"
r = requests.post("https://orbit-api.devotel.io/api/v1/messages/msg_fail_001/retry", headers=headers, json={})
print(r.json())
Go
package main
import (
"bytes"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("POST", "https://orbit-api.devotel.io/api/v1/messages/msg_fail_001/retry", bytes.NewBuffer([]byte(`{}`)))
req.Header.Set("X-API-Key", os.Getenv("ORBIT_API_KEY"))
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
Ruby
require 'net/http'
require 'json'
uri = URI('https://orbit-api.devotel.io/api/v1/messages/msg_fail_001/retry')
req = Net::HTTP::Post.new(uri)
req['X-API-Key'] = ENV['ORBIT_API_KEY']
req['Content-Type'] = 'application/json'
req.body = {}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body
PHP
<?php
$ch = curl_init('https://orbit-api.devotel.io/api/v1/messages/msg_fail_001/retry');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . getenv('ORBIT_API_KEY'),
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<JSON
{}
JSON);
echo curl_exec($ch);
{
"data": {
"message_id": "msg_retry_002",
"original_message_id": "msg_fail_001",
"status": "queued",
"created_at": "2026-03-08T12:05:00Z"
},
"meta": {
"request_id": "req_retry_001",
"timestamp": "2026-03-08T12:05:00Z"
}
}
Templates
List Templates
GET /v1/messages/templates
Retrieve all message templates with cursor-based pagination.
Cursor for pagination
Number of results per page (max 100)
cURL
curl -X GET "https://orbit-api.devotel.io/api/v1/messages/templates?limit=10" \
-H "X-API-Key: dv_live_sk_your_key_here"
Node.js
import { Orbit } from '@devotel/orbit-sdk'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
const res = await fetch('https://orbit-api.devotel.io/api/v1/messages/templates?limit=10', {
method: 'GET',
headers: {
'X-API-Key': process.env.ORBIT_API_KEY!,
},
})
console.log(await res.json())
Python
import os, requests
headers = {"X-API-Key": os.environ["ORBIT_API_KEY"]}
r = requests.get("https://orbit-api.devotel.io/api/v1/messages/templates?limit=10", headers=headers)
print(r.json())
Go
package main
import (
"bytes"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("GET", "https://orbit-api.devotel.io/api/v1/messages/templates?limit=10", nil)
req.Header.Set("X-API-Key", os.Getenv("ORBIT_API_KEY"))
http.DefaultClient.Do(req)
}
Ruby
require 'net/http'
require 'json'
uri = URI('https://orbit-api.devotel.io/api/v1/messages/templates?limit=10')
req = Net::HTTP::Get.new(uri)
req['X-API-Key'] = ENV['ORBIT_API_KEY']
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body
PHP
<?php
$ch = curl_init('https://orbit-api.devotel.io/api/v1/messages/templates?limit=10');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . getenv('ORBIT_API_KEY'),
]);
echo curl_exec($ch);
Create Template
POST /v1/messages/templates
Create a new message template for a given channel.
Channel the template is for:
sms, whatsapp, rcs, viber, emailTemplate name (unique per channel)
Template body content — use
{{variable_name}} for dynamic placeholdersTemplate category (e.g.,
marketing, transactional, otp)Language code (e.g.,
en, tr, ar)List of variable definitions used in the template content
Initial status:
draft or pending_approvalcURL
curl -X POST "https://orbit-api.devotel.io/api/v1/messages/templates" \
-H "X-API-Key: dv_live_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"channel": "whatsapp",
"name": "order_confirmation",
"content": "Hi {{customer_name}}, your order #{{order_id}} has been confirmed.",
"category": "transactional",
"language": "en"
}'
Node.js
import { Orbit } from '@devotel/orbit-sdk'
const orbit = new Orbit({
apiKey: process.env.ORBIT_API_KEY!,
})
const res = await fetch('https://orbit-api.devotel.io/api/v1/messages/templates', {
method: 'POST',
headers: {
'X-API-Key': process.env.ORBIT_API_KEY!,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"channel": "whatsapp",
"name": "order_confirmation",
"content": "Hi {{customer_name}}, your order #{{order_id}} has been confirmed.",
"category": "transactional",
"language": "en"
}),
})
console.log(await res.json())
Python
import os, requests
headers = {"X-API-Key": os.environ["ORBIT_API_KEY"]}
headers["Content-Type"] = "application/json"
r = requests.post("https://orbit-api.devotel.io/api/v1/messages/templates", headers=headers, json={
"channel": "whatsapp",
"name": "order_confirmation",
"content": "Hi {{customer_name}}, your order #{{order_id}} has been confirmed.",
"category": "transactional",
"language": "en"
})
print(r.json())
Go
package main
import (
"bytes"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest("POST", "https://orbit-api.devotel.io/api/v1/messages/templates", bytes.NewBuffer([]byte(`{
"channel": "whatsapp",
"name": "order_confirmation",
"content": "Hi {{customer_name}}, your order #{{order_id}} has been confirmed.",
"category": "transactional",
"language": "en"
}`)))
req.Header.Set("X-API-Key", os.Getenv("ORBIT_API_KEY"))
req.Header.Set("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
Ruby
require 'net/http'
require 'json'
uri = URI('https://orbit-api.devotel.io/api/v1/messages/templates')
req = Net::HTTP::Post.new(uri)
req['X-API-Key'] = ENV['ORBIT_API_KEY']
req['Content-Type'] = 'application/json'
req.body = {
"channel": "whatsapp",
"name": "order_confirmation",
"content": "Hi {{customer_name}}, your order #{{order_id}} has been confirmed.",
"category": "transactional",
"language": "en"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.body
PHP
<?php
$ch = curl_init('https://orbit-api.devotel.io/api/v1/messages/templates');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . getenv('ORBIT_API_KEY'),
'Content-Type: application/json',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, <<<JSON
{
"channel": "whatsapp",
"name": "order_confirmation",
"content": "Hi {{customer_name}}, your order #{{order_id}} has been confirmed.",
"category": "transactional",
"language": "en"
}
JSON);
echo curl_exec($ch);
{
"data": {
"id": "tpl_abc123",
"channel": "whatsapp",
"name": "order_confirmation",
"content": "Hi {{customer_name}}, your order #{{order_id}} has been confirmed.",
"category": "transactional",
"language": "en",
"status": "pending_approval",
"created_at": "2026-03-08T12:00:00Z"
},
"meta": {
"request_id": "req_tpl_001",
"timestamp": "2026-03-08T12:00:00Z"
}
}
Delete Template
DELETE /v1/messages/templates/{id}
Permanently delete a message template.
Template ID
204 No Content