sms.number.search
curl --request POST \
--url https://platform.trylath.com/sms/number/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "US",
"areaCode": "<string>",
"contains": "<string>",
"limit": 10
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({country: 'US', areaCode: '<string>', contains: '<string>', limit: 10})
};
fetch('https://platform.trylath.com/sms/number/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://platform.trylath.com/sms/number/search"
payload = {
"country": "US",
"areaCode": "<string>",
"contains": "<string>",
"limit": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.trylath.com/sms/number/search"
payload := strings.NewReader("{\n \"country\": \"US\",\n \"areaCode\": \"<string>\",\n \"contains\": \"<string>\",\n \"limit\": 10\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))
}{
"activityId": "<string>",
"result": {
"numbers": [
{
"phoneNumber": "<string>",
"locality": "<string>",
"region": "<string>",
"capabilities": {
"sms": true,
"mms": true,
"voice": true
}
}
],
"monthlyCents": 123,
"freePerEnvironment": 0
}
}sms.number.search
Searches the carrier for local phone numbers that can carry SMS and are free to buy right now, by country and optionally area code or digits the number contains. Returns each number’s place and what it can carry (SMS, MMS, voice), with the monthly price from the rate book and how many numbers per live environment are free. Nothing is reserved: a number found here can be taken by someone else before it is bought.
POST
/
sms
/
number
/
search
sms.number.search
curl --request POST \
--url https://platform.trylath.com/sms/number/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"country": "US",
"areaCode": "<string>",
"contains": "<string>",
"limit": 10
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({country: 'US', areaCode: '<string>', contains: '<string>', limit: 10})
};
fetch('https://platform.trylath.com/sms/number/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://platform.trylath.com/sms/number/search"
payload = {
"country": "US",
"areaCode": "<string>",
"contains": "<string>",
"limit": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.trylath.com/sms/number/search"
payload := strings.NewReader("{\n \"country\": \"US\",\n \"areaCode\": \"<string>\",\n \"contains\": \"<string>\",\n \"limit\": 10\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))
}{
"activityId": "<string>",
"result": {
"numbers": [
{
"phoneNumber": "<string>",
"locality": "<string>",
"region": "<string>",
"capabilities": {
"sms": true,
"mms": true,
"voice": true
}
}
],
"monthlyCents": 123,
"freePerEnvironment": 0
}
}Authorizations
A Lath API key: lath_live_sk… or lath_test_sk… on a server, lath_live_pk… or lath_test_pk… in a browser.
Body
application/json
Country to search. Local numbers in the US and Canada are covered by the carrier registration this product files.
Available options:
US, CA Pattern:
^[2-9]\d{2}$Digits (or letters, spelled on a keypad) the number must contain, e.g. 555 or LATH.
Pattern:
^[0-9A-Za-z*]{2,10}$Required range:
1 <= x <= 20Last modified on September 16, 2026
Was this page helpful?

