Endpoint

POST https://sms.phones.inc/sms/rent

Overview

Rent a temporary US phone number to receive a single SMS verification code. The price depends on the service and is deducted from your balance immediately. If the rental fails (for example, no numbers available), the charge is refunded automatically. After renting, poll GET /sms/code for the code, or POST /sms/cancel to cancel and get refunded.

Supported Services & Pricing

Supported services: apple, google, instagram, tiktok. Prices adjust with availability and may change at any time — fetch current prices from GET /sms/services.
The cost field in the response is the exact amount charged, and a cancel or failed rental always refunds that exact amount.

Request Body

service
string
default:"tiktok"
The service the verification code is for: apple, google, instagram, or tiktok.

Response

Rental responses do not use the ok envelope — success is a plain JSON object; errors are {"error": "..."} with a non-200 status. See Response.
number
string
The rented phone number. Use it in the service’s signup/verification flow.
cost
number
Credits charged for this rental.
service
string
The service the rental is for.
transaction_id
string
Rental transaction ID — needed to poll for the code or cancel.

Errors

StatusErrorMeaning
400Unsupported service. Supported: 'apple', 'google', 'instagram', 'tiktok'Unsupported service value
402Insufficient balanceNot enough credits (no charge made)
409No numbers available right nowUpstream has no numbers; charge refunded
502Service temporarily unavailableUpstream failure; charge refunded
503Number rental is not configuredRental is disabled on this deployment
curl -X POST https://sms.phones.inc/sms/rent \
  -H "API-KEY: sk_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"service": "tiktok"}'
{
  "number": "+15559876543",
  "cost": 0.75,
  "service": "tiktok",
  "transaction_id": "txn_8f7e6d5c4b3a"
}