Send an SMS
curl --request POST \
--url https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_number": "<string>",
"to_number": "<string>",
"body": "<string>",
"from_user_id": "<string>",
"product_code": "<string>"
}
'import requests
url = "https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number"
payload = {
"from_number": "<string>",
"to_number": "<string>",
"body": "<string>",
"from_user_id": "<string>",
"product_code": "<string>"
}
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({
from_number: '<string>',
to_number: '<string>',
body: JSON.stringify('<string>'),
from_user_id: '<string>',
product_code: '<string>'
})
};
fetch('https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number', 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-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number",
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([
'from_number' => '<string>',
'to_number' => '<string>',
'body' => '<string>',
'from_user_id' => '<string>',
'product_code' => '<string>'
]),
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-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number"
payload := strings.NewReader("{\n \"from_number\": \"<string>\",\n \"to_number\": \"<string>\",\n \"body\": \"<string>\",\n \"from_user_id\": \"<string>\",\n \"product_code\": \"<string>\"\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-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_number\": \"<string>\",\n \"to_number\": \"<string>\",\n \"body\": \"<string>\",\n \"from_user_id\": \"<string>\",\n \"product_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number")
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 \"from_number\": \"<string>\",\n \"to_number\": \"<string>\",\n \"body\": \"<string>\",\n \"from_user_id\": \"<string>\",\n \"product_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 123,
"data": "<unknown>",
"query_generated_time": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Send SMS to Number
Send a text message (SMS) from one of your platform’s own phone numbers to any phone number you choose.
POST
/
v1
/
platform
/
phone-numbers
/
sms
/
send-to-number
Send an SMS
curl --request POST \
--url https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from_number": "<string>",
"to_number": "<string>",
"body": "<string>",
"from_user_id": "<string>",
"product_code": "<string>"
}
'import requests
url = "https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number"
payload = {
"from_number": "<string>",
"to_number": "<string>",
"body": "<string>",
"from_user_id": "<string>",
"product_code": "<string>"
}
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({
from_number: '<string>',
to_number: '<string>',
body: JSON.stringify('<string>'),
from_user_id: '<string>',
product_code: '<string>'
})
};
fetch('https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number', 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-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number",
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([
'from_number' => '<string>',
'to_number' => '<string>',
'body' => '<string>',
'from_user_id' => '<string>',
'product_code' => '<string>'
]),
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-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number"
payload := strings.NewReader("{\n \"from_number\": \"<string>\",\n \"to_number\": \"<string>\",\n \"body\": \"<string>\",\n \"from_user_id\": \"<string>\",\n \"product_code\": \"<string>\"\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-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"from_number\": \"<string>\",\n \"to_number\": \"<string>\",\n \"body\": \"<string>\",\n \"from_user_id\": \"<string>\",\n \"product_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.finogates.com/v1/platform/phone-numbers/sms/send-to-number")
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 \"from_number\": \"<string>\",\n \"to_number\": \"<string>\",\n \"body\": \"<string>\",\n \"from_user_id\": \"<string>\",\n \"product_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status_code": 123,
"data": "<unknown>",
"query_generated_time": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
Send an SMS from one of the caller's assigned Twilio numbers to any E.164 destination.
Twilio number to send from (must be assigned and active for from_user_id)
Required string length:
6 - 40Required string length:
6 - 40Required string length:
1 - 1600UUID of the user whose number is used as sender. Defaults to the authenticated user.
Response
Successful Response
Standard response wrapper for single-object responses and errors.
Generic over the payload type. A route that declares
CommonResponse[SomeModel] gets the real data schema rendered in
OpenAPI/Swagger; a bare CommonResponse leaves data untyped.
⌘I

