GET POST

Phone detail

/phone-detail

Get phone number data from the phone_numbers table. GET (query) or POST (JSON body). found is whether the row exists; status is the stored phone status.

Parameters
NameInRequiredDescription
tokenquery/body/headerrequiredAPI token
phonequery/bodyrequiredWith or without +; lookup uses digits only
Example request (GET)
GET {{BASE}}/phone-detail?token=YOUR_TOKEN&phone=628123456789
Example request (POST)
POST {{BASE}}/phone-detail
Content-Type: application/json

{
  "token": "YOUR_TOKEN",
  "phone": "628123456789"
}
Example response
{
  "phone": "628123456789",
  "country": "ID",
  "user_id": "123456",
  "mail": "[email protected]",
  "price": 15000,
  "status": "active",
  "created_date": "2026-08-22",
  "found": true
}
POST

Phone numbers

/phone-numbers

Insert or update a phone number. Only fields you send are updated.

Parameters
NameInRequiredDescription
tokenbody/query/headerrequiredAPI token
phonebodyrequiredWith or without +; saved as digits only (PK)
countrybodyoptionalCountry code
user_idbodyoptionalUser ID
mailbodyoptionalEmail
pricebodyoptionalPrice / amount
statusbodyoptionalPhone status (text)
created_datebodyoptionalDate YYYY-MM-DD; if sent, overwrites the stored date
Example request
POST {{BASE}}/phone-numbers
Content-Type: application/json

{
  "token": "YOUR_TOKEN",
  "phone": "628123456789",
  "country": "ID",
  "user_id": "123456",
  "mail": "[email protected]",
  "price": 15000,
  "status": "active",
  "created_date": "2026-08-22"
}
Example response
{
  "received": true,
  "data": {
    "phone": "628123456789",
    "country": "ID",
    "user_id": "123456",
    "mail": "[email protected]",
    "price": 15000,
    "status": "active",
    "created_date": "2026-08-22"
  }
}
GET POST

Phone stats

/phone-stats

Summary of the last 7 created_date values. For each country: statuses and count per status, plus that day's total. Overall total is a live counter (phone_numbers_meta), not COUNT(*). Run phone_numbers.sql in Supabase so the RPC and counter triggers exist.

Parameters
NameInRequiredDescription
tokenquery/body/headerrequiredAPI token
Example request (GET)
GET {{BASE}}/phone-stats?token=YOUR_TOKEN
Example request (POST)
POST {{BASE}}/phone-stats
Content-Type: application/json

{
  "token": "YOUR_TOKEN"
}
Example response
{
  "total": 15420,
  "dates": [
    {
      "created_date": "2026-09-02",
      "total": 412,
      "country": {
        "ID": {
          "total": 250,
          "status": {
            "active": 180,
            "sold": 70
          }
        },
        "US": {
          "total": 162,
          "status": {
            "active": 120,
            "sold": 30,
            "banned": 12
          }
        }
      }
    },
    {
      "created_date": "2026-09-01",
      "total": 380,
      "country": {
        "ID": {
          "total": 380,
          "status": {
            "active": 250,
            "sold": 130
          }
        }
      }
    }
  ]
}
POST

Delete phone

/dell-phone

Delete a phone number from the phone_numbers table.

Parameters
NameInRequiredDescription
tokenbodyrequiredAPI token
phonebodyrequiredPhone number
Example request
POST {{BASE}}/dell-phone
Content-Type: application/json

{
  "token": "YOUR_TOKEN",
  "phone": "628123456789"
}
Example response
{
  "phone": "628123456789",
  "status": true
}
POST

Userbot

/userbot

Insert or update a userbot in the userbot table. If the row already exists, username is updated only when it actually changes, and update_date is set to today's date (Asia/Jakarta). Identical data is ignored, so update_date stays the same.

Parameters
NameInRequiredDescription
tokenbody/query/headerrequiredAPI token
devicebodyrequiredDevice name
user_idbodyrequiredTelegram user id
usernamebodyoptionalTelegram username
Example request
POST {{BASE}}/userbot
Content-Type: application/json

{
  "token": "YOUR_TOKEN",
  "device": "HP-01",
  "user_id": "123456789",
  "username": "linzyi"
}
Example response
{
  "received": true,
  "data": {
    "device": "HP-01",
    "user_id": "123456789",
    "username": "linzyi",
    "banned": false,
    "api_key": "a1b2c3d4...",
    "created_date": "2026-08-22",
    "update_date": "2026-08-27",
    "created": true
  }
}
POST

Delete user

/dell-user

Delete a userbot row from the userbot table by device + user_id.

Parameters
NameInRequiredDescription
tokenbodyrequiredAPI token
devicebodyrequiredDevice name
user_idbodyrequiredTelegram user id
Example request
POST {{BASE}}/dell-user
Content-Type: application/json

{
  "token": "YOUR_TOKEN",
  "device": "HP-01",
  "user_id": "123456789"
}
Example response
{
  "device": "HP-01",
  "user_id": "123456789",
  "status": true
}