Customer API

Swap for a different number

Swap the current number for a different one with the same service and country. The old order is cancelled (refunded) and a new order is created automatically.

2-minute hold: Same as cancel - swaps cannot be initiated within the first 2 minutes of purchase. The 425 response tells you exactly how many seconds to wait.

Use swap when the number isn't receiving SMS - it gives you a fresh number without leaving your app and re-purchasing manually.

post/api/v1/customer/swap/{orderId}

Request

  • Base URL: https://virtualsms.io
  • URL: https://virtualsms.io/api/v1/customer/swap/{orderId}
  • Auth: API key in header X-API-Key

Path parameters

orderIdstring uuid required

Order ID to swap

Response

Number swapped successfully

successboolean
old_order_idstring uuid
new_order_idstring uuid
phone_numberstring
servicestring
countrystring
pricenumber float
statusstring
expires_atstring date-time

Example response

{
  "success": true,
  "phone_number": "628987654321",
  "service": "tg",
  "country": "ID",
  "price": 0.4,
  "status": "waiting"
}

Changes

No recorded changes to this operation across all 1 revision of this API.