{"components":{"schemas":{"Account":{"additionalProperties":false,"properties":{"balance":{"pattern":"^-?[0-9]+\\.[0-9]{6}$","type":"string"},"currency":{"const":"USDT"}},"required":["balance","currency"],"type":"object"},"Country":{"additionalProperties":false,"properties":{"countryCode":{"type":"string"},"countryId":{"type":["integer","null"]},"countryName":{"type":"string"}},"required":["countryId","countryCode","countryName"],"type":"object"},"Error":{"additionalProperties":false,"properties":{"error":{"enum":["already_submitted","bad_request","cancel_too_early","cancel_unavailable","cancel_unconfirmed","cancel_unsupported","forbidden","idempotency_conflict","insufficient_balance","insufficient_scope","internal_error","invalid_api_key","invalid_country","invalid_request","invalid_search","invalid_status","method_not_allowed","no_numbers","not_found","order_not_found","price_above_limit","price_changed","price_limit_exceeded","purchase_unconfirmed","rate_limited","rental_unavailable","repeat_order_active","request_entity_too_large","request_in_progress","server_busy","unsupported_media_type"],"type":"string"},"message":{"type":"string"},"success":{"const":false}},"required":["success","error","message"],"type":"object"},"Order":{"additionalProperties":false,"properties":{"countryCode":{"type":"string"},"createdAt":{"example":"2026-10-06T14:00:00Z","format":"date-time","type":"string"},"id":{"type":"integer"},"otp":{"type":["string","null"]},"phoneNumber":{"type":["string","null"]},"price":{"pattern":"^[0-9]+\\.[0-9]{6}$","type":"string"},"serviceCode":{"type":"string"},"serviceName":{"type":"string"},"status":{"enum":["purchasing","waiting","received","cancelled","failed","reconcile_required"],"type":"string"},"updatedAt":{"example":"2026-10-06T14:00:00Z","format":"date-time","type":"string"}},"required":["id","countryCode","serviceCode","serviceName","price","phoneNumber","otp","status","createdAt","updatedAt"],"type":"object"},"Service":{"additionalProperties":false,"properties":{"serviceCode":{"type":"string"},"serviceId":{"type":"integer"},"serviceName":{"type":"string"}},"required":["serviceId","serviceCode","serviceName"],"type":"object"},"Transaction":{"additionalProperties":false,"properties":{"amount":{"pattern":"^-?[0-9]+\\.[0-9]{6}$","type":"string"},"createdAt":{"example":"2026-10-06T14:00:00Z","format":"date-time","type":"string"},"id":{"type":"integer"},"type":{"type":"string"}},"required":["id","amount","type","createdAt"],"type":"object"}},"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http"},"queryKey":{"in":"query","name":"api_key","type":"apiKey"}}},"info":{"description":"Account API key from /dashboard; only its verification hash is stored in the key table. Money is USDT, returned as decimal strings with 6 decimals. Optional maxPriceUsdt accepts a positive decimal string or number up to 1000000 with at most 6 decimals. Omitting the cap charges the current price; when supplied it is an upper bound. Dates are ISO8601 UTC. Read 240/min, write 60/min per user, shared with the website; invalid keys limited to 30/min per IP. Paginate orders/transactions with limit/beforeId and services with limit/offset. The services catalogue is independent of countries. A rental requires countryCode or countryId; both must agree if supplied. countryId can be zero by catalogue design; serviceId starts at one. Order IDs are sequential: authorization returns 404 for another user. No guaranteed expiresAt or automatic expiry refund; poll individual waiting orders at least 5 seconds apart, bounded by rate budget. reconcile_required needs support review: do not retry with a new key, funds remain held until the outcome is confirmed. No refund SLA is promised by the API.","title":"CheapOTP Customer API","version":"1.2.0"},"openapi":"3.1.0","paths":{"/account":{"get":{"operationId":"get_account","responses":{"200":{"content":{"application/json":{"example":{"data":{"balance":"4.000000","currency":"USDT"},"success":true},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Account"},"success":{"const":true}},"required":["success","data"],"type":"object"}}},"description":"Success","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid API key","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited","headers":{"Retry-After":{"description":"Seconds until the next request window","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Temporarily busy","headers":{"Retry-After":{"description":"Seconds before retry","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}}},"summary":"Wallet balance"}},"/countries":{"get":{"operationId":"get_countries","responses":{"200":{"content":{"application/json":{"example":{"count":2,"data":[{"countryCode":"us","countryId":187,"countryName":"United States"},{"countryCode":"fr","countryId":78,"countryName":"France"}],"success":true},"schema":{"additionalProperties":false,"properties":{"count":{"type":"integer"},"data":{"items":{"$ref":"#/components/schemas/Country"},"type":"array"},"success":{"const":true}},"required":["success","data","count"],"type":"object"}}},"description":"Success","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid API key","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited","headers":{"Retry-After":{"description":"Seconds until the next request window","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Temporarily busy","headers":{"Retry-After":{"description":"Seconds before retry","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}}},"summary":"Country codes"}},"/handler":{"get":{"description":"Requires a service ID or code and a country ID or code. Optional maxPriceUsdt caps the price. Same requestId and parameters replay the same purchase across URL and POST calls. Counts toward the write limit of 60/min. URLs containing api_key are private credentials; do not share them. HEAD/OPTIONS never rent a number.","operationId":"get_handler_number","parameters":[{"in":"query","name":"action","required":true,"schema":{"const":"getNumber"}},{"in":"query","name":"requestId","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{16,100}$","type":"string"}},{"in":"query","name":"serviceCode","schema":{"type":"string"}},{"in":"query","name":"countryCode","schema":{"type":"string"}},{"in":"query","name":"serviceId","schema":{"minimum":1,"type":"integer"}},{"in":"query","name":"countryId","schema":{"minimum":0,"type":"integer"}},{"in":"query","name":"maxPriceUsdt","schema":{"description":"Optional maximum per order in USDT; omit to accept the current price. When supplied it must be positive, up to 1000000 with at most 6 decimals. Decimal strings are recommended.","oneOf":[{"pattern":"^(?=.*[1-9])(?:(?:0|[1-9][0-9]{0,5})(?:\\.[0-9]{1,6})?|1000000(?:\\.0{1,6})?)$","type":"string"},{"exclusiveMinimum":0,"maximum":1000000,"multipleOf":1e-06,"type":"number"}]}}],"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"balance":{"pattern":"^-?[0-9]+\\.[0-9]{6}$","type":"string"},"order":{"$ref":"#/components/schemas/Order"}},"required":["order","balance"],"type":"object"},"success":{"const":true}},"required":["success","data"],"type":"object"}}},"description":"Interrupted purchase recovered; inspect order status","headers":{"Idempotency-Replayed":{"description":"true when returning a previously submitted purchase","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"201":{"content":{"application/json":{"example":{"data":{"balance":"3.800000","order":{"countryCode":"us","createdAt":"2026-10-06T14:00:00Z","id":123,"otp":null,"phoneNumber":"+12025550123","price":"0.200000","serviceCode":"tg","serviceName":"Telegram","status":"waiting","updatedAt":"2026-10-06T14:00:00Z"}},"success":true},"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"balance":{"pattern":"^-?[0-9]+\\.[0-9]{6}$","type":"string"},"order":{"$ref":"#/components/schemas/Order"}},"required":["order","balance"],"type":"object"},"success":{"const":true}},"required":["success","data"],"type":"object"}}},"description":"Order created","headers":{"Idempotency-Replayed":{"description":"true when returning a previously submitted purchase","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid API key","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient scope","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request conflict","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Body too large","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unsupported media type","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited","headers":{"Retry-After":{"description":"Seconds until the next request window","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Temporarily busy","headers":{"Retry-After":{"description":"Seconds before retry","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}}},"security":[{"queryKey":[]},{"bearerAuth":[]}],"summary":"Rent a number with a single URL"}},"/orders":{"get":{"operationId":"get_orders","parameters":[{"in":"query","name":"status","schema":{"enum":["purchasing","waiting","received","cancelled","failed","reconcile_required"],"type":"string"}},{"in":"query","name":"limit","schema":{"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"beforeId","schema":{"maximum":9223372036854775807,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"count":1,"data":[{"countryCode":"us","createdAt":"2026-10-06T14:00:00Z","id":123,"otp":null,"phoneNumber":"+12025550123","price":"0.200000","serviceCode":"tg","serviceName":"Telegram","status":"waiting","updatedAt":"2026-10-06T14:00:00Z"}],"nextBeforeId":null,"success":true},"schema":{"additionalProperties":false,"properties":{"count":{"type":"integer"},"data":{"items":{"$ref":"#/components/schemas/Order"},"maxItems":100,"type":"array"},"nextBeforeId":{"type":["integer","null"]},"success":{"const":true}},"required":["success","data","count","nextBeforeId"],"type":"object"}}},"description":"Success","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid API key","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited","headers":{"Retry-After":{"description":"Seconds until the next request window","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Temporarily busy","headers":{"Retry-After":{"description":"Seconds before retry","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}}},"summary":"Latest 100 orders"},"post":{"operationId":"post_orders","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"pattern":"^[A-Za-z0-9_-]{16,100}$","type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"countryCode":"us","maxPriceUsdt":"0.50","serviceCode":"tg"},"schema":{"additionalProperties":false,"allOf":[{"anyOf":[{"required":["serviceCode"]},{"required":["serviceId"]}]},{"anyOf":[{"required":["countryCode"]},{"required":["countryId"]}]}],"properties":{"countryCode":{"type":"string"},"countryId":{"minimum":0,"type":"integer"},"maxPriceUsdt":{"description":"Optional maximum per order in USDT; omit to accept the current price. When supplied it must be positive, up to 1000000 with at most 6 decimals. Decimal strings are recommended.","oneOf":[{"pattern":"^(?=.*[1-9])(?:(?:0|[1-9][0-9]{0,5})(?:\\.[0-9]{1,6})?|1000000(?:\\.0{1,6})?)$","type":"string"},{"exclusiveMinimum":0,"maximum":1000000,"multipleOf":1e-06,"type":"number"}]},"serviceCode":{"type":"string"},"serviceId":{"minimum":1,"type":"integer"}},"required":[],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"balance":{"pattern":"^-?[0-9]+\\.[0-9]{6}$","type":"string"},"order":{"$ref":"#/components/schemas/Order"}},"required":["order","balance"],"type":"object"},"success":{"const":true}},"required":["success","data"],"type":"object"}}},"description":"Interrupted purchase recovered; inspect order status","headers":{"Idempotency-Replayed":{"description":"true when returning a previously submitted purchase","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"201":{"content":{"application/json":{"example":{"data":{"balance":"3.800000","order":{"countryCode":"us","createdAt":"2026-10-06T14:00:00Z","id":123,"otp":null,"phoneNumber":"+12025550123","price":"0.200000","serviceCode":"tg","serviceName":"Telegram","status":"waiting","updatedAt":"2026-10-06T14:00:00Z"}},"success":true},"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"balance":{"pattern":"^-?[0-9]+\\.[0-9]{6}$","type":"string"},"order":{"$ref":"#/components/schemas/Order"}},"required":["order","balance"],"type":"object"},"success":{"const":true}},"required":["success","data"],"type":"object"}}},"description":"Order created","headers":{"Idempotency-Replayed":{"description":"true when returning a previously submitted purchase","schema":{"type":"string"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid API key","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient scope","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request conflict","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Body too large","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unsupported media type","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited","headers":{"Retry-After":{"description":"Seconds until the next request window","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Temporarily busy","headers":{"Retry-After":{"description":"Seconds before retry","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}}},"summary":"Rent a number"}},"/orders/{order_id}":{"get":{"operationId":"get_orders_order_id","parameters":[{"in":"path","name":"order_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"data":{"countryCode":"us","createdAt":"2026-10-06T14:00:00Z","id":123,"otp":"123456","phoneNumber":"+12025550123","price":"0.200000","serviceCode":"tg","serviceName":"Telegram","status":"received","updatedAt":"2026-10-06T14:00:00Z"},"success":true},"schema":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/Order"},"success":{"const":true}},"required":["success","data"],"type":"object"}}},"description":"Success","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid API key","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited","headers":{"Retry-After":{"description":"Seconds until the next request window","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Temporarily busy","headers":{"Retry-After":{"description":"Seconds before retry","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}}},"summary":"Order and OTP status"}},"/orders/{order_id}/cancel":{"post":{"operationId":"post_orders_order_id_cancel","parameters":[{"in":"path","name":"order_id","required":true,"schema":{"minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"example":{},"schema":{"additionalProperties":false,"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"example":{"data":{"balance":"4.000000","order":{"countryCode":"us","createdAt":"2026-10-06T14:00:00Z","id":123,"otp":null,"phoneNumber":"+12025550123","price":"0.200000","serviceCode":"tg","serviceName":"Telegram","status":"cancelled","updatedAt":"2026-10-06T14:00:00Z"}},"success":true},"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"balance":{"pattern":"^-?[0-9]+\\.[0-9]{6}$","type":"string"},"order":{"$ref":"#/components/schemas/Order"}},"required":["order","balance"],"type":"object"},"success":{"const":true}},"required":["success","data"],"type":"object"}}},"description":"Success","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid API key","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Insufficient scope","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Request conflict","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Body too large","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unsupported media type","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited","headers":{"Retry-After":{"description":"Seconds until the next request window","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Temporarily busy","headers":{"Retry-After":{"description":"Seconds before retry","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}}},"summary":"Cancel a waiting order"}},"/services":{"get":{"operationId":"get_services","parameters":[{"in":"query","name":"search","schema":{"maxLength":100,"type":"string"}},{"in":"query","name":"limit","schema":{"maximum":1000000,"minimum":1,"type":"integer"}},{"in":"query","name":"offset","schema":{"maximum":1000000,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"count":1,"data":[{"serviceCode":"tg","serviceId":123,"serviceName":"Telegram"}],"nextOffset":null,"success":true},"schema":{"additionalProperties":false,"properties":{"count":{"type":"integer"},"data":{"items":{"$ref":"#/components/schemas/Service"},"type":"array"},"nextOffset":{"type":["integer","null"]},"success":{"const":true}},"required":["success","data","count","nextOffset"],"type":"object"}}},"description":"Success","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid API key","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited","headers":{"Retry-After":{"description":"Seconds until the next request window","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Temporarily busy","headers":{"Retry-After":{"description":"Seconds before retry","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}}},"summary":"Get a list of services"}},"/transactions":{"get":{"operationId":"get_transactions","parameters":[{"in":"query","name":"limit","schema":{"maximum":100,"minimum":1,"type":"integer"}},{"in":"query","name":"beforeId","schema":{"maximum":9223372036854775807,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"count":1,"data":[{"amount":"4.000000","createdAt":"2026-10-06T14:00:00Z","id":1,"type":"crypto_usdt"}],"nextBeforeId":null,"success":true},"schema":{"additionalProperties":false,"properties":{"count":{"type":"integer"},"data":{"items":{"$ref":"#/components/schemas/Transaction"},"maxItems":100,"type":"array"},"nextBeforeId":{"type":["integer","null"]},"success":{"const":true}},"required":["success","data","count","nextBeforeId"],"type":"object"}}},"description":"Success","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid request","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invalid API key","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rate limited","headers":{"Retry-After":{"description":"Seconds until the next request window","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error","headers":{"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Temporarily busy","headers":{"Retry-After":{"description":"Seconds before retry","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests per fixed minute window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in this window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Next window start, Unix UTC seconds","schema":{"type":"integer"}}}}},"summary":"Latest 100 wallet entries"}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"https://cheapestotp.com/api/v1"}]}
