API Documentation

Base URL: https://zerotp.com

Authentication

Include the X-API-KEY header in every request.

GET/api/v1/services

List of apps/services with price and stock. (public)

curl https://zerotp.com/api/v1/services
POST/api/v1/orders

Create an order. JSON body: application_id (required), operator (normal|promo|special), custom_user_id (optional).

curl -X POST https://zerotp.com/api/v1/orders \
  -H 'X-API-KEY: YOUR_KEY' -H 'Content-Type: application/json' \
  -d '{"application_id": 1, "operator": "normal"}'
Response contains order_id, phone_number, expires_at.
GET/api/v1/orders/{order_id}

Check order status & get the OTP (otp_code, sms_text).

curl https://zerotp.com/api/v1/orders/123 -H 'X-API-KEY: YOUR_KEY'
POST/api/v1/orders/{order_id}/cancel   /   /finish

Cancel (refunds balance if no SMS yet) or mark as finished.

curl -X POST https://zerotp.com/api/v1/orders/123/cancel -H 'X-API-KEY: YOUR_KEY'
Callback (Webhook)

If callbacks are enabled under the API & Callback menu, the system will POST JSON to your URL when an OTP is received:

{
  "order_id": 123,
  "phone_number": "628xxx",
  "otp_code": "123456",
  "sms_text": "Your code is 123456",
  "status": "completed"
}
Authentication

The Modempool app (.exe) uses the X-AGENT-KEY header (reseller agent key).

Sign up / enable yourself as a reseller to get an agent key.

POST/api/modem/sync

Register/sync a list of modems. Idempotent per modem uid.

curl -X POST https://zerotp.com/api/modem/sync \
  -H 'X-AGENT-KEY: YOUR_AGENT_KEY' -H 'Content-Type: application/json' \
  -d '{"modems":[{"uid":"COM3","phone_number":"628111","provider":"Telkomsel","signal":80,"mapping":"normal"}]}'
POST/api/modem/heartbeat

Send periodic (batch) status so modems are considered online and orderable.

curl -X POST https://zerotp.com/api/modem/heartbeat \
  -H 'X-AGENT-KEY: YOUR_AGENT_KEY' -H 'Content-Type: application/json' \
  -d '{"modems":[{"uid":"COM3","signal":75,"can_order":true}]}'
POST/api/modem/inbound-sms

Report an incoming SMS. The system automatically matches it to a pending order and extracts the OTP.

curl -X POST https://zerotp.com/api/modem/inbound-sms \
  -H 'X-AGENT-KEY: YOUR_AGENT_KEY' -H 'Content-Type: application/json' \
  -d '{"uid":"COM3","phone_number":"628111","from":"WhatsApp","text":"Your code is 123-456"}'
Response: matched, order_id, otp. The 70% reseller earning is credited automatically when an order is matched.