Reseller API — Reference

Note: This reference is written for API users (resellers and integrators). Each endpoint includes explanations, authentication requirements, sample requests, and example responses.

This comprehensive API documentation provides resellers and integrators with everything needed to implement SMS verification services. All responses are in JSON format.

Authentication

All reseller endpoints require a Bearer token in the Authorization header. You can generate API tokens from your account dashboard.

Authorization: Bearer YOUR_API_TOKEN_HERE
Accept: application/json
Content-Type: application/json

Quick links:

Common Response Format

Errors use a normalized structure so your integration can switch on code reliably. All error responses follow this pattern:

{
  "success": false,
  "code": "no_numbers",
  "message": "No numbers available for the selected service and country"
}

Endpoints

GET /api/v1/resell/price?service=&country=

Get base and sell price for a given service and country. Use this to estimate cost before placing a chargeable order.

Parameters (query): service (string), country (int)

Example request:

curl -s -X GET "https://proxnum.com/api/v1/resell/price?service=ig&country=6" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"

Success response:

{
  "country": "6",
  "service": "ig",
  "base_price": 0.0334,
  "sell_price": 0.1114892
}

POST /api/v1/resell/virtual/buy

Buy a temporary (virtual) number. The call will attempt to allocate a number and charge your account.

Body (JSON): {"service":"ig","country":6}

Example request:

curl -s -X POST "https://proxnum.com/api/v1/resell/virtual/buy" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"service":"ig","country":6}'

Success response (normalized):

{
  "success": true,
  "activation": {
    "id": 737,
    "phone": "62895406203932",
    "activation_id": "4390520873",
    "msg": "Waiting Sms",
    "date_created": "2025-11-08 21:50:34",
    "amount_paid": 0.111489,
    "status": 1
  }
}

Common error codes:

{
  "success": false,
  "code": "no_numbers",
  "message": "No numbers available for this service in the selected country"
}

{
  "success": false,
  "code": "insufficient_balance",
  "message": "Not enough balance to place the order"
}

GET /api/v1/resell/virtual/{id}/status

Check the status of an activation. {id} accepts either the local DB id or the activation id string returned by purchase.

Example request:

curl -s -X GET "https://proxnum.com/api/v1/resell/virtual/4390520873/status" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"

Success (when a code is available):

{
  "success": true,
  "status": "completed",
  "code": "1234",
  "activation": { "id": 737, "phone": "628...", "activation_id": "4390520873" }
}

POST /api/v1/resell/virtual/resend

Request a resend/reactivation for an activation. Use the activation id string in the body.

Body: {"activation_id":"4390520873"}

curl -s -X POST "https://proxnum.com/api/v1/resell/virtual/resend" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"activation_id":"4390520873"}'

Response (accepted):

{
  "success": true,
  "message": "Resend requested; new activation created",
  "activation": { "id": 738, "activation_id": "4390520874", "phone": "628..." }
}

POST /api/v1/resell/virtual/cancel

Request cancellation and refund for an activation. Our server evaluates whether the activation is refundable and returns a normalized result.

Body: {"activation_id":"4390520873"}

curl -s -X POST "https://proxnum.com/api/v1/resell/virtual/cancel" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"activation_id":"4390520873"}'

Accepted:

{
  "success": true,
  "code": "cancel_accepted",
  "message": "Cancellation accepted, refund processed"
}

Rejected:

{
  "success": false,
  "code": "cancel_rejected",
  "message": "Cancellation rejected — activation already completed or not refundable"
}

GET /api/v1/resell/activations

List activations for the authenticated reseller (paginated). Supports page and per_page query parameters.

curl -s -X GET "https://proxnum.com/api/v1/resell/activations?page=1&per_page=25" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"

POST /api/v1/resell/rental/buy

Buy a rental. Time is expressed in hours. Example: time=3 means a 3-hour rental.

Body: {"service":"ig","country":6,"time":3}

curl -s -X POST "https://proxnum.com/api/v1/resell/rental/buy" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"service":"ig","country":6,"time":3}'

Success response:

{
  "success": true,
  "rental": {
    "id": 12,
    "phone": "62890009999",
    "rental_id": "RENT123",
    "expiry_date": "2025-11-09T03:00:00Z",
    "amount_paid": 3.34
  }
}

GET /api/v1/rental/availability?service=&country=&time=

Check availability and price for rentals for the requested duration (hours).

curl -s -X GET "https://proxnum.com/api/v1/rental/availability?service=ig&country=6&time=3" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"

Response:

{
  "services": {
    "ig": { "retail_cost": 1.00, "sell_price": 3.34, "available": 25 }
  }
}

POST /api/v1/resell/rental/cancel

Cancel a rental and request refund where applicable. Body: {"rental_id":"RENT123"}

curl -s -X POST "https://proxnum.com/api/v1/resell/rental/cancel" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"rental_id":"RENT123"}'

Normalized acceptance/rejection responses follow the same pattern as activations.


POST /api/v1/rental/{id}/extend

Extend an active rental lease. Body: {"time":3} (hours). Response contains charged amount and new expiry date when accepted.

curl -s -X POST "https://proxnum.com/api/v1/rental/12/extend" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"time":3}'

GET /api/v1/rentals/{rental_id}/messages

Fetch SMS messages stored for a rental. This endpoint is authenticated (use Bearer token) and only returns messages for rentals owned by the token owner.

Query parameters: page (int), per_page (int)

Example request:

curl -s -X GET "https://proxnum.com/api/v1/rentals/RENT123/messages?page=1&per_page=25" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"

Sample success response:

{
  "total": 2,
  "page": 1,
  "per_page": 25,
  "data": [
    { "id": 12, "date": "2025-11-09T02:12:34Z", "sender": "+12025550123", "msg": "Your code is 1234" },
    { "id": 11, "date": "2025-11-09T02:00:01Z", "sender": "+12025550123", "msg": "Welcome" }
  ]
}

Implementation Notes

  • All charging operations are idempotent per-order where possible; check the returned order or transaction fields for canonical identifiers.
  • Use the price endpoint to dry-run costs before placing chargeable requests.
  • Normalized error codes you may see include: no_numbers, insufficient_balance, service_unavailable, cancel_rejected, rental_unavailable.
Best Practices:
  • Always handle both success and error responses in your integration
  • Implement proper error handling for network timeouts
  • Cache country and service lists to reduce API calls
  • Use webhooks where available for real-time status updates

Last updated: 2025-12-19 14:51:56 — You may request improvements to our API documentation, or report issues within the api by sending email to [email protected].