Developer Portal
v1.0

Onay360
Developer API

Integrate your projects in minutes with our SMS verification API. Start building right away with a simple REST structure and practical documentation.

Get API Key

Authentication

API security uses the Bearer Token standard. You must send the Authorization header in every request.

You can also pass your API key as a query parameter: ?key=YOUR_API_KEY

Security Notice: Never expose your API key on the client side (frontend) or in public repositories (GitHub, etc.).

Header Method (Recommended)

Authorization:Bearer YOUR_API_KEY
Content-Type:application/json

URL Parameter Method

https://onay360.com/api/v1/services?key=YOUR_API_KEY

Response Format

All API endpoints return responses in a consistent JSON structure. This makes it easy to handle responses uniformly across your application.

Response Fields

FieldTypeDescription
successRequiredbooleanIndicates whether the request was successful
requestIdRequiredstringUnique identifier for tracking the request
timestampRequiredstringISO 8601 formatted response timestamp
dataobjectResponse payload (present on success)
errorobjectError details with code and message (present on failure)
JSON
{
  "success": true,
  "requestId": "c4f7d7f0-71f8-4e0d-9f71-87f26a3b3b21",
  "timestamp": "2026-03-28T10:15:30.000Z",
  "data": {
    "user": {
      "email": "user@example.com",
      "balance": 150.5,
      "currency": "TRY"
    }
  }
}

Usage Limits

The following protection rules are enforced to ensure fair usage, platform stability, and service continuity.

IP-Based Limit

HTTP 503

A maximum of 100 requests per second is allowed per IP address.

API Key Limit

HTTP 429

A maximum of 100 requests per second is allowed per API key.

Buy Number Endpoint Limit

HTTP 503

A maximum of 100 requests per second is allowed for number purchase requests.

Temporary Access Restriction

If a client hits limit thresholds 5 times within a 10-minute window, access is blocked for 10 minutes.

GET/api/v1/user/profile

User Profile

Returns account details including balance and profile information.

curl "https://onay360.com/api/v1/user/profile" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET/api/v1/services

Service List

Lists available services, supported countries and live prices.

curl "https://onay360.com/api/v1/services" \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/api/v1/user/buy

Buy Number

Purchases a temporary number for the selected service and country.

Parametreler

ParametreTipAçıklama
serviceZorunlustringService code (e.g. whatsapp)
countryZorunlustringCountry code (e.g. england)
curl -X POST "https://onay360.com/api/v1/user/buy" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"service": "whatsapp", "country": "england"}'
GET/api/v1/user/orders/{id}

Order Status

Checks the current status of an order. When the SMS code arrives, the sms_code field is filled in and status becomes "COMPLETED".

Parametreler

ParametreTipAçıklama
idZorunlustringOrder ID
curl "https://onay360.com/api/v1/user/orders/58321" \
  -H "Authorization: Bearer YOUR_API_KEY"
POST/api/v1/user/cancel

Cancel Order

Cancels a pending order and refunds the amount when eligible.

Parametreler

ParametreTipAçıklama
idZorunlustringOrder ID
curl -X POST "https://onay360.com/api/v1/user/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id": "58321"}'