Rivier/ Reference/ voice

Ask to buy a number

post/phone/purchases

Ask to buy a number. Nothing is bought: this records the price and waits for a person to confirm it.

Before you call

Credential
Authorization: Bearer $KEY
Scope
voice:write
Mcp
rivier_phone_purchase_request
Graphql
Mutation.voicePhonePurchaseRequest
Sdk
voice.phonePurchase.request
Cli
voice phone purchase request

Request bodyapplication/json, required

  • numberstringrequired
    Pattern: ^+\d{6,15}$.
  • countrystringrequired
    At most 2 characters.
  • typestring
    One of: local, mobile, toll-free.
  • labelstringrequired
    At most 120 characters.

Responses

  • 201application/json
    Success
    • idstringrequired
    • numberstringrequired
    • countrystringrequired
    • typestringrequired
    • labelstringrequired
    • quoteMicrosnumber or nullrequired
    • currencystringrequired
    • requirementslist of objectrequired
      • kindstringrequired
      • titlestringrequired
      • blocksPurchasebooleanrequired
    • statestringrequired
      One of: pending, confirmed, bought, declined, expired, failed.
    • requestedBystringrequired
    • decidedBystring or nullrequired
    • numberIdstring or nullrequired
    • notestringrequired
    • createdAtstringrequired
    • expiresAtstringrequired
  • 400application/json
    The request was malformed
    • errorstringrequired
    • messagestring
  • 401application/json
    No valid credential
    • errorstringrequired
    • messagestring
  • 403application/json
    The credential lacks the scope, origin or address
    • errorstringrequired
    • messagestring
  • 429application/json
    Over the key's rate limit; see Retry-After
    • errorstringrequired
    • messagestring

This page as Markdown