PhoneCall AI API

v1.0

SMS OTP Verification API

Send verification codes via SMS using Cambodia's SIM infrastructure. Register, reset password, or login with phone verification.

Base URL
https://backend-lime-three-82.vercel.app
Note: Testing is available for Cellcard numbers only at this time. Need Smart or Metfone support? Contact admin to add more carriers.

Health Check

GET /api/health Public
Check if the API is running

Try it

Send OTP

Generate and send a 6-digit verification code to a phone number via SMS.

POST /api/otp/send Public
Send verification code to phone number

Request Body

FieldTypeRequiredDescription
phone_number string required Phone with country code (e.g., +85512345678)
purpose string optional register, reset_password, or login (default: register)
site_name string optional Your website/app name (included in SMS)
// Request
POST /api/otp/send
{
    "phone_number": "+85512345678",
    "purpose": "register",
    "site_name": "MyShop"
}

// Success Response
{
    "success": true,
    "message": "OTP sent",
    "expires_in": 300
}

// Error Response
{
    "error": "Rate limit exceeded"
}

Try it

Phone: +855

Verify OTP

Verify the 6-digit code sent to the phone number.

POST /api/otp/verify Public
Verify the OTP code

Request Body

FieldTypeRequiredDescription
phone_number string required Phone number used in send request
otp_code string required 6-digit verification code
purpose string optional Must match the purpose used in send (default: register)
// Request
POST /api/otp/verify
{
    "phone_number": "+85512345678",
    "otp_code": "123456",
    "purpose": "register"
}

// Success Response
{
    "success": true,
    "message": "Phone verified",
    "purpose": "register",
    "site_name": "MyShop"
}

Try it

Status Codes

200 Success
400 Bad request / Invalid input
401 Unauthorized (invalid token)
429 Rate limit exceeded
500 Server error

Rate Limits

To prevent abuse, the following rate limits apply:

Global: 3 requests per 15 minutes
Login: 5 attempts per 15 minutes
OTP Send: 3 requests per minute
Per Phone: 5 OTP requests per hour

Need more requests? Contact admin to increase your limits.

Code Examples

Integrate with your favorite language.

// Node.js - Install: npm install axios
const axios = require('axios');

const API = 'https://backend-lime-three-82.vercel.app';

// Send OTP
async function sendOtp(phone) {
    const { data } = await axios.post(API + '/api/otp/send', {
        phone_number: phone,
        purpose: 'register',
        site_name: 'MyApp'
    });
    return data;
}

// Verify OTP
async function verifyOtp(phone, code) {
    const { data } = await axios.post(API + '/api/otp/verify', {
        phone_number: phone,
        otp_code: code,
        purpose: 'register'
    });
    return data;
}

// Usage
sendOtp('+85512345678').then(console.log);
verifyOtp('+85512345678', '123456').then(console.log);