Endpoint

GET https://sms.phones.inc/sms/code?transaction_id={transaction_id}

Overview

Poll for the verification code sent to a rented number. Until the code arrives, the endpoint returns 409 — keep polling every few seconds.
On success the response body is the bare verification code as plain text, not JSON.

Query Parameters

transaction_id
string
required
The transaction ID returned by Rent Number.

Response

200 with the verification code as a plain text body, e.g. 483920.

Errors

StatusErrorMeaning
400Transaction ID is missingNo transaction_id provided
400Transaction cancelledThe rental was already cancelled
404Transaction not foundUnknown transaction (or it belongs to another account)
409Code not received yetNo SMS yet — keep polling
502Service temporarily unavailableUpstream failure — retry
curl "https://sms.phones.inc/sms/code?transaction_id=txn_8f7e6d5c4b3a" \
  -H "API-KEY: sk_your_api_key"
483920