{
    "openapi": "3.0.3",
    "info": {
        "title": "Ada OTP API",
        "version": "1.1.0",
        "description": "REST API for virtual phone numbers (SMS OTP), social media services (SMM), Gmail accounts, email rental and ready-made WhatsApp numbers. All products share one balance.\n\n## Authentication\nEvery request needs your API key. Find it in Dashboard → Profile → API. Send it as the `X-API-Key` header (recommended), `Authorization: Bearer <key>`, or the `apikey` query parameter. Keep the key secret; if it leaks, contact support and we will rotate it.\n\n## Conventions\n- Base URL: `https://api.adaotp.com/api/v1`. Request bodies may be JSON (`Content-Type: application/json`) or form-encoded; file uploads use `multipart/form-data`.\n- Every response is JSON with `success` (boolean), `message` and `data`. Always check `success` before reading `data`.\n- Errors also carry a machine-readable `error_code` (see Error codes) and a `request_id`. Branch on `error_code`, not on `message` — message text may change.\n- Amounts are integers in Indonesian Rupiah (IDR). Timestamps are ISO 8601 or `Y-m-d H:i:s` in Asia/Jakarta (UTC+7).\n- Rate limit: 360 requests per minute per API key. Watch the `X-RateLimit-Remaining` header; HTTP 429 means wait and retry.\n- Idempotency: purchase endpoints accept an optional `Idempotency-Key` header (8–128 chars). Retrying with the same key within 24 h returns the first result instead of buying twice — use a fresh UUID per purchase.\n- Every response has an `X-Request-Id` header. Include it when contacting support.\n\nHuman-readable docs: https://api.adaotp.com/api-docs"
    },
    "servers": [
        {
            "url": "https://api.adaotp.com/api/v1"
        }
    ],
    "security": [
        {
            "ApiKeyHeader": []
        },
        {
            "BearerAuth": []
        },
        {
            "ApiKeyQuery": []
        }
    ],
    "tags": [
        {
            "name": "Account",
            "description": "Balance and profile of the API key owner."
        },
        {
            "name": "Virtual numbers (SMS OTP)",
            "description": "Rent a phone number, receive the verification SMS, then finish or cancel. Cancelling before an SMS arrives refunds the full price."
        },
        {
            "name": "Social media services (SMM)",
            "description": "Followers, likes, views and more for Instagram, TikTok, YouTube, Facebook, Telegram and other platforms. Delivery is automatic; poll the order for progress."
        },
        {
            "name": "Gmail accounts",
            "description": "Ready-made Gmail accounts. Credentials are returned immediately and can be read again from your orders. Treat passwords as secrets."
        },
        {
            "name": "Email rental",
            "description": "Rent an email address to receive one verification code. Cancel for a full refund if the code never arrives."
        },
        {
            "name": "WhatsApp Ready numbers",
            "description": "Numbers whose WhatsApp account is already active. Sign in with \"Link with phone number / use your other phone\": request a 6-digit code, enter it in WhatsApp, then confirm. Flow: ready → waiting_code → code_sent → completed. failed / canceled / refunded return the price to your balance."
        },
        {
            "name": "Deposits & transactions",
            "description": "Top up your balance from code. Payment instructions (QR / virtual account / checkout URL) come back in the deposit response."
        }
    ],
    "paths": {
        "/balance": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "Get balance",
                "operationId": "getBalance",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "balance": 305932,
                                        "balance_formatted": "Rp 305.932",
                                        "bonus_balance": 0,
                                        "pending_balance": 0,
                                        "currency": "IDR"
                                    },
                                    "message": "Balance retrieved successfully"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Live balance. Cached for up to 5 seconds."
            }
        },
        "/profile": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "Get profile",
                "operationId": "getProfile",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "user": {
                                            "id": 2621,
                                            "name": "Jane",
                                            "email": "jane@example.com",
                                            "balance": "Rp 305.932",
                                            "created_at": "2026-01-01T00:00:00.000000Z"
                                        },
                                        "stats": {
                                            "total_orders": 1,
                                            "total_sms": 0,
                                            "balance_raw": 305932
                                        }
                                    },
                                    "message": "Profile loaded successfully"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Account details and active-order stats. The balance here may lag a few seconds behind /balance."
            }
        },
        "/services": {
            "get": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "List services",
                "operationId": "getServices",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "id": 1276,
                                            "text": "Whatsapp",
                                            "description": null,
                                            "icon": "https://…/svc_ic_1276.webp"
                                        },
                                        {
                                            "id": 718,
                                            "text": "Google / Youtube / Gmail",
                                            "description": null,
                                            "icon": "https://…"
                                        }
                                    ],
                                    "message": "Services retrieved successfully"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "All apps/websites you can receive codes for. Cache this list; it rarely changes."
            }
        },
        "/services/{id}": {
            "get": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "Get one service",
                "operationId": "getServicesId",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Service id from /services",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1276
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": 1276,
                                        "text": "Whatsapp",
                                        "description": null,
                                        "icon": "https://…"
                                    },
                                    "message": "Service details retrieved successfully"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/services/{id}/countries": {
            "get": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "Countries & prices for a service",
                "operationId": "getServicesIdCountries",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Service id from /services",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1276
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "status": "success",
                                        "application_id": 1276,
                                        "countries": [
                                            {
                                                "id": 184809,
                                                "name": "Indonesia",
                                                "iso": "ID",
                                                "prefix": "+62",
                                                "price": 4720,
                                                "price_formatted": "Rp 4.720",
                                                "available": true,
                                                "provider_id": 3,
                                                "stock": 110,
                                                "delivery_percent": 35.8,
                                                "operator": "any",
                                                "can_order": true
                                            }
                                        ]
                                    },
                                    "message": "Service countries retrieved successfully"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Each entry is one purchasable offer (country + server + operator). Use the entry `id` as `country` when creating an order. `stock`, `delivery_percent` and `can_order` help you choose; prices change, so read them right before ordering."
            }
        },
        "/orders": {
            "post": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "Buy a number",
                "operationId": "postOrders",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "results": [
                                            {
                                                "success": true,
                                                "order_uuid": "FBTO1234567890NUM",
                                                "order": {
                                                    "…": "raw order object"
                                                }
                                            }
                                        ],
                                        "summary": {
                                            "requested": 1,
                                            "succeeded": 1,
                                            "failed": 0
                                        }
                                    },
                                    "order": {
                                        "id": 6751431,
                                        "order_uuid": "FBTO1234567890NUM",
                                        "number": "6281234567890",
                                        "formatted_number": "+62 812-3456-7890",
                                        "status": "pending",
                                        "service": {
                                            "id": 1276,
                                            "name": "Whatsapp"
                                        },
                                        "country": {
                                            "id": 6,
                                            "name": "Indonesia",
                                            "iso_code": "ID",
                                            "phone_code": "62"
                                        },
                                        "price": 4720,
                                        "currency": "IDR",
                                        "latest_code": null,
                                        "sms_count": 0,
                                        "messages": [],
                                        "is_expired": false,
                                        "remaining_time": 1200,
                                        "created_at": "2026-10-09 08:15:09",
                                        "expired_at": "2026-10-09 08:35:09"
                                    },
                                    "message": "Order created successfully"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Charges your balance and reserves a number. Read `order.order_uuid` from the response and poll GET /orders/{order_uuid} for the SMS. With `quantity` > 1 the response also has `orders` and `summary`. The first 3 numbers are created before the response; above 3 the API answers `202` with `background: true` and keeps ordering the rest — poll GET /orders/bulk-status for progress. Ordering stops at the first number that cannot be created (out of stock, balance); you are only charged for numbers created.\n\nTypical error codes: `insufficient_balance`, `out_of_stock`, `rate_limited`, `provider_unavailable`, `validation_error`.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "service_id": {
                                        "type": "integer",
                                        "description": "Service id from /services",
                                        "example": 1276
                                    },
                                    "country": {
                                        "type": "integer",
                                        "description": "Offer `id` from /services/{id}/countries (not an ISO code)",
                                        "example": 184809
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "description": "How many numbers to buy, 1–30 (default 1)",
                                        "example": 1
                                    }
                                },
                                "required": [
                                    "service_id",
                                    "country"
                                ]
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "service_id": {
                                        "type": "integer",
                                        "description": "Service id from /services",
                                        "example": 1276
                                    },
                                    "country": {
                                        "type": "integer",
                                        "description": "Offer `id` from /services/{id}/countries (not an ISO code)",
                                        "example": 184809
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "description": "How many numbers to buy, 1–30 (default 1)",
                                        "example": 1
                                    }
                                },
                                "required": [
                                    "service_id",
                                    "country"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/orders/bulk-status": {
            "get": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "Progress of a multi-number order",
                "operationId": "getOrdersBulkStatus",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": "3f9a1c2b7d10",
                                        "state": "running",
                                        "requested": 30,
                                        "succeeded": 12,
                                        "failed": 0,
                                        "message": null,
                                        "started_at": 1791520000,
                                        "updated_at": 1791520014
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Status of your latest order with `quantity` > 3 (kept 30 minutes). `state` is `running` while the rest are being ordered and `done` when finished; `succeeded` counts numbers created so far. `data` is null when there is no recent bulk order. Only one bulk order can run at a time (a second one gets 409)."
            }
        },
        "/orders/{id}": {
            "get": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "Get one order (poll for the SMS)",
                "operationId": "getOrdersId",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid (recommended) or numeric order id",
                        "schema": {
                            "type": "string"
                        },
                        "example": "FBTO1234567890NUM"
                    },
                    {
                        "name": "check_sms",
                        "in": "query",
                        "required": false,
                        "description": "true (default) asks the provider for new SMS now; false returns stored data only",
                        "schema": {
                            "type": "boolean"
                        },
                        "example": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": 6751431,
                                        "order_uuid": "FBTO1234567890NUM",
                                        "number": "6281234567890",
                                        "formatted_number": "+62 812-3456-7890",
                                        "status": "completed",
                                        "service": {
                                            "id": 1276,
                                            "name": "Whatsapp"
                                        },
                                        "country": {
                                            "id": 6,
                                            "name": "Indonesia",
                                            "iso_code": "ID",
                                            "phone_code": "62"
                                        },
                                        "operator": "any",
                                        "price": 4720,
                                        "currency": "IDR",
                                        "latest_code": "504374",
                                        "sms_count": 1,
                                        "messages": [
                                            {
                                                "code": "504374",
                                                "text": "Your WhatsApp code: 504-374",
                                                "received_at": "2026-10-09T08:16:02+07:00"
                                            }
                                        ],
                                        "can_cancel": false,
                                        "can_finish": true,
                                        "is_expired": false,
                                        "remaining_time": 912,
                                        "created_at": "2026-10-09 08:15:09",
                                        "expired_at": "2026-10-09 08:35:09"
                                    },
                                    "message": "Order retrieved successfully"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Recommended polling endpoint. `latest_code` holds the newest code; `messages` lists every SMS newest-first. Poll every 5–10 seconds; responses are cached for 3 seconds. `{id}` is the `order_uuid` (works for any order) or the numeric `id` (active orders only).\n\nTypical error codes: `order_not_found`."
            },
            "delete": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "Cancel an order (alias)",
                "operationId": "deleteOrdersId",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid or numeric order id",
                        "schema": {
                            "type": "string"
                        },
                        "example": "FBTO1234567890NUM"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Order cancelled successfully",
                                    "data": null
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/orders/active": {
            "get": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "List active orders",
                "operationId": "getOrdersActive",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "success": true,
                                        "orders": [
                                            {
                                                "id": 6751431,
                                                "order_uuid": "FBTO1234567890NUM",
                                                "number": "6281234567890",
                                                "status": "pending",
                                                "sms": [],
                                                "remaining_time": 1150
                                            }
                                        ],
                                        "count": 1,
                                        "has_active_orders": true,
                                        "order_limits": {
                                            "…": "…"
                                        }
                                    },
                                    "message": "Active orders retrieved successfully"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "All orders still waiting or receiving SMS, plus your order limits. SMS arrays here are oldest-first; prefer GET /orders/{id} when you need the latest code."
            }
        },
        "/orders/history": {
            "get": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "Order history (completed)",
                "operationId": "getOrdersHistory",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Rows per page, 1–50 (default 10)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 10
                    },
                    {
                        "name": "date_from",
                        "in": "query",
                        "required": false,
                        "description": "Y-m-d",
                        "schema": {
                            "type": "string"
                        },
                        "example": "2026-10-01"
                    },
                    {
                        "name": "date_to",
                        "in": "query",
                        "required": false,
                        "description": "Y-m-d",
                        "schema": {
                            "type": "string"
                        },
                        "example": "2026-10-09"
                    },
                    {
                        "name": "search",
                        "in": "query",
                        "required": false,
                        "description": "Number or service name",
                        "schema": {
                            "type": "string"
                        },
                        "example": "62812"
                    },
                    {
                        "name": "sort_direction",
                        "in": "query",
                        "required": false,
                        "description": "asc | desc (default desc)",
                        "schema": {
                            "type": "string"
                        },
                        "example": "desc"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "id": 6751431,
                                            "order_uuid": "FBTO1234567890NUM",
                                            "number": "6281234567890",
                                            "status": "completed",
                                            "price": 4720,
                                            "sms": [
                                                {
                                                    "code": "504374",
                                                    "text": "…",
                                                    "timestamp": "2026-10-09T08:16:02+07:00"
                                                }
                                            ]
                                        }
                                    ],
                                    "pagination": {
                                        "current_page": 1,
                                        "per_page": 10,
                                        "has_more_pages": false,
                                        "last_page": 1
                                    },
                                    "message": "Completed order history retrieved successfully"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/orders/{id}/cancel": {
            "post": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "Cancel an order (refund)",
                "operationId": "postOrdersIdCancel",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid or numeric order id",
                        "schema": {
                            "type": "string"
                        },
                        "example": "FBTO1234567890NUM"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Order cancelled successfully",
                                    "data": null
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Allowed only before an SMS arrives, and usually only after a short minimum wait (`cancel_not_allowed_yet` until then). `DELETE /orders/{id}` does the same.\n\nTypical error codes: `cancel_not_allowed_yet`, `order_already_cancelled`, `order_not_found`."
            }
        },
        "/orders/{id}/finish": {
            "post": {
                "tags": [
                    "Virtual numbers (SMS OTP)"
                ],
                "summary": "Finish an order",
                "operationId": "postOrdersIdFinish",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid or numeric order id",
                        "schema": {
                            "type": "string"
                        },
                        "example": "FBTO1234567890NUM"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Order completed successfully",
                                    "data": null
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Mark the order complete after you received the code. Frees your active-order slot."
            }
        },
        "/smm/platforms": {
            "get": {
                "tags": [
                    "Social media services (SMM)"
                ],
                "summary": "List platforms & service types",
                "operationId": "getSmmPlatforms",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "platforms": [
                                            {
                                                "key": "instagram",
                                                "label": "Instagram",
                                                "total": 870,
                                                "types": [
                                                    {
                                                        "type": "Followers",
                                                        "total": 197
                                                    },
                                                    {
                                                        "type": "Likes",
                                                        "total": 198
                                                    }
                                                ]
                                            }
                                        ]
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/smm/services": {
            "get": {
                "tags": [
                    "Social media services (SMM)"
                ],
                "summary": "List services",
                "operationId": "getSmmServices",
                "parameters": [
                    {
                        "name": "platform",
                        "in": "query",
                        "required": false,
                        "description": "Platform key from /smm/platforms",
                        "schema": {
                            "type": "string"
                        },
                        "example": "instagram"
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "Service type within the platform",
                        "schema": {
                            "type": "string"
                        },
                        "example": "Followers"
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "required": false,
                        "description": "Legacy category name (overrides platform/type)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "description": "quality (default) | price_asc | price_desc",
                        "schema": {
                            "type": "string"
                        },
                        "example": "quality"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "services": [
                                            {
                                                "id": 8112,
                                                "name": "Instagram Followers Indonesia [Refill 30 days]",
                                                "platform": "instagram",
                                                "service_type": "Followers",
                                                "type": "Default",
                                                "is_custom": false,
                                                "price_per_1000": 72000,
                                                "min": 50,
                                                "max": 50000,
                                                "refill": 0,
                                                "target_label": "Profile link / username",
                                                "completion_rate": 89,
                                                "refund_rate": 8,
                                                "is_recommended": false
                                            }
                                        ]
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Always filter by `platform` + `type`; unfiltered responses are large. `price_per_1000` is in IDR."
            }
        },
        "/smm/services/{id}": {
            "get": {
                "tags": [
                    "Social media services (SMM)"
                ],
                "summary": "Get one service",
                "operationId": "getSmmServicesId",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "description": "Service id",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 8112
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "id": 8112,
                                        "name": "…",
                                        "price_per_1000": 72000,
                                        "min": 50,
                                        "max": 50000
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Current price and min/max — call right before ordering."
            }
        },
        "/smm/quote": {
            "post": {
                "tags": [
                    "Social media services (SMM)"
                ],
                "summary": "Calculate price",
                "operationId": "postSmmQuote",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "quantity": 1000,
                                        "price": 72000
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Preview the price. Does not charge your balance.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "service_id": {
                                        "type": "integer",
                                        "description": "Service id",
                                        "example": 8112
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "description": "Required for normal services",
                                        "example": 1000
                                    },
                                    "custom_comments": {
                                        "type": "string",
                                        "description": "Custom-comment services only: one comment per line (quantity = number of lines)"
                                    }
                                },
                                "required": [
                                    "service_id"
                                ]
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "service_id": {
                                        "type": "integer",
                                        "description": "Service id",
                                        "example": 8112
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "description": "Required for normal services",
                                        "example": 1000
                                    },
                                    "custom_comments": {
                                        "type": "string",
                                        "description": "Custom-comment services only: one comment per line (quantity = number of lines)"
                                    }
                                },
                                "required": [
                                    "service_id"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/smm/orders": {
            "post": {
                "tags": [
                    "Social media services (SMM)"
                ],
                "summary": "Place an SMM order",
                "operationId": "postSmmOrders",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order_uuid": "9f1c2f7a-6b41-4a0e-9d2e-1a2b3c4d5e6f",
                                        "service_id": 8112,
                                        "target": "https://instagram.com/username",
                                        "quantity": 1000,
                                        "price": 72000,
                                        "status": "pending"
                                    },
                                    "message": "Order placed successfully"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "service_id": {
                                        "type": "integer",
                                        "description": "Service id",
                                        "example": 8112
                                    },
                                    "target": {
                                        "type": "string",
                                        "description": "Link or username, as described by the service `target_label`",
                                        "example": "https://instagram.com/username"
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "description": "Between the service min and max",
                                        "example": 1000
                                    },
                                    "custom_comments": {
                                        "type": "string",
                                        "description": "Custom-comment services only, one per line"
                                    }
                                },
                                "required": [
                                    "service_id",
                                    "target"
                                ]
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "service_id": {
                                        "type": "integer",
                                        "description": "Service id",
                                        "example": 8112
                                    },
                                    "target": {
                                        "type": "string",
                                        "description": "Link or username, as described by the service `target_label`",
                                        "example": "https://instagram.com/username"
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "description": "Between the service min and max",
                                        "example": 1000
                                    },
                                    "custom_comments": {
                                        "type": "string",
                                        "description": "Custom-comment services only, one per line"
                                    }
                                },
                                "required": [
                                    "service_id",
                                    "target"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Social media services (SMM)"
                ],
                "summary": "List SMM orders",
                "operationId": "getSmmOrders",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "1–100 (default 25)",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 25
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "pending | processing | in_progress | completed | partial | canceled | failed | refunded",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "orders": [
                                            {
                                                "order_uuid": "9f1c2f7a-…",
                                                "status": "in_progress",
                                                "start_count": 1520,
                                                "remains": 400
                                            }
                                        ],
                                        "pagination": {
                                            "…": "…"
                                        }
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/smm/orders/{uuid}": {
            "get": {
                "tags": [
                    "Social media services (SMM)"
                ],
                "summary": "Get one SMM order",
                "operationId": "getSmmOrdersUuid",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "9f1c2f7a-6b41-4a0e-9d2e-1a2b3c4d5e6f"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order_uuid": "9f1c2f7a-…",
                                        "service_name": "…",
                                        "target": "…",
                                        "quantity": 1000,
                                        "price": 72000,
                                        "status": "completed",
                                        "start_count": 1520,
                                        "remains": 0,
                                        "refunded": 0,
                                        "created_at": "2026-10-09T08:00:00+07:00"
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Refreshed from the provider. `remains` = quantity not yet delivered; `refunded` = IDR returned for undelivered parts."
            }
        },
        "/gmail/stock": {
            "get": {
                "tags": [
                    "Gmail accounts"
                ],
                "summary": "Stock & price",
                "operationId": "getGmailStock",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "stock": 814,
                                        "sell_price": 5880,
                                        "max_qty": 50
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/gmail/orders": {
            "post": {
                "tags": [
                    "Gmail accounts"
                ],
                "summary": "Buy Gmail accounts",
                "operationId": "postGmailOrders",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "orders": [
                                            {
                                                "order_uuid": "c1d2…",
                                                "email": "someone123@gmail.com",
                                                "password": "••••••••",
                                                "price": 5880,
                                                "status": "completed",
                                                "refundable": true,
                                                "deadline_at": "2026-10-10T08:00:00+07:00"
                                            }
                                        ]
                                    },
                                    "message": "Purchase completed"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Charged up front; anything that cannot be delivered is refunded automatically.\n\nTypical error codes: `insufficient_balance`, `out_of_stock`, `validation_error`.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "qty": {
                                        "type": "integer",
                                        "description": "1–50 (see max_qty)",
                                        "example": 1
                                    }
                                },
                                "required": [
                                    "qty"
                                ]
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "qty": {
                                        "type": "integer",
                                        "description": "1–50 (see max_qty)",
                                        "example": 1
                                    }
                                },
                                "required": [
                                    "qty"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Gmail accounts"
                ],
                "summary": "List Gmail orders",
                "operationId": "getGmailOrders",
                "parameters": [
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Page number",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 1
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "1–100",
                        "schema": {
                            "type": "integer"
                        },
                        "example": 25
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "pending | completed | failed | refund_pending | refunded | refund_rejected",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "orders": [
                                            {
                                                "order_uuid": "c1d2…",
                                                "email": "someone123@gmail.com",
                                                "password": "••••••••",
                                                "status": "completed"
                                            }
                                        ]
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/gmail/orders/{uuid}": {
            "get": {
                "tags": [
                    "Gmail accounts"
                ],
                "summary": "Get one Gmail order",
                "operationId": "getGmailOrdersUuid",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "c1d2e3f4-…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order_uuid": "c1d2…",
                                        "email": "someone123@gmail.com",
                                        "password": "••••••••",
                                        "status": "completed",
                                        "refund_status": null,
                                        "refundable": true
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/gmail/orders/{uuid}/refund": {
            "post": {
                "tags": [
                    "Gmail accounts"
                ],
                "summary": "File a refund dispute",
                "operationId": "postGmailOrdersUuidRefund",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "c1d2e3f4-…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "refund_status": "pending"
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Send as multipart/form-data while `refundable` is true. A screenshot proving the problem is required.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "10–1000 characters",
                                        "example": "Password is wrong, cannot sign in"
                                    },
                                    "proof": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Screenshot: jpg/png/webp, max 5 MB"
                                    }
                                },
                                "required": [
                                    "reason",
                                    "proof"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/gmail/orders/{uuid}/chat": {
            "get": {
                "tags": [
                    "Gmail accounts"
                ],
                "summary": "Dispute chat link",
                "operationId": "getGmailOrdersUuidChat",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "c1d2e3f4-…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "url": "https://…"
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/email-rental/suggestions": {
            "get": {
                "tags": [
                    "Email rental"
                ],
                "summary": "Popular target sites",
                "operationId": "getEmailRentalSuggestions",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "sites": [
                                            "tiktok.com",
                                            "facebook.com",
                                            "instagram.com",
                                            "x.com",
                                            "github.com"
                                        ]
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/email-rental/domains": {
            "get": {
                "tags": [
                    "Email rental"
                ],
                "summary": "Domains & prices for a site",
                "operationId": "getEmailRentalDomains",
                "parameters": [
                    {
                        "name": "site",
                        "in": "query",
                        "required": true,
                        "description": "Target site",
                        "schema": {
                            "type": "string"
                        },
                        "example": "tiktok.com"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "domains": [
                                            {
                                                "name": "outlook.com",
                                                "count": 740,
                                                "price": 140,
                                                "completed": 24500
                                            },
                                            {
                                                "name": "gmx.com",
                                                "count": 730628,
                                                "price": 124,
                                                "completed": 11752
                                            }
                                        ],
                                        "used_domains": []
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/email-rental/orders": {
            "post": {
                "tags": [
                    "Email rental"
                ],
                "summary": "Rent an address",
                "operationId": "postEmailRentalOrders",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order_uuid": "e5f6…",
                                        "site": "tiktok.com",
                                        "domain": "hotmail.com",
                                        "email": "abc123@outlook.com",
                                        "code": null,
                                        "price": 140,
                                        "status": "waiting",
                                        "cancellable": true
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Charges your balance and returns the address. Poll GET /email-rental/orders/{uuid} until `code` is filled.\n\nTypical error codes: `insufficient_balance`, `service_unavailable`, `out_of_stock`.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site": {
                                        "type": "string",
                                        "description": "Target site",
                                        "example": "tiktok.com"
                                    },
                                    "domain": {
                                        "type": "string",
                                        "description": "Domain `name` from /email-rental/domains",
                                        "example": "outlook.com"
                                    }
                                },
                                "required": [
                                    "site",
                                    "domain"
                                ]
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site": {
                                        "type": "string",
                                        "description": "Target site",
                                        "example": "tiktok.com"
                                    },
                                    "domain": {
                                        "type": "string",
                                        "description": "Domain `name` from /email-rental/domains",
                                        "example": "outlook.com"
                                    }
                                },
                                "required": [
                                    "site",
                                    "domain"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "Email rental"
                ],
                "summary": "List rentals",
                "operationId": "getEmailRentalOrders",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "orders": [
                                            {
                                                "order_uuid": "e5f6…",
                                                "email": "abc123@hotmail.com",
                                                "code": "482913",
                                                "status": "completed"
                                            }
                                        ]
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/email-rental/orders/{uuid}": {
            "get": {
                "tags": [
                    "Email rental"
                ],
                "summary": "Get one rental (poll for the code)",
                "operationId": "getEmailRentalOrdersUuid",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "e5f6a7b8-…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order_uuid": "e5f6…",
                                        "email": "abc123@hotmail.com",
                                        "code": "482913",
                                        "message": "Your TikTok code is 482913",
                                        "status": "completed",
                                        "cancellable": false
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Checks the mailbox each call. Poll every 5–10 seconds."
            }
        },
        "/email-rental/orders/{uuid}/cancel": {
            "post": {
                "tags": [
                    "Email rental"
                ],
                "summary": "Cancel a rental (refund)",
                "operationId": "postEmailRentalOrdersUuidCancel",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "e5f6a7b8-…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "status": "canceled"
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/wa-ready/info": {
            "get": {
                "tags": [
                    "WhatsApp Ready numbers"
                ],
                "summary": "Countries, prices & stock",
                "operationId": "getWaReadyInfo",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "enabled": true,
                                        "countries": [
                                            {
                                                "iso": "ID",
                                                "name": "Indonesia",
                                                "price": 13200,
                                                "stock": 25
                                            }
                                        ]
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/wa-ready/orders": {
            "post": {
                "tags": [
                    "WhatsApp Ready numbers"
                ],
                "summary": "Buy a WhatsApp number",
                "operationId": "postWaReadyOrders",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "201": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order": {
                                            "order_uuid": "3b9d…",
                                            "phone": "+6285860348151",
                                            "country": "ID",
                                            "price": 13200,
                                            "status": "ready"
                                        }
                                    },
                                    "message": "Number purchased"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "country": {
                                        "type": "string",
                                        "description": "ISO 3166-1 alpha-2 from /wa-ready/info",
                                        "example": "ID"
                                    }
                                },
                                "required": [
                                    "country"
                                ]
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "country": {
                                        "type": "string",
                                        "description": "ISO 3166-1 alpha-2 from /wa-ready/info",
                                        "example": "ID"
                                    }
                                },
                                "required": [
                                    "country"
                                ]
                            }
                        }
                    }
                }
            },
            "get": {
                "tags": [
                    "WhatsApp Ready numbers"
                ],
                "summary": "List WhatsApp orders",
                "operationId": "getWaReadyOrders",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "orders": [
                                            {
                                                "order_uuid": "3b9d…",
                                                "phone": "+6285860348151",
                                                "status": "completed"
                                            }
                                        ]
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/wa-ready/orders/{uuid}": {
            "get": {
                "tags": [
                    "WhatsApp Ready numbers"
                ],
                "summary": "Get order status (poll for the code)",
                "operationId": "getWaReadyOrdersUuid",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "3b9d…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order": {
                                            "order_uuid": "3b9d…",
                                            "phone": "+6285860348151",
                                            "status": "code_sent",
                                            "latest_code": "482913",
                                            "can_confirm": true,
                                            "can_cancel": false,
                                            "can_dispute": true
                                        }
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Poll every 3–5 seconds while `waiting_code`. Always use `latest_code`. Allowed actions are given by the `can_*` flags."
            }
        },
        "/wa-ready/orders/{uuid}/request-code": {
            "post": {
                "tags": [
                    "WhatsApp Ready numbers"
                ],
                "summary": "Request the 6-digit code",
                "operationId": "postWaReadyOrdersUuidRequestCode",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "3b9d…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order": {
                                            "status": "waiting_code"
                                        }
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Start the \"link with phone number\" flow in WhatsApp first, then call this."
            }
        },
        "/wa-ready/orders/{uuid}/confirm": {
            "post": {
                "tags": [
                    "WhatsApp Ready numbers"
                ],
                "summary": "Confirm successful sign-in",
                "operationId": "postWaReadyOrdersUuidConfirm",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "3b9d…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order": {
                                            "status": "completed"
                                        }
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/wa-ready/orders/{uuid}/cancel": {
            "post": {
                "tags": [
                    "WhatsApp Ready numbers"
                ],
                "summary": "Cancel (refund)",
                "operationId": "postWaReadyOrdersUuidCancel",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "3b9d…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order": {
                                            "status": "canceled"
                                        }
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Only while `can_cancel` is true (before a code was received)."
            }
        },
        "/wa-ready/orders/{uuid}/dispute": {
            "post": {
                "tags": [
                    "WhatsApp Ready numbers"
                ],
                "summary": "File a complaint (refund)",
                "operationId": "postWaReadyOrdersUuidDispute",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "3b9d…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order": {
                                            "dispute_status": "pending"
                                        }
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "multipart/form-data, only while `can_dispute`. Approved → refunded; follow replies in the order `messages`.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "5–1000 characters",
                                        "example": "WhatsApp rejected the latest code"
                                    },
                                    "image": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Screenshot: jpg/png/webp, max 4 MB"
                                    }
                                },
                                "required": [
                                    "reason",
                                    "image"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/wa-ready/orders/{uuid}/message": {
            "post": {
                "tags": [
                    "WhatsApp Ready numbers"
                ],
                "summary": "Reply in the complaint thread",
                "operationId": "postWaReadyOrdersUuidMessage",
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "description": "order_uuid",
                        "schema": {
                            "type": "string"
                        },
                        "example": "3b9d…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "order": {
                                            "…": "…"
                                        }
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "Up to 1000 characters",
                                        "example": "Screenshot attached above"
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "body": {
                                        "type": "string",
                                        "description": "Up to 1000 characters",
                                        "example": "Screenshot attached above"
                                    }
                                },
                                "required": [
                                    "body"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/payment-methods": {
            "get": {
                "tags": [
                    "Deposits & transactions"
                ],
                "summary": "List payment methods",
                "operationId": "getPaymentMethods",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "id": 12,
                                            "name": "Qris Asia",
                                            "category_name": "Payment Gateway",
                                            "expiration_time": 5
                                        }
                                    ],
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/deposits": {
            "post": {
                "tags": [
                    "Deposits & transactions"
                ],
                "summary": "Create a deposit (IDR)",
                "operationId": "postDeposits",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uniqcode_tx": "TX…",
                                        "amount": 50000,
                                        "total_amount": 50123,
                                        "status": "pending",
                                        "qr_code_base64": "iVBOR…",
                                        "expires_at_iso": "2026-10-09T08:05:00+07:00"
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "description": "Returns the transaction with payment instructions (QR image as `qr_code_base64` or a `payment_url`). Poll GET /transactions/{uniqcode} for the status.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "amount": {
                                        "type": "integer",
                                        "description": "IDR, minimum 10000",
                                        "example": 50000
                                    },
                                    "method": {
                                        "type": "integer",
                                        "description": "Payment method id from /payment-methods",
                                        "example": 12
                                    }
                                },
                                "required": [
                                    "amount",
                                    "method"
                                ]
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "amount": {
                                        "type": "integer",
                                        "description": "IDR, minimum 10000",
                                        "example": 50000
                                    },
                                    "method": {
                                        "type": "integer",
                                        "description": "Payment method id from /payment-methods",
                                        "example": 12
                                    }
                                },
                                "required": [
                                    "amount",
                                    "method"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/deposits/crypto": {
            "post": {
                "tags": [
                    "Deposits & transactions"
                ],
                "summary": "Create a crypto deposit (USD)",
                "operationId": "postDepositsCrypto",
                "parameters": [
                    {
                        "$ref": "#/components/parameters/IdempotencyKey"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "checkout_url": "https://…"
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "amount": {
                                        "type": "number",
                                        "description": "USD, 1–10000",
                                        "example": 10
                                    }
                                },
                                "required": [
                                    "amount"
                                ]
                            }
                        },
                        "application/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "amount": {
                                        "type": "number",
                                        "description": "USD, 1–10000",
                                        "example": 10
                                    }
                                },
                                "required": [
                                    "amount"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/transactions": {
            "get": {
                "tags": [
                    "Deposits & transactions"
                ],
                "summary": "List deposits",
                "operationId": "getTransactions",
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "transactions": [
                                            {
                                                "uniqcode_tx": "TX…",
                                                "type": "deposit",
                                                "amount": 50000,
                                                "fee": 0,
                                                "total_amount": 50123,
                                                "status": "success",
                                                "status_label": "Success",
                                                "payment_method": {
                                                    "…": "…"
                                                },
                                                "payment_url": null,
                                                "created_at_iso": "2026-10-09T08:00:00+07:00"
                                            }
                                        ],
                                        "pagination": {
                                            "…": "…"
                                        }
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/transactions/{uniqcode}": {
            "get": {
                "tags": [
                    "Deposits & transactions"
                ],
                "summary": "Get one deposit",
                "operationId": "getTransactionsUniqcode",
                "parameters": [
                    {
                        "name": "uniqcode",
                        "in": "path",
                        "required": true,
                        "description": "`uniqcode_tx` from the deposit / transaction list",
                        "schema": {
                            "type": "string"
                        },
                        "example": "TX…"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Envelope"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uniqcode_tx": "TX…",
                                        "amount": 50000,
                                        "total_amount": 50123,
                                        "status": "pending",
                                        "expires_in_seconds": 290,
                                        "qr_code_base64": "iVBOR…",
                                        "payment_url": null
                                    },
                                    "message": "OK"
                                }
                            }
                        }
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "422": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "ApiKeyHeader": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key"
            },
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer"
            },
            "ApiKeyQuery": {
                "type": "apiKey",
                "in": "query",
                "name": "apikey"
            }
        },
        "parameters": {
            "IdempotencyKey": {
                "name": "Idempotency-Key",
                "in": "header",
                "required": false,
                "description": "Optional. Same key within 24 h replays the first response instead of charging again.",
                "schema": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 128
                }
            }
        },
        "schemas": {
            "Envelope": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    },
                    "message": {
                        "type": "string"
                    },
                    "data": {
                        "nullable": true
                    }
                }
            },
            "Error": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean",
                        "example": false
                    },
                    "message": {
                        "type": "string"
                    },
                    "error_code": {
                        "type": "string",
                        "enum": [
                            "unauthenticated",
                            "invalid_api_key",
                            "api_key_wrong_domain",
                            "validation_error",
                            "insufficient_balance",
                            "out_of_stock",
                            "service_unavailable",
                            "order_failed",
                            "cancel_not_allowed_yet",
                            "order_already_cancelled",
                            "provider_unavailable",
                            "upstream_error",
                            "idempotency_key_reused",
                            "order_not_found",
                            "not_found",
                            "product_unavailable",
                            "idempotency_in_progress",
                            "rate_limited",
                            "server_error"
                        ]
                    },
                    "errors": {
                        "type": "object",
                        "description": "Per-field messages (validation_error only)"
                    },
                    "request_id": {
                        "type": "string"
                    }
                }
            }
        },
        "responses": {
            "Error": {
                "description": "Error — branch on `error_code`",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/Error"
                        },
                        "example": {
                            "success": false,
                            "message": "Insufficient balance",
                            "error_code": "insufficient_balance",
                            "request_id": "6f1d…"
                        }
                    }
                }
            }
        }
    }
}