Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Catalog & Quotes

Discover service codes and request current quotes before creating an order.

Catalog requests are read-only. Quote requests check live inventory and pricing but do not issue invoices or reserve a number. Objects that contain country also include countryName, countryCallingCode and countryIsoCode, all null before allocation. Read the allocated values from the protected order snapshot; do not treat a quoted route as an allocated country. Existing country IDs and request bodies are unchanged.

Minimum order price

New API V2 Receive SMS, number rental, and email orders have a 1000-sat minimum. The same server-side floor applies to browser and L402 quotes/catalog prices and newly created invoices. Display the returned priceSats without adding another multiplier or floor. Higher-priced routes keep their existing pricing. Existing orders/invoices and independently priced legacy Send SMS/prepaid endpoints are unchanged.

Receive-SMS countries

GET /v2/receive-sms/countries

Use this public endpoint to populate a receive-SMS country picker. No authentication, order token, or query parameters are required. It reads bundled country metadata only: no database/provider requests, invoices, reservations, or payments.

curl -sS 'https://api.sms4sats.com/v2/receive-sms/countries'

Response shape (the real response includes the complete country list):

{
  "type": "receive-sms",
  "defaultCountry": "auto",
  "legacyCountryAliases": { "999": "auto" },
  "countries": [
    { "id": "auto", "name": "Auto-select" },
    { "id": "74", "name": "Afghanistan" }
  ]
}
  • Use countries[].name as the display label and pass countries[].id as the string country value to catalog, quote, and create-order requests.

  • Auto-select is first; the remaining countries are sorted by English name. IDs are stable SMS4Sats country identifiers, not telephone calling codes or ISO numeric codes.

  • defaultCountry: "auto" means the server selects a country when quoting an order. A quote or order response may therefore contain a concrete country ID instead of "auto".

  • Legacy migration: normalize saved country 999 (number or string) to "auto" before calling v2. legacyCountryAliases describes this client-side conversion; it does not change existing endpoints to accept 999 as an Auto alias. All other picker IDs remain unchanged.

  • This country list is reference metadata, not a stock promise. Request /v2/receive-sms/catalog?country={id} to populate verified purchasing services for the selected country, then quote before checkout.

Receive-SMS catalog

GET /v2/receive-sms/catalog?country={country}

country accepts auto, a supported numeric country ID, ISO alpha-2 code, or country name. It defaults to auto.

The purchase catalog is stock-filtered by default. For a selected country, services contains only canonical services with positive stock and a positive valid price recently verified through at least one enabled supplier. A name in the reference dictionary is not enough. Results merge suppliers, so secondary-supplier-only stock is retained. Stock is not reserved: request a quote and handle 409 UNAVAILABLE if it sells out before checkout.

Inventory observations expire after 60 seconds, without relabeling older quote-cache data as fresh. updatedAt and availability.checkedAt are the oldest relevant observation time; availability.validUntil is its expiry. Repeated cache hits retain those timestamps. The service performs bounded, coalesced country reads rather than one quote per service or an unfiltered global feed.

  • availability.status: "available": at least one verified option is returned.

  • availability.status: "empty", coverage: "complete": every enabled supplier was checked for that country and no usable stock was found; services is empty.

  • coverage: "partial": only verified options are returned, but a supplier check or the global country scan is incomplete. Missing names are not proof of worldwide unavailability.

  • No verified options and incomplete/failed checks: 503 METADATA_NOT_READY, with Retry-After: 15. Back off; do not substitute the full name dictionary or treat the failure as confirmed zero stock.

country=auto is a partial union of verified concrete-country snapshots. It warms a bounded set of countries and also includes fresh snapshots discovered through explicit-country requests. It never claims an exhaustive global stock scan. An explicit-country catalog is the appropriate way to discover options for that country.

Reference service names (not inventory)

GET /v2/receive-sms/metadata returns the full canonical {code,name} service dictionary with availabilityChecked: false, without supplier or database calls. Use it for labels, not purchasing options. /v2/receive-sms/countries remains reference country metadata; populate purchasable services from /catalog for the selected country. Existing IDs, aliases, prices, quote/order bodies, payment behavior and allocated-country fields are unchanged.

Quote a receive-SMS order

POST /v2/receive-sms/quote

Body field
Type
Required
Description

country

string

Yes

auto, numeric ID, ISO code, or country name

service

string

Yes

Catalog code or recognized service name

referral

string

No

Referral metadata, maximum 320 characters

clientRequestId

string

No

Client correlation value, maximum 200 characters

country may differ from the request when auto selects a country. Quotes may be up to five minutes old and do not guarantee availability. Always use the creation response's priceSats for payment UI.

Rental catalog

GET /v2/rent-numbers/catalog?service={service}&durationMinutes={minutes}

  • service defaults to full.

  • durationMinutes is normalized upward to a whole hour with a minimum of 120 and a maximum request value of 43,200.

An empty countries array means no matching rental is currently available.

Quote a rental

POST /v2/rent-numbers/quote

The response has the same fields as a receive-SMS quote, with type: "rent-number" and a normalized durationMinutes.

Availability is inherently volatile. Handle 409 UNAVAILABLE even when a quote succeeded moments earlier.

Last updated