x-api-key you use for verifications, including
one minted through x402.
Base path: https://virtualsms.io/api/v1/rentals
Two rental types
Catalogue (public, no key needed)
GET /api/v1/rentals/available
Optional query params:country, service, type (service | full), provider,
duration_hours.
Callers without an API key get banded availability (
availability, total_availability).
Callers presenting a valid API key get exact counts in available_count and total_available
instead. Pass your key if you need to size an order programmatically.GET /api/v1/rentals/services
country_code (ISO alpha-2) or country_id is required; duration defaults to 24.
{ service_id, service_name, physical_count, our_price, popular, icon_url },
where physical_count is an availability indicator for that service.
GET /api/v1/rentals/price
service and duration (integer hours) are required, plus country_code (preferred) or the
legacy numeric country.
GET /api/v1/rentals/pricing
Takes no parameters. Returns the active price list as an array of{ rental_type, duration_hours, duration_label, base_price, country_code, service_id }.
Create a rental
authenticated
provider is either local or network — which pool the number came from. Nothing more
specific is ever returned.
Errors
List your rentals
authenticated
?status= — defaults to active, pass all for every status. Returns an array of
{ id, phone_number, rental_type, service_id, duration_hours, started_at, expires_at, price, auto_renew, status, sms_received, sms_forwarded, last_sms_at, provider }.
Read the SMS
authenticated
event_type: "voice" and additional status,
extracted_code, duration_sec and caller_id fields. Newest first, capped at 100 messages.
Cancel — full refund inside the window
authenticated
- within 20 minutes of the rental starting, and
- no SMS has arrived yet on the number.
Swap — a new number, same rental
authenticated
expires_at is unchanged.
rental_typeisserviceandproviderisnetwork- no SMS has arrived yet
- the rental is between 2:00 and 19:30 old
Extend
authenticated
{"duration_hours": 24} — required and non-zero.
network rentals accept only 24, 72 or 168 hours; anything else returns 400. A 402
carries required and current. If the extension fails upstream you get 502 and are not
charged.
Release early — partial refund, local rentals only
authenticated
- Only rentals with
provider: "local"can be released early. Anetworkrental returns400and runs to its natural expiry — past the 20-minute cancel window there is no early exit for it. - The rental must be at least 2 hours old.
- The refund is pro-rata: the unused portion of the price, minus a 10% fee. For a
fullrental, any services already used are deducted instead of elapsed time when that is larger. The result is never negative and never exceeds what you paid.
Report a problem
authenticated
409 with the existing issue_id.