MockSMS is a full-stack developer tool that simulates SMS delivery β just like Mailhog or Mailtrap do for emails. No real SMS APIs are used β all messages are stored and displayed in a developer dashboard, with support for sending OTPs and verifying them.
π« No actual SMS is sent. Use it for development & testing environments.
β οΈ Hosted on free Render + Vercel tiers. May take a few seconds to wake up on first request.
- Visit the Live Dashboard
- Create an account and log in
- A default project will be created automatically
- Go to "Projects β API Keys" to view your API key
- Use that API key to call the public APIs from your apps (see below)
- View all messages (SMS + OTPs) in your dashboard for each project
- β Simulated SMS inbox per project
- β JWT-based auth with refresh + access token
- β REST APIs for sending generic SMS, OTP, and verifying OTP
- β Messages auto-expire after 24 hours
- β Manual delete support
- β Modern developer UI with project & key management
Use your API key in headers to test SMS flows from your own apps.
π Base URL:
https://mock-sms-backend.onrender.com/api
POST /message/send
x-api-key: your_project_api_key
Content-Type: application/json{
"from": "sender_phone_number",
"to": "recipient_phone_number",
"body": "Message content here",
"metadata": {
"custom": "optional fields"
}
}POST /message/send-otp
x-api-key: your_project_api_key
Content-Type: application/json{
"phone": "recipient_phone_number",
"purpose": "login_verification" // optional
}π¬ The OTP will be saved as a message in your MockSMS inbox.
POST /message/verify-otp
x-api-key: your_project_api_key
Content-Type: application/json{
"phone": "recipient_phone_number",
"code": "812704"
}- User login gives access token (used for API calls) and refresh token (stored in httpOnly cookie).
- APIs like
/projectsand/message/:idrequire login. - External SMS APIs use only the API key, no login required.
mocksms/
βββ client/ # Vite + React frontend
βββ server/ # Node.js + Express backend
git clone [https://github.com/your-username/mocksms.git](https://github.com/aditya241104/Mock-SMS/tree/main)
cd mocksmscd clientVITE_BASE_URL=https://mock-sms-backend.onrender.com/apinpm installnpm run devcd serverPORT=
MONGO_URI=
JWT_ACCESS_SECRET=
JWT_REFRESH_SECRET=
JWT_ACCESS_EXPIRE=
JWT_REFRESH_EXPIRE=npm install# Using nodemon
nodemon index.js
# Or plain node
node index.js| Function | Method | Route | Auth Required | Notes |
|---|---|---|---|---|
| Register/Login | POST | /auth |
β | Auth via JWT |
| Get Projects | GET | /project |
β | Shows your projects |
| Create Project | POST | /project |
β | Creates project + API key |
| Delete Project | DELETE | /project/:id |
β | Deletes project & messages |
| Send Message | POST | /message/send |
β (API key) | External SMS API |
| Send OTP | POST | /message/send-otp |
β (API key) | External OTP API |
| Verify OTP | POST | /message/verify-otp |
β (API key) | External OTP verification |
| Delete Message | DELETE | /message/:id |
β | Manual deletion |
- β³ Auto-deleted after 24 hours
- ποΈ Manual deletion supported from the dashboard
- Real-time updates via WebSocket
- OTP attempt rate limiting
- Project-based webhooks
- OTP delivery simulation timeline
- Multi-user collaboration per project
- Frontend: React + Vite + TailwindCSS
- Backend: Node.js + Express
- DB: MongoDB (Mongoose)
- Auth: JWT (access + refresh token)
- Deployment: Render (backend) + Vercel (frontend)