Developer documentation
Customer API
Authenticate with an API key. Source provider identities, receive tokens and source URLs are never exposed.
API key
Loading…Regenerating permanently deletes this key and creates a replacement.List available services
GET /v1/services
Authorization: Bearer rh_live_...
{
"data": {
"services": [{
"id": "SERVICE_UUID",
"name": "Example service",
"country_code": "US",
"unit_price": "0.150000",
"currency": "credit"
}]
}
}Create an order
POST /v1/orders
Authorization: Bearer rh_live_...
Idempotency-Key: UUID
{
"service_id": "SERVICE_UUID",
"quantity": 2
}One order can request multiple numbers. Use a new idempotency key for each logical purchase.
{
"data": {
"order_id": "ORDER_UUID",
"status": "completed",
"charged_credits": "0.300000",
"numbers": [{
"number_id": "NUMBER_UUID",
"phone_number": "+1…",
"status": "active",
"expires_at": "2026-10-26T12:00:00.000Z",
"otp_url": "https://your-domain/api/v1/otp/OPAQUE_TOKEN"
}]
}
}Poll a number for OTP
GET {otp_url}
{
"data": {
"number_id": "NUMBER_UUID",
"status": "waiting",
"otp_code": null
}
}Each number includes an opaque OTP URL. Poll that URL directly; RelayHub forwards the source result for the request and never persists SMS or OTP content.