List templates
curl --request GET \
--url https://api.onexaura.com/v1/templates \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onexaura.com/v1/templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onexaura.com/v1/templates', 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.onexaura.com/v1/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onexaura.com/v1/templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onexaura.com/v1/templates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onexaura.com/v1/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"page": 1,
"pageSize": 25,
"total": 137,
"totalPages": 6,
"data": [
{
"id": "tpl_abc123",
"name": "<string>",
"status": "enabled",
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"pinLength": 6,
"pinType": "numeric",
"pinAttempts": 123,
"pinTimeToLive": "<string>",
"verifyPinLimit": "<string>",
"sendPinPerTemplateLimit": "<string>",
"sendPinPerPhoneNumberLimit": "<string>",
"resendCooldown": "<string>",
"channels": [
{
"id": "<string>",
"channelType": "sms",
"channelAccountId": "<string>",
"providerTemplateRef": "<string>",
"contentText": "<string>",
"subjectText": "<string>",
"isDefault": true,
"languageCode": "<string>",
"copyCodeButtonIndex": 123,
"pinPlaceholder": "<string>",
"paramDefaults": {},
"entityId": "<string>",
"unicode": true
}
]
}
]
}{
"error": {
"code": "pin_expired",
"message": "<string>",
"requestId": "req_9f3a2c",
"details": {}
}
}{
"error": {
"code": "pin_expired",
"message": "<string>",
"requestId": "req_9f3a2c",
"details": {}
}
}{
"error": {
"code": "pin_expired",
"message": "<string>",
"requestId": "req_9f3a2c",
"details": {}
}
}Verify
List templates
The templates a PIN can be sent under, with their PIN rules and per-channel content.
GET
/
v1
/
templates
List templates
curl --request GET \
--url https://api.onexaura.com/v1/templates \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.onexaura.com/v1/templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.onexaura.com/v1/templates', 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.onexaura.com/v1/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.onexaura.com/v1/templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.onexaura.com/v1/templates")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.onexaura.com/v1/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"page": 1,
"pageSize": 25,
"total": 137,
"totalPages": 6,
"data": [
{
"id": "tpl_abc123",
"name": "<string>",
"status": "enabled",
"archivedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"updatedBy": "<string>",
"pinLength": 6,
"pinType": "numeric",
"pinAttempts": 123,
"pinTimeToLive": "<string>",
"verifyPinLimit": "<string>",
"sendPinPerTemplateLimit": "<string>",
"sendPinPerPhoneNumberLimit": "<string>",
"resendCooldown": "<string>",
"channels": [
{
"id": "<string>",
"channelType": "sms",
"channelAccountId": "<string>",
"providerTemplateRef": "<string>",
"contentText": "<string>",
"subjectText": "<string>",
"isDefault": true,
"languageCode": "<string>",
"copyCodeButtonIndex": 123,
"pinPlaceholder": "<string>",
"paramDefaults": {},
"entityId": "<string>",
"unicode": true
}
]
}
]
}{
"error": {
"code": "pin_expired",
"message": "<string>",
"requestId": "req_9f3a2c",
"details": {}
}
}{
"error": {
"code": "pin_expired",
"message": "<string>",
"requestId": "req_9f3a2c",
"details": {}
}
}{
"error": {
"code": "pin_expired",
"message": "<string>",
"requestId": "req_9f3a2c",
"details": {}
}
}A template is what a send is configured by. It decides the shape of the PIN — length, character
set, lifetime, how many verify attempts it allows — and it carries one entry per channel it can
go out on, each bound to a channel account and to that provider’s own template.
You will mostly call this to discover
templateId values, and to read the limits your
integration has to respect.
The limits live here
Rate limits are set per template, not per account. These are the fields to read:| Field | Governs |
|---|---|
resendCooldown | How long before a resend is allowed |
pinAttempts | Wrong guesses allowed before pin_blocked |
pinTimeToLive | How long a PIN stays valid |
verifyPinLimit | Verify rate ceiling |
sendPinPerTemplateLimit | Send rate ceiling for this template |
sendPinPerPhoneNumberLimit | Send rate ceiling per destination |
Channels
Each entry inchannels[] is one channel’s rendering of the template. isDefault marks the one
used when a send omits channels. pinPlaceholder is the token in contentText the generated
PIN replaces, and paramDefaults holds the fallbacks for the template’s other placeholders —
the ones a send can override with templateParams.
Channel entries carry the fields that channel needs and leave the rest empty:
entityId and
unicode are SMS/DLT concerns, subjectText is email only, and copyCodeButtonIndex is
WhatsApp only.Paging
Page-numbered: passpage and pageSize, then read total and totalPages to drive a pager.
Both are echoed back after clamping — pageSize caps at 100, and an out-of-range page
reads as page 1 — so trust the response, not what you sent.Authorizations
An API key from the OneXtel portal, Developers → API Keys, sent as Authorization: Bearer <key>.
Query Parameters
Free-text search over the template name.
Available options:
enabled, disabled Include archived templates.
1-based page number. Out-of-range or unparseable values read as page 1.
Rows per page. Defaults to 25; larger values clamp to 100.
Required range:
x <= 100Column to sort by. Defaults to createdAt. Enum-typed columns sort by declaration order, not alphabetically.
Sort direction. Defaults to desc.
Available options:
asc, desc Was this page helpful?

