API Documentation

Public SIM endpoints (no auth) and User OTP endpoints (JWT auth) in one place. Choose the section below to avoid mixing flows.

Public SIM API
User OTP API (JWT)
RESTful API
JSON Responses

Quick Start

Base URL for all Public SIM API requests

https://www.otpocket.app/api/public

No API key or authentication is required.

Guides

Common tasks using the Public SIM API

How to list available SIMs

Call the SIM listing endpoint and filter by status.

curl "https://www.otpocket.app/api/public/sims?status=active&limit=50"

How to read messages for a SIM

Use the SIM number (last 10 digits supported) to fetch messages.

curl "https://www.otpocket.app/api/public/sims/09123456789/messages?page=1&limit=20"

API Reference

Endpoint reference for the Public SIM API

List Public SIMs

Get a list of all available public SIM cards with their status and carrier information.

GET

Endpoint

https://www.otpocket.app/api/public/sims

Query Parameters

status

Filter by status: active, idle, or offline

carrier

Filter by carrier name (partial match)

limit

Number of results (default: 100, max: 500)

offset

Pagination offset (default: 0)

Example Request

curl "https://www.otpocket.app/api/public/sims?status=active&limit=50"

Example Response

{
  "success": true,
  "data": [
    {
      "number": "+639123456789",
      "carrier": "Smart",
      "status": "active",
      "device_id": "device-123",
      "device_name": "Device 1"
    }
  ],
  "pagination": {
    "limit": 50,
    "offset": 0,
    "total": 150,
    "has_more": true
  }
}

Rate Limiting (Public SIM API)

Limits may vary by endpoint

What to expect

  • When exceeded, you may receive 429 Too Many Requests
  • Implement retry with backoff for 429 responses

Important Notes (Public SIM API)

  • All timestamps are in ISO 8601 format (UTC)
  • Some endpoints accept phone numbers in different formats (last 10 digits matching may apply)
  • Only public SIMs are accessible through this API
  • Messages are returned in reverse chronological order (newest first)
  • Public SIM API is read-only

Error Handling

Common error response example (some endpoints may vary)

Error Response Format

{
  "success": false,
  "error": "Error type",
  "message": "Detailed error message"
}

HTTP Status Codes

200
Success
400
Bad Request (invalid parameters)
404
Not Found (SIM not found)
500
Internal Server Error
429
Too Many Requests (rate limit exceeded)
503
Service Unavailable (health check only)

Need Help?

Have questions or need assistance with the API?