Envios
OTP
POST
/
v1
/
otp
Envio de OTP
curl --request POST \
--url https://pointer-sms-api.pontaltech.com.br/v1/otp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"to": "11999999999",
"message": "Seu código é 123456",
"reference": "ref123",
"account": 1234,
"accountReference": "conta5678",
"from": "EmpresaX",
"urlCallback": "https://example.com/callback"
}
}
'import requests
url = "https://pointer-sms-api.pontaltech.com.br/v1/otp"
payload = { "message": {
"to": "11999999999",
"message": "Seu código é 123456",
"reference": "ref123",
"account": 1234,
"accountReference": "conta5678",
"from": "EmpresaX",
"urlCallback": "https://example.com/callback"
} }
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({
message: {
to: '11999999999',
message: 'Seu código é 123456',
reference: 'ref123',
account: 1234,
accountReference: 'conta5678',
from: 'EmpresaX',
urlCallback: 'https://example.com/callback'
}
})
};
fetch('https://pointer-sms-api.pontaltech.com.br/v1/otp', 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://pointer-sms-api.pontaltech.com.br/v1/otp",
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([
'message' => [
'to' => '11999999999',
'message' => 'Seu código é 123456',
'reference' => 'ref123',
'account' => 1234,
'accountReference' => 'conta5678',
'from' => 'EmpresaX',
'urlCallback' => 'https://example.com/callback'
]
]),
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://pointer-sms-api.pontaltech.com.br/v1/otp"
payload := strings.NewReader("{\n \"message\": {\n \"to\": \"11999999999\",\n \"message\": \"Seu código é 123456\",\n \"reference\": \"ref123\",\n \"account\": 1234,\n \"accountReference\": \"conta5678\",\n \"from\": \"EmpresaX\",\n \"urlCallback\": \"https://example.com/callback\"\n }\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://pointer-sms-api.pontaltech.com.br/v1/otp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\n \"to\": \"11999999999\",\n \"message\": \"Seu código é 123456\",\n \"reference\": \"ref123\",\n \"account\": 1234,\n \"accountReference\": \"conta5678\",\n \"from\": \"EmpresaX\",\n \"urlCallback\": \"https://example.com/callback\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pointer-sms-api.pontaltech.com.br/v1/otp")
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 \"message\": {\n \"to\": \"11999999999\",\n \"message\": \"Seu código é 123456\",\n \"reference\": \"ref123\",\n \"account\": 1234,\n \"accountReference\": \"conta5678\",\n \"from\": \"EmpresaX\",\n \"urlCallback\": \"https://example.com/callback\"\n }\n}"
response = http.request(request)
puts response.read_body[
{
"to": "11999999999",
"message": "Sua Mensagem Aqui",
"schedule": "2025-06-03T16:13:46.721Z",
"reference": "ref123",
"account": "1234",
"accountReference": "conta5678",
"from": "EmpresaX",
"urlCallback": "https://seusistema.com.br/callback-individual",
"status": 0,
"statusDescription": "Ok",
"id": "e7c41642-a3e9-4214-a8af-39ba004872c5",
"bill_factor": 1
}
]{
"message": "Body invalid."
}{
"message": "Invalid credentials."
}{
"message": "OTP is not allowed."
}{
"message": "Você excedeu o número de tentativas. Aguarde e tente novamente."
}Este endpoint é utilizado para o envio de mensagens OTP (senhas de uso único) via SMS, utilizando o método OTP para entrega imediata.
Endpoint
POST https://pointer-sms-api.pontaltech.com.br/v1/otp
Método OTP
O método OTP envia a mensagem imediatamente com o mínimo de processamento. Deve ser utilizado apenas quando a velocidade é absolutamente crítica (como em autenticação em dois fatores).Corpo da Requisição
A requisição deve conter um objetomessage com os dados do destinatário e conteúdo da mensagem:
{
"message": {
"to": "11999999999",
"message": "Sua mensagem aqui",
"reference": "ref123",
"account": 1234,
"accountReference": "conta5678",
"from": "EmpresaX",
"urlCallback": "https://seusistema.com.br/callback-individual"
}
}
Parâmetros do Body
| Campo | Tipo | Obrigatório | Descrição |
|---|---|---|---|
to | string | Sim | Número do destinatário com DDI (ex: 5511999999999) ou sem (ex: 11999999999) |
message | string | Sim | Conteúdo da mensagem |
reference | string | Não | Identificador único interno para referenciar o disparo, como por exemplo um id, id_mensagem |
account | integer | Não | ID da conta usada para envio |
accountReference | string | Não | Referência opcional da conta |
from | string | Não | LA ou SenderId pre-cadastrado |
urlCallback | string | Sim | URL de callback para esta mensagem |
Autorizações
bearerAuthbasicAuth
OAuth 2.0 access token obtido via Client Credentials flow
Corpo
application/json
Show child attributes
Show child attributes
Resposta
UUID
Exemplo:
[
{
"to": "11999999999",
"message": "Sua Mensagem Aqui",
"schedule": "2025-06-03T16:13:46.721Z",
"reference": "ref123",
"account": "1234",
"accountReference": "conta5678",
"from": "EmpresaX",
"urlCallback": "https://seusistema.com.br/callback-individual",
"status": 0,
"statusDescription": "Ok",
"id": "e7c41642-a3e9-4214-a8af-39ba004872c5",
"bill_factor": 1
}
]
⌘I
Envio de OTP
curl --request POST \
--url https://pointer-sms-api.pontaltech.com.br/v1/otp \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"message": {
"to": "11999999999",
"message": "Seu código é 123456",
"reference": "ref123",
"account": 1234,
"accountReference": "conta5678",
"from": "EmpresaX",
"urlCallback": "https://example.com/callback"
}
}
'import requests
url = "https://pointer-sms-api.pontaltech.com.br/v1/otp"
payload = { "message": {
"to": "11999999999",
"message": "Seu código é 123456",
"reference": "ref123",
"account": 1234,
"accountReference": "conta5678",
"from": "EmpresaX",
"urlCallback": "https://example.com/callback"
} }
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({
message: {
to: '11999999999',
message: 'Seu código é 123456',
reference: 'ref123',
account: 1234,
accountReference: 'conta5678',
from: 'EmpresaX',
urlCallback: 'https://example.com/callback'
}
})
};
fetch('https://pointer-sms-api.pontaltech.com.br/v1/otp', 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://pointer-sms-api.pontaltech.com.br/v1/otp",
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([
'message' => [
'to' => '11999999999',
'message' => 'Seu código é 123456',
'reference' => 'ref123',
'account' => 1234,
'accountReference' => 'conta5678',
'from' => 'EmpresaX',
'urlCallback' => 'https://example.com/callback'
]
]),
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://pointer-sms-api.pontaltech.com.br/v1/otp"
payload := strings.NewReader("{\n \"message\": {\n \"to\": \"11999999999\",\n \"message\": \"Seu código é 123456\",\n \"reference\": \"ref123\",\n \"account\": 1234,\n \"accountReference\": \"conta5678\",\n \"from\": \"EmpresaX\",\n \"urlCallback\": \"https://example.com/callback\"\n }\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://pointer-sms-api.pontaltech.com.br/v1/otp")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"message\": {\n \"to\": \"11999999999\",\n \"message\": \"Seu código é 123456\",\n \"reference\": \"ref123\",\n \"account\": 1234,\n \"accountReference\": \"conta5678\",\n \"from\": \"EmpresaX\",\n \"urlCallback\": \"https://example.com/callback\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pointer-sms-api.pontaltech.com.br/v1/otp")
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 \"message\": {\n \"to\": \"11999999999\",\n \"message\": \"Seu código é 123456\",\n \"reference\": \"ref123\",\n \"account\": 1234,\n \"accountReference\": \"conta5678\",\n \"from\": \"EmpresaX\",\n \"urlCallback\": \"https://example.com/callback\"\n }\n}"
response = http.request(request)
puts response.read_body[
{
"to": "11999999999",
"message": "Sua Mensagem Aqui",
"schedule": "2025-06-03T16:13:46.721Z",
"reference": "ref123",
"account": "1234",
"accountReference": "conta5678",
"from": "EmpresaX",
"urlCallback": "https://seusistema.com.br/callback-individual",
"status": 0,
"statusDescription": "Ok",
"id": "e7c41642-a3e9-4214-a8af-39ba004872c5",
"bill_factor": 1
}
]{
"message": "Body invalid."
}{
"message": "Invalid credentials."
}{
"message": "OTP is not allowed."
}{
"message": "Você excedeu o número de tentativas. Aguarde e tente novamente."
}