Rentals
https://numestri.com/api/v1 /rental/retrieve_all Every country a long-term number can be rented in, by ISO code. Price a country with /rental/retrieve_pricing.
No API key needed. Without one you get public list prices, rate-limited per IP address. Send your key to get the prices for your account (which can differ from the public list) and the per-account limit; an invalid key is still refused with 403.
Also accepts POST, with the same parameters in a form (application/x-www-form-urlencoded) or JSON body.
cURL
curl -X GET "https://numestri.com/api/v1/rental/retrieve_all"TypeScript
const res = await fetch('https://numestri.com/api/v1/rental/retrieve_all', {
method: 'GET',
});
const data = await res.json();Python
import requests
res = requests.request(
"GET",
"https://numestri.com/api/v1/rental/retrieve_all",
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://numestri.com/api/v1/rental/retrieve_all", nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://numestri.com/api/v1/rental/retrieve_all');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://numestri.com/api/v1/rental/retrieve_all')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://numestri.com/api/v1/rental/retrieve_all"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
Example
{
"success": {},
"data": [
{
"id": "string",
"name": "string"
}
]
}Schema
successdataNamedId[]Show child parameters
idstringrequirednamestringrequiredparam names it.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringRetry-After seconds.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringhttps://numestri.com/api/v1 /rental/retrieve_platforms Platforms with numbers reserved for them in a country, sorted by name, each with its lowest rental price. Pass an id as service to /rental/retrieve_pricing and /purchase/rental.
No API key needed. Without one you get public list prices, rate-limited per IP address. Send your key to get the prices for your account (which can differ from the public list) and the per-account limit; an invalid key is still refused with 403.
Also accepts POST, with the same parameters in a form (application/x-www-form-urlencoded) or JSON body.
Parameters
idstringqueryrequired/rental/retrieve_all.cURL
curl -X GET "https://numestri.com/api/v1/rental/retrieve_platforms?id="TypeScript
const res = await fetch('https://numestri.com/api/v1/rental/retrieve_platforms?id=', {
method: 'GET',
});
const data = await res.json();Python
import requests
res = requests.request(
"GET",
"https://numestri.com/api/v1/rental/retrieve_platforms?id=",
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://numestri.com/api/v1/rental/retrieve_platforms?id=", nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://numestri.com/api/v1/rental/retrieve_platforms?id=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://numestri.com/api/v1/rental/retrieve_platforms?id=')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://numestri.com/api/v1/rental/retrieve_platforms?id="))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
Example
{
"success": 1,
"country": "US",
"data": [
{
"id": "whatsapp",
"name": "WhatsApp",
"from_price": "3.90",
"from_price_cents": 390
}
]
}Schema
successrequiredcountrystringrequireddataobject[]requiredShow child parameters
idstringnamestringfrom_pricestringfrom_price_centsintegerparam names it.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringtype: BALANCE_ERROR, code: INSUFFICIENT_BALANCE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringOUT_OF_STOCK), a stale option (OPTION_GONE) or a provider with no offer (PROVIDER_UNAVAILABLE), all type: OUT_OF_STOCK; or not available for this number (UNSUPPORTED).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredRetry-After seconds.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringtype: SERVICE_UNAVAILABLE, code: UNAVAILABLE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredhttps://numestri.com/api/v1 /rental/retrieve_pricing Durations available for a country and what each costs. Without service, a general number that receives from anyone; with it, a number reserved for that platform. plans lists every provider's offer per term as anonymous options, cheapest first: pass one as option to /purchase/rental.
No API key needed. Without one you get public list prices, rate-limited per IP address. Send your key to get the prices for your account (which can differ from the public list) and the per-account limit; an invalid key is still refused with 403.
Also accepts POST, with the same parameters in a form (application/x-www-form-urlencoded) or JSON body.
Parameters
idstringqueryrequired/rental/retrieve_all.servicestringquery/rental/retrieve_platforms, for a reserved number. Unknown ids are rejected with 400.cURL
curl -X GET "https://numestri.com/api/v1/rental/retrieve_pricing?id=&service="TypeScript
const res = await fetch('https://numestri.com/api/v1/rental/retrieve_pricing?id=&service=', {
method: 'GET',
});
const data = await res.json();Python
import requests
res = requests.request(
"GET",
"https://numestri.com/api/v1/rental/retrieve_pricing?id=&service=",
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://numestri.com/api/v1/rental/retrieve_pricing?id=&service=", nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://numestri.com/api/v1/rental/retrieve_pricing?id=&service=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://numestri.com/api/v1/rental/retrieve_pricing?id=&service=')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://numestri.com/api/v1/rental/retrieve_pricing?id=&service="))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
Example
{
"success": 1,
"country": "GB",
"service": null,
"pricing": {
"7": "41.88",
"30": "82.38"
},
"extend": {
"7": "41.88",
"30": "82.38"
},
"plans": [
{
"days": 7,
"cost": "41.88",
"cost_in_cents": 4188,
"quality": "good",
"success_rate": 90,
"in_stock": true,
"renewable": true,
"options": [
{
"option": "Qm3tV8xLs0PaW1cE",
"provider": "prv_k3Jd9QmXa2",
"rank": 1,
"cost": "41.88",
"cost_in_cents": 4188,
"quality": "good",
"success_rate": 90,
"in_stock": true,
"renewable": true
},
{
"option": "Hd9eW2kRn5YcT7bM",
"provider": "prv_Vb7nR2sYq0",
"rank": 2,
"cost": "47.10",
"cost_in_cents": 4710,
"quality": null,
"success_rate": null,
"in_stock": true,
"renewable": false
}
]
}
]
}Schema
successrequiredcountrystringrequiredserviceNamedIdrequiredservice was given; otherwise null.Show child parameters
idstringrequirednamestringrequiredpricingobjectrequiredextendobjectrequiredpricing: extending costs the same as the term.plansRentalPlan[]requiredShow child parameters
daysintegerrequiredcoststringrequiredcost_in_centsintegerrequiredqualitystringrequirednull until there are enough orders to rate.success_rateintegerrequirednull with fewer than 5 orders.in_stockbooleanrequiredrenewablebooleanrequiredoptionsRentalOption[]requiredShow child parameters
optionstringrequiredoption to /purchase/rental to rent exactly this offer at this price.providerstringrequiredrankintegerrequiredcoststringrequiredcost_in_centsintegerrequiredqualitystringrequirednull until there are enough orders to rate.success_rateintegerrequirednull with fewer than 5 orders.in_stockbooleanrequiredrenewablebooleanrequiredid, or unknown service.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringtype: BALANCE_ERROR, code: INSUFFICIENT_BALANCE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringparam: id).Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringOUT_OF_STOCK), a stale option (OPTION_GONE) or a provider with no offer (PROVIDER_UNAVAILABLE), all type: OUT_OF_STOCK; or not available for this number (UNSUPPORTED).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredRetry-After seconds.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringtype: SERVICE_UNAVAILABLE, code: UNAVAILABLE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredhttps://numestri.com/api/v1 /purchase/rental Rent a number for a fixed term; it receives unlimited messages for the whole period.
No
optionorprovider: whichever offer is cheapest for the term, failing over if it cannot deliver.provider: only that provider, its cheapest offer for the term; fails if it has none.option(from/rental/retrieve_pricing): exactly that offer at its listed price, or a failure — never a substitute.
Safe to retry: send an Idempotency-Key header (or idempotency_key parameter) and a repeat returns the original rental instead of renting another.
Also accepts GET, with the same parameters in the query string.
Parameters
Idempotency-KeystringheaderIdempotent-Replayed: true header — instead of buying again, and charges nothing. A retry while the first request is still running is a 409 (param: idempotency_key); a retry after a failed purchase tries again. A key already used on a different endpoint (say, a purchase key sent to /sms/resend) is a 422. Keys are per account and do not expire. Send it as this header, or as the idempotency_key parameter (GET query string or POST body) if your client cannot set headers.Request body application/x-www-form-urlencoded
idstringrequired/rental/retrieve_all; anything else is a 400.daysintegerrequireddays from /rental/retrieve_pricing; any other is INVALID_DAYS (400).servicestringoptionstring/rental/retrieve_pricing for this term.providerstringmax_pricestringPRICE_ABOVE_MAX) above this price, in dollars. Anything but a positive amount is a 400 (param: max_price).idempotency_keystringIdempotency-Key header, for clients that cannot set headers (e.g. GET). The header wins when both are sent.keystring{
"id": "GB",
"days": 7,
"service": "string",
"option": "string",
"provider": "prv_k3Jd9QmXa2",
"max_price": "45.00",
"idempotency_key": "3f1c2a9e-8d4b-4c61-9a57-0b6f2e1d7c34",
"key": "string"
}cURL
curl -X POST "https://numestri.com/api/v1/purchase/rental" \
-H "Idempotency-Key: <value>" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d '{"id":"GB","days":7,"service":"string","option":"string","provider":"prv_k3Jd9QmXa2","max_price":"45.00","idempotency_key":"3f1c2a9e-8d4b-4c61-9a57-0b6f2e1d7c34","key":"string"}'TypeScript
const res = await fetch('https://numestri.com/api/v1/purchase/rental', {
method: 'POST',
headers: {
'Idempotency-Key': '<value>',
'Content-Type': 'application/x-www-form-urlencoded',
},
body: JSON.stringify({"id":"GB","days":7,"service":"string","option":"string","provider":"prv_k3Jd9QmXa2","max_price":"45.00","idempotency_key":"3f1c2a9e-8d4b-4c61-9a57-0b6f2e1d7c34","key":"string"}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://numestri.com/api/v1/purchase/rental",
headers={
"Idempotency-Key": "<value>",
"Content-Type": "application/x-www-form-urlencoded",
},
json={"id": "GB", "days": 7, "service": "string", "option": "string", "provider": "prv_k3Jd9QmXa2", "max_price": "45.00", "idempotency_key": "3f1c2a9e-8d4b-4c61-9a57-0b6f2e1d7c34", "key": "string"},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://numestri.com/api/v1/purchase/rental", strings.NewReader(`{"id":"GB","days":7,"service":"string","option":"string","provider":"prv_k3Jd9QmXa2","max_price":"45.00","idempotency_key":"3f1c2a9e-8d4b-4c61-9a57-0b6f2e1d7c34","key":"string"}`))
req.Header.Set("Idempotency-Key", "<value>")
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://numestri.com/api/v1/purchase/rental');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Idempotency-Key: <value>', 'Content-Type: application/x-www-form-urlencoded']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"id":"GB","days":7,"service":"string","option":"string","provider":"prv_k3Jd9QmXa2","max_price":"45.00","idempotency_key":"3f1c2a9e-8d4b-4c61-9a57-0b6f2e1d7c34","key":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://numestri.com/api/v1/purchase/rental')
req = Net::HTTP::Post.new(uri)
req['Idempotency-Key'] = '<value>'
req['Content-Type'] = 'application/x-www-form-urlencoded'
req.body = '{"id":"GB","days":7,"service":"string","option":"string","provider":"prv_k3Jd9QmXa2","max_price":"45.00","idempotency_key":"3f1c2a9e-8d4b-4c61-9a57-0b6f2e1d7c34","key":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://numestri.com/api/v1/purchase/rental"))
.header("Idempotency-Key", "<value>")
.header("Content-Type", "application/x-www-form-urlencoded")
.method("POST", BodyPublishers.ofString("{\"id\":\"GB\",\"days\":7,\"service\":\"string\",\"option\":\"string\",\"provider\":\"prv_k3Jd9QmXa2\",\"max_price\":\"45.00\",\"idempotency_key\":\"3f1c2a9e-8d4b-4c61-9a57-0b6f2e1d7c34\",\"key\":\"string\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
Example
{
"success": {},
"message": "string",
"expiry": 0,
"rental_code": "SNBW9MPY",
"phonenumber": "44839572864",
"country": "United Kingdom",
"country_code": "GB",
"service": null,
"service_id": null,
"days": 7,
"auto_extend": 0,
"cancelled": 0,
"expiration_date": 1792548000,
"expires_in": 601200,
"cost": "41.88",
"cost_in_cents": 4188,
"renewable": true,
"can_extend": true,
"can_reset": true
}Schema
successmessagestringexpiryintegerexpiration_date.rental_codestringrequiredphonenumberstringrequiredcountrystringrequiredcountry_codestringrequiredservicestringrequirednull for a general number.service_idstringrequirednull for a general number.daysintegerrequiredauto_extendintegerrequiredcancelledintegerrequiredexpiration_dateintegerrequiredexpires_inintegerrequiredcoststringrequiredcost_in_centsintegerrequiredrenewablebooleanrequiredcan_extendbooleanrequired/rental/extend works on this number.can_resetbooleanrequired/rental/reset works on this number.Error, param names it), or the term is not offered (INVALID_DAYS) or the price is above max_price (PRICE_ABOVE_MAX), both RentalFailure with type: PRICE_NOT_FOUND.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Error
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstring{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}RentalFailure
successrequiredmessagestringrequiredtypestringrequiredcodestringrequired{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}type: BALANCE_ERROR, code: INSUFFICIENT_BALANCE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringOUT_OF_STOCK), a stale option (OPTION_GONE) or a provider with no offer (PROVIDER_UNAVAILABLE), all type: OUT_OF_STOCK; or not available for this number (UNSUPPORTED).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredRetry-After seconds.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringtype: SERVICE_UNAVAILABLE, code: UNAVAILABLE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredhttps://numestri.com/api/v1 /rental/retrieve Every rental of yours still inside its term (not cancelled, not yet expired), newest first.
Also accepts POST, with the same parameters in a form (application/x-www-form-urlencoded) or JSON body.
cURL
curl -X GET "https://numestri.com/api/v1/rental/retrieve"TypeScript
const res = await fetch('https://numestri.com/api/v1/rental/retrieve', {
method: 'GET',
});
const data = await res.json();Python
import requests
res = requests.request(
"GET",
"https://numestri.com/api/v1/rental/retrieve",
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://numestri.com/api/v1/rental/retrieve", nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://numestri.com/api/v1/rental/retrieve');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://numestri.com/api/v1/rental/retrieve')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://numestri.com/api/v1/rental/retrieve"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
Example
[
{
"rental_code": "SNBW9MPY",
"phonenumber": "44839572864",
"country": "United Kingdom",
"country_code": "GB",
"service": null,
"service_id": null,
"days": 7,
"auto_extend": 0,
"cancelled": 0,
"expiration_date": 1792548000,
"expires_in": 601200,
"cost": "41.88",
"cost_in_cents": 4188,
"renewable": true,
"can_extend": true,
"can_reset": true
}
]Schema
rental_codestringrequiredphonenumberstringrequiredcountrystringrequiredcountry_codestringrequiredservicestringrequirednull for a general number.service_idstringrequirednull for a general number.daysintegerrequiredauto_extendintegerrequiredcancelledintegerrequiredexpiration_dateintegerrequiredexpires_inintegerrequiredcoststringrequiredcost_in_centsintegerrequiredrenewablebooleanrequiredcan_extendbooleanrequired/rental/extend works on this number.can_resetbooleanrequired/rental/reset works on this number.param names it.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringRetry-After seconds.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringhttps://numestri.com/api/v1 /rental/retrieve_messages Every message received on a rented number. Pulls from supply first, so polling this sees a message as soon as it lands; if that pull fails, the messages already held are returned with synced: false rather than an error. code is recovered from the full text.
Also accepts POST, with the same parameters in a form (application/x-www-form-urlencoded) or JSON body.
Parameters
rental_codestringqueryrequiredcURL
curl -X GET "https://numestri.com/api/v1/rental/retrieve_messages?rental_code="TypeScript
const res = await fetch('https://numestri.com/api/v1/rental/retrieve_messages?rental_code=', {
method: 'GET',
});
const data = await res.json();Python
import requests
res = requests.request(
"GET",
"https://numestri.com/api/v1/rental/retrieve_messages?rental_code=",
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://numestri.com/api/v1/rental/retrieve_messages?rental_code=", nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://numestri.com/api/v1/rental/retrieve_messages?rental_code=');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://numestri.com/api/v1/rental/retrieve_messages?rental_code=')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://numestri.com/api/v1/rental/retrieve_messages?rental_code="))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
Example
{
"success": 1,
"rental_code": "SNBW9MPY",
"synced": true,
"messages": [
{
"ID": "msg_1",
"sender": "Telegram",
"message": "Login code: 88213",
"code": "88213",
"timestamp": "2026-10-14T01:42:11.000Z"
}
]
}Schema
successrequiredrental_codestringrequiredsyncedbooleanrequiredfalse when supply could not be reached just now: messages is what we already held.messagesRentalMessage[]requiredShow child parameters
IDstringrequiredsenderstringrequiredmessagestringrequiredcodestringrequiredtimestampstringrequiredparam names it.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringtype: BALANCE_ERROR, code: INSUFFICIENT_BALANCE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringparam: rental_code).Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringOUT_OF_STOCK), a stale option (OPTION_GONE) or a provider with no offer (PROVIDER_UNAVAILABLE), all type: OUT_OF_STOCK; or not available for this number (UNSUPPORTED).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredRetry-After seconds.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringtype: SERVICE_UNAVAILABLE, code: UNAVAILABLE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredhttps://numestri.com/api/v1 /rental/extend Buy another term on the same number, at today's price from the same provider. Check can_extend and renewable first; days must equal the rental's own term length.
Also accepts GET, with the same parameters in the query string.
Request body application/x-www-form-urlencoded
rental_codestringrequireddaysintegerrequiredkeystring{
"rental_code": "SNBW9MPY",
"days": 7,
"key": "string"
}cURL
curl -X POST "https://numestri.com/api/v1/rental/extend" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d '{"rental_code":"SNBW9MPY","days":7,"key":"string"}'TypeScript
const res = await fetch('https://numestri.com/api/v1/rental/extend', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: JSON.stringify({"rental_code":"SNBW9MPY","days":7,"key":"string"}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://numestri.com/api/v1/rental/extend",
headers={
"Content-Type": "application/x-www-form-urlencoded",
},
json={"rental_code": "SNBW9MPY", "days": 7, "key": "string"},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://numestri.com/api/v1/rental/extend", strings.NewReader(`{"rental_code":"SNBW9MPY","days":7,"key":"string"}`))
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://numestri.com/api/v1/rental/extend');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"rental_code":"SNBW9MPY","days":7,"key":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://numestri.com/api/v1/rental/extend')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/x-www-form-urlencoded'
req.body = '{"rental_code":"SNBW9MPY","days":7,"key":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://numestri.com/api/v1/rental/extend"))
.header("Content-Type", "application/x-www-form-urlencoded")
.method("POST", BodyPublishers.ofString("{\"rental_code\":\"SNBW9MPY\",\"days\":7,\"key\":\"string\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
Example
{
"success": {},
"message": "string",
"extension_cost": "41.88",
"extension_cost_in_cents": 4188,
"rental_code": "SNBW9MPY",
"phonenumber": "44839572864",
"country": "United Kingdom",
"country_code": "GB",
"service": null,
"service_id": null,
"days": 7,
"auto_extend": 0,
"cancelled": 0,
"expiration_date": 1792548000,
"expires_in": 601200,
"cost": "41.88",
"cost_in_cents": 4188,
"renewable": true,
"can_extend": true,
"can_reset": true
}Schema
successmessagestringextension_coststringextension_cost_in_centsintegerrental_codestringrequiredphonenumberstringrequiredcountrystringrequiredcountry_codestringrequiredservicestringrequirednull for a general number.service_idstringrequirednull for a general number.daysintegerrequiredauto_extendintegerrequiredcancelledintegerrequiredexpiration_dateintegerrequiredexpires_inintegerrequiredcoststringrequiredcost_in_centsintegerrequiredrenewablebooleanrequiredcan_extendbooleanrequired/rental/extend works on this number.can_resetbooleanrequired/rental/reset works on this number.Error), the number cannot be extended (UNSUPPORTED), or days is not its term (INVALID_DAYS, type: PRICE_NOT_FOUND).Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Error
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstring{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}RentalFailure
successrequiredmessagestringrequiredtypestringrequiredcodestringrequired{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}type: BALANCE_ERROR, code: INSUFFICIENT_BALANCE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringparam: rental_code).Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringOUT_OF_STOCK), a stale option (OPTION_GONE) or a provider with no offer (PROVIDER_UNAVAILABLE), all type: OUT_OF_STOCK; or not available for this number (UNSUPPORTED).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredRetry-After seconds.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringtype: SERVICE_UNAVAILABLE, code: UNAVAILABLE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredhttps://numestri.com/api/v1 /rental/reset Reload the inbound route, which revives a rented number that has quietly stopped receiving. Not every number supports it: check can_reset.
Also accepts GET, with the same parameters in the query string.
Request body application/x-www-form-urlencoded
rental_codestringrequiredkeystring{
"rental_code": "SNBW9MPY",
"key": "string"
}cURL
curl -X POST "https://numestri.com/api/v1/rental/reset" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d '{"rental_code":"SNBW9MPY","key":"string"}'TypeScript
const res = await fetch('https://numestri.com/api/v1/rental/reset', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: JSON.stringify({"rental_code":"SNBW9MPY","key":"string"}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://numestri.com/api/v1/rental/reset",
headers={
"Content-Type": "application/x-www-form-urlencoded",
},
json={"rental_code": "SNBW9MPY", "key": "string"},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://numestri.com/api/v1/rental/reset", strings.NewReader(`{"rental_code":"SNBW9MPY","key":"string"}`))
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://numestri.com/api/v1/rental/reset');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"rental_code":"SNBW9MPY","key":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://numestri.com/api/v1/rental/reset')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/x-www-form-urlencoded'
req.body = '{"rental_code":"SNBW9MPY","key":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://numestri.com/api/v1/rental/reset"))
.header("Content-Type", "application/x-www-form-urlencoded")
.method("POST", BodyPublishers.ofString("{\"rental_code\":\"SNBW9MPY\",\"key\":\"string\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
Example
{
"success": {},
"message": "string"
}Schema
successrequiredmessagestringrequiredrental_code, or this number does not support a reset.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Error
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstring{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}RentalFailure
successrequiredmessagestringrequiredtypestringrequiredcodestringrequired{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}type: BALANCE_ERROR, code: INSUFFICIENT_BALANCE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringparam: rental_code).Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringOUT_OF_STOCK), a stale option (OPTION_GONE) or a provider with no offer (PROVIDER_UNAVAILABLE), all type: OUT_OF_STOCK; or not available for this number (UNSUPPORTED).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredRetry-After seconds.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringtype: SERVICE_UNAVAILABLE, code: UNAVAILABLE).Example
{
"success": 0,
"message": "That duration is not available. Choose one of: 7, 30 days.",
"type": "PRICE_NOT_FOUND",
"code": "INVALID_DAYS"
}Schema
successrequiredmessagestringrequiredtypestringrequiredcodestringrequiredhttps://numestri.com/api/v1 /rental/refund Cancel a rental. A refund is only possible inside a short window and generally only before any message has arrived; the rental is released either way, and the response says what was actually credited (possibly 0.00).
Also accepts GET, with the same parameters in the query string.
Request body application/x-www-form-urlencoded
rental_codestringrequiredkeystring{
"rental_code": "SNBW9MPY",
"key": "string"
}cURL
curl -X POST "https://numestri.com/api/v1/rental/refund" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d '{"rental_code":"SNBW9MPY","key":"string"}'TypeScript
const res = await fetch('https://numestri.com/api/v1/rental/refund', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
body: JSON.stringify({"rental_code":"SNBW9MPY","key":"string"}),
});
const data = await res.json();Python
import requests
res = requests.request(
"POST",
"https://numestri.com/api/v1/rental/refund",
headers={
"Content-Type": "application/x-www-form-urlencoded",
},
json={"rental_code": "SNBW9MPY", "key": "string"},
)
data = res.json()Go
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
req, _ := http.NewRequest("POST", "https://numestri.com/api/v1/rental/refund", strings.NewReader(`{"rental_code":"SNBW9MPY","key":"string"}`))
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}PHP
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://numestri.com/api/v1/rental/refund');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"rental_code":"SNBW9MPY","key":"string"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;Ruby
require 'net/http'
require 'uri'
uri = URI('https://numestri.com/api/v1/rental/refund')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/x-www-form-urlencoded'
req.body = '{"rental_code":"SNBW9MPY","key":"string"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(req)
end
puts res.bodyJava
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://numestri.com/api/v1/rental/refund"))
.header("Content-Type", "application/x-www-form-urlencoded")
.method("POST", BodyPublishers.ofString("{\"rental_code\":\"SNBW9MPY\",\"key\":\"string\"}"))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());Responses
Example
{
"success": 1,
"message": "Rental cancelled and 41.88 refunded.",
"refunded": "41.88",
"refunded_in_cents": 4188
}Schema
successrequiredmessagestringrequiredrefundedstringrequiredrefunded_in_centsintegerrequiredparam names it.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringparam: rental_code).Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringRetry-After seconds.Example
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstringExample
{
"success": 0,
"errors": [
{
"message": "You are missing a required parameter for this request.",
"param": "country",
"description": "Country code from /api/v1/catalog/platforms/{platform}/countries, e.g. US"
}
]
}Schema
successrequirederrorsobject[]requiredShow child parameters
messagestringrequiredparamstringdescriptionstring