Skip to main content
A rental holds a number for a fixed duration instead of a single verification. Rentals are reachable with a normal API key — the same 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.
Returns an array of { 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
Optional ?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
Voice events appear in the same list with 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
No request body.
Cancellation is allowed while both of these hold:
  • within 20 minutes of the rental starting, and
  • no SMS has arrived yet on the number.
The refund covers the rental price plus any extension you bought inside the same window.
A network service rental additionally cannot be cancelled in its first 2 minutes — the call returns 400 until the rental is two minutes old. So the practical cancel window for those is roughly minute 2 to minute 20.

Swap — a new number, same rental

authenticated
No request body. Replaces the number without ending the rental; expires_at is unchanged.
Eligibility is narrow — all of these must hold:
  • rental_type is service and provider is network
  • no SMS has arrived yet
  • the rental is between 2:00 and 19:30 old

Extend

authenticated
Body: {"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. A network rental returns 400 and 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 full rental, 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
Reporting queues a human review — it does not issue an automatic refund or replacement. Reporting the same rental twice returns 409 with the existing issue_id.