Skip to main content
Skip to content
ScrapingBuddyDevelopers
On this page Overview

SMS API/API reference

Refresh an order

Request a status check for an existing order.

01 / Request

Make a request

POST/api/v1/orders/{id}/refresh

Checks are throttled and also run automatically in the background. Repeated refresh requests do not guarantee a fresh provider request.

Read the returned order. This action does not purchase a new number or extend the order expiry.

Required headers
AuthorizationstringRequired
Bearer followed by your ScrapingBuddy customer API key. Keep it on your server.
Authentication guide

Path parameters

idUUIDRequired
Your saved order ID. Replace {id} in the URL. You can only access orders belonging to your account.

No request body is required.

02 / Response

Understand the response

Success returns HTTP 200 with JSON. Always inspect order.status before using the number or taking another action.

order.idUUID
Save this identifier to retrieve, refresh, cancel or finish the order.
order.country / productstring
Country and service IDs used for this purchase.
order.operatorstring | null
Assigned operator; may be null while purchasing.
order.amount_centsinteger
Customer price in USD cents. 25 means $0.25. This field uses snake_case.
order.statusstring
Current lifecycle state. Read sms to detect a message; RECEIVED alone is not proof that a code arrived.
order.phonestring | null
Allocated phone number, including its country prefix. May be null while purchasing.
order.smsarray
Received messages. An empty array means no message has been recorded yet.
order.sms[].sender / text / code / datestring
Sender, complete message, extracted verification code and provider message date. A message may also contain an id.
order.expires_atdate-time | null
Order expiry reported by the provider. May be null while purchasing.
order.created_at / updated_atdate-time
When the order was created and last updated.
order.refunded_atdate-time | null
A timestamp confirms a recorded refund. Do not infer a refund from a local timer or status alone.
order.error_codestring | null
Failure or review details, when present. Include this and the order ID in a support ticket, never your API key.

Errors & next steps

Failures return an HTTP error status and a JSON error message. Correct validation and authentication errors before retrying. For 429, honor Retry-After; longer account limits may still apply.

All keys share the account limit of 60 API requests per minute. Purchase recovery must keep the original idempotency key and quote ID.

SMS API v1
SMS referenceGet balanceList countriesList servicesList operatorsCreate a quoteCreate an orderList ordersGet an orderRefresh an orderCancel an orderFinish an order

Explore the documentation

SMS APIIntroduction

Virtual numbers, quotes, verification messages and order management.

GuidesYour first number

Go from a server-side API key to an allocated number and your first verification message.

GuidesAuthentication

Create a customer key and connect your backend securely.

GuidesOrder lifecycle & messages

Know when a number is ready, when a message has arrived and when to stop polling.

GuidesSafe purchases & retries

Recover uncertain requests without accidentally buying another number.

GuidesErrors & limits

Understand response errors and the limits shared by your account.

GET /balanceGet balance

Read the wallet balance shared by your dashboard and API purchases. balanceUsd is the exact available USD balance as a decimal string, including fractional cents from CAPTCHA charg

GET /countriesList countries

Find the country identifiers used by catalogue and purchase requests. Use the id from this response in subsequent requests. Country names and dialling prefixes are display informat

GET /servicesList services

Find service IDs, stock and indicative prices for a country. Catalogue prices are indicative, not a purchase commitment. Always create a fresh quote before purchasing. Stock can ch

GET /operatorsList operators

Find available operators for a country and service. Pass an operator id to Create a quote when you need a specific operator. Omit operator or use any for automatic selection. Chang

POST /quotesCreate a quote

Get a live price before committing to a number purchase. A quote expires after two minutes. Check amountCents against your budget and expiresAt before purchasing. A quote does not

POST /ordersCreate an order

Purchase a number using an approved quote and a persisted idempotency key. This request spends wallet funds. Persist a UUID v4 Idempotency-Key and quoteId before sending it. Reuse

GET /ordersList orders

Read your order history, newest first, in pages of up to 20 orders. Start with offset=0 and increase by 20 while hasMore is true. Stop when hasMore is false. This is offset paginat

GET /orders/{id}Get an order

Retrieve an allocated number, its current status and all received messages. Poll every 10 seconds while the order is active. Background checks continue even if your application dis

POST /orders/{id}/refreshRefresh an order

Request a status check for an existing order. Checks are throttled and also run automatically in the background. Repeated refresh requests do not guarantee a fresh provider request

POST /orders/{id}/cancelCancel an order

Cancel an active order before an SMS has arrived. Only cancel when the order is active and sms is empty. The server checks whether the action is still allowed. Check refunded_at to

POST /orders/{id}/finishFinish an order

Complete an active order after receiving and using your SMS. Finish only after the sms array contains a message. This action ends the order; keep the message you need before finish