Create a Verify App (Alias for /verify/services)
curl --request POST \
--url https://ugatext.com/api/v1/verify/apps \
--header 'Client-ID: <api-key>' \
--header 'Client-Secret: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Login OTP Service",
"purpose": "phone_verification",
"template": "Your UgaText verification code is {{code}}. Valid for 5 minutes.",
"sender_id": "UGATEXT",
"code_length": 6,
"expiry_seconds": 300,
"resend_cooldown_seconds": 60,
"max_attempts": 5
}
'import requests
url = "https://ugatext.com/api/v1/verify/apps"
payload = {
"name": "Login OTP Service",
"purpose": "phone_verification",
"template": "Your UgaText verification code is {{code}}. Valid for 5 minutes.",
"sender_id": "UGATEXT",
"code_length": 6,
"expiry_seconds": 300,
"resend_cooldown_seconds": 60,
"max_attempts": 5
}
headers = {
"Client-ID": "<api-key>",
"Client-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Client-ID': '<api-key>',
'Client-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Login OTP Service',
purpose: 'phone_verification',
template: 'Your UgaText verification code is {{code}}. Valid for 5 minutes.',
sender_id: 'UGATEXT',
code_length: 6,
expiry_seconds: 300,
resend_cooldown_seconds: 60,
max_attempts: 5
})
};
fetch('https://ugatext.com/api/v1/verify/apps', 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://ugatext.com/api/v1/verify/apps",
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([
'name' => 'Login OTP Service',
'purpose' => 'phone_verification',
'template' => 'Your UgaText verification code is {{code}}. Valid for 5 minutes.',
'sender_id' => 'UGATEXT',
'code_length' => 6,
'expiry_seconds' => 300,
'resend_cooldown_seconds' => 60,
'max_attempts' => 5
]),
CURLOPT_HTTPHEADER => [
"Client-ID: <api-key>",
"Client-Secret: <api-key>",
"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://ugatext.com/api/v1/verify/apps"
payload := strings.NewReader("{\n \"name\": \"Login OTP Service\",\n \"purpose\": \"phone_verification\",\n \"template\": \"Your UgaText verification code is {{code}}. Valid for 5 minutes.\",\n \"sender_id\": \"UGATEXT\",\n \"code_length\": 6,\n \"expiry_seconds\": 300,\n \"resend_cooldown_seconds\": 60,\n \"max_attempts\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Client-ID", "<api-key>")
req.Header.Add("Client-Secret", "<api-key>")
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://ugatext.com/api/v1/verify/apps")
.header("Client-ID", "<api-key>")
.header("Client-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Login OTP Service\",\n \"purpose\": \"phone_verification\",\n \"template\": \"Your UgaText verification code is {{code}}. Valid for 5 minutes.\",\n \"sender_id\": \"UGATEXT\",\n \"code_length\": 6,\n \"expiry_seconds\": 300,\n \"resend_cooldown_seconds\": 60,\n \"max_attempts\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ugatext.com/api/v1/verify/apps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Client-ID"] = '<api-key>'
request["Client-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Login OTP Service\",\n \"purpose\": \"phone_verification\",\n \"template\": \"Your UgaText verification code is {{code}}. Valid for 5 minutes.\",\n \"sender_id\": \"UGATEXT\",\n \"code_length\": 6,\n \"expiry_seconds\": 300,\n \"resend_cooldown_seconds\": 60,\n \"max_attempts\": 5\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Authentication failed. Provide a valid 'Client-ID' and 'Client-Secret' in the request headers."
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Authentication failed. Provide a valid 'Client-ID' and 'Client-Secret' in the request headers."
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Authentication failed. Provide a valid 'Client-ID' and 'Client-Secret' in the request headers."
}
}Verify
Create a Verify App (Alias for /verify/services)
POST
/
verify
/
apps
Create a Verify App (Alias for /verify/services)
curl --request POST \
--url https://ugatext.com/api/v1/verify/apps \
--header 'Client-ID: <api-key>' \
--header 'Client-Secret: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Login OTP Service",
"purpose": "phone_verification",
"template": "Your UgaText verification code is {{code}}. Valid for 5 minutes.",
"sender_id": "UGATEXT",
"code_length": 6,
"expiry_seconds": 300,
"resend_cooldown_seconds": 60,
"max_attempts": 5
}
'import requests
url = "https://ugatext.com/api/v1/verify/apps"
payload = {
"name": "Login OTP Service",
"purpose": "phone_verification",
"template": "Your UgaText verification code is {{code}}. Valid for 5 minutes.",
"sender_id": "UGATEXT",
"code_length": 6,
"expiry_seconds": 300,
"resend_cooldown_seconds": 60,
"max_attempts": 5
}
headers = {
"Client-ID": "<api-key>",
"Client-Secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Client-ID': '<api-key>',
'Client-Secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Login OTP Service',
purpose: 'phone_verification',
template: 'Your UgaText verification code is {{code}}. Valid for 5 minutes.',
sender_id: 'UGATEXT',
code_length: 6,
expiry_seconds: 300,
resend_cooldown_seconds: 60,
max_attempts: 5
})
};
fetch('https://ugatext.com/api/v1/verify/apps', 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://ugatext.com/api/v1/verify/apps",
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([
'name' => 'Login OTP Service',
'purpose' => 'phone_verification',
'template' => 'Your UgaText verification code is {{code}}. Valid for 5 minutes.',
'sender_id' => 'UGATEXT',
'code_length' => 6,
'expiry_seconds' => 300,
'resend_cooldown_seconds' => 60,
'max_attempts' => 5
]),
CURLOPT_HTTPHEADER => [
"Client-ID: <api-key>",
"Client-Secret: <api-key>",
"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://ugatext.com/api/v1/verify/apps"
payload := strings.NewReader("{\n \"name\": \"Login OTP Service\",\n \"purpose\": \"phone_verification\",\n \"template\": \"Your UgaText verification code is {{code}}. Valid for 5 minutes.\",\n \"sender_id\": \"UGATEXT\",\n \"code_length\": 6,\n \"expiry_seconds\": 300,\n \"resend_cooldown_seconds\": 60,\n \"max_attempts\": 5\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Client-ID", "<api-key>")
req.Header.Add("Client-Secret", "<api-key>")
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://ugatext.com/api/v1/verify/apps")
.header("Client-ID", "<api-key>")
.header("Client-Secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Login OTP Service\",\n \"purpose\": \"phone_verification\",\n \"template\": \"Your UgaText verification code is {{code}}. Valid for 5 minutes.\",\n \"sender_id\": \"UGATEXT\",\n \"code_length\": 6,\n \"expiry_seconds\": 300,\n \"resend_cooldown_seconds\": 60,\n \"max_attempts\": 5\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ugatext.com/api/v1/verify/apps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Client-ID"] = '<api-key>'
request["Client-Secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Login OTP Service\",\n \"purpose\": \"phone_verification\",\n \"template\": \"Your UgaText verification code is {{code}}. Valid for 5 minutes.\",\n \"sender_id\": \"UGATEXT\",\n \"code_length\": 6,\n \"expiry_seconds\": 300,\n \"resend_cooldown_seconds\": 60,\n \"max_attempts\": 5\n}"
response = http.request(request)
puts response.read_body{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Authentication failed. Provide a valid 'Client-ID' and 'Client-Secret' in the request headers."
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Authentication failed. Provide a valid 'Client-ID' and 'Client-Secret' in the request headers."
}
}{
"success": false,
"error": {
"code": "INVALID_REQUEST",
"message": "Authentication failed. Provide a valid 'Client-ID' and 'Client-Secret' in the request headers."
}
}Authorizations
Your UgaText Client-ID (e.g. uga_...). Accepted header aliases: X-Client-ID, or combined in Authorization: Bearer : / X-API-Key: :.
Your UgaText Client-Secret (e.g. sk_live_...). Accepted header alias: X-Client-Secret.
Body
application/json
Example:
"Login OTP Service"
Example:
"phone_verification"
Example:
"Your UgaText verification code is {{code}}. Valid for 5 minutes."
Example:
"UGATEXT"
Available options:
4, 5, 6, 8 Response
Verify app created

