First OTP in five minutes
SDK, curl or MCP — same endpoints, same behavior whichever you pick.
TypeScript SDK
Typed client with automatic retries and idempotency key generation.
npm i @kolayotp/sdk
MCP server
Ready-made MCP integration so AI agents can send and verify OTPs.
npx @kolayotp/mcp
OpenAPI
Contract-tested schema, ready for client generation.
GET /api/v1/openapi.json
$ curl -X POST https://api.kolayotp.com/api/v1/otp/send \
-H "Authorization: Bearer kotp_live_..." \
-H "Content-Type: application/json" \
-H "idempotency-key: $(uuidgen)" \
-d '{"recipient":"+905551234567","locale":"tr"}'
{
"id": "otp_3kQ9fT2a",
"channel": "whatsapp",
"status": "sent",
"expires_at": "2026-09-11T09:51:00Z",
"attempts_left": 5
}import { KolayOTP } from "@kolayotp/sdk";
const kotp = new KolayOTP({ apiKey: process.env.KOTP_KEY });
const otp = await kotp.send({
recipient: "+905551234567",
locale: "tr",
// channel: "whatsapp" — omit to use routing config
});
const result = await kotp.verify({
id: otp.id,
code: "482913",
});
if (result.verified) {
// session.create(user)
}{
"mcpServers": {
"kolayotp": {
"command": "npx",
"args": ["-y", "@kolayotp/mcp"],
"env": {
"KOLAYOTP_API_KEY": "kotp_test_..."
}
}
}
}
# Tools exposed to the agent:
# otp_send otp_verify
# otp_resend otp_status
# balance_get| Endpoint | Purpose | Note |
|---|---|---|
| POST /otp/send | Send a code | channel optional; routing applies |
| POST /otp/verify | Verify a code | 5 attempts, 10-min TTL |
| POST /otp/resend | Resend | Cooldown applies, channel may change |
| GET /otp/{id} | Check status | Delivery and verification state |
| GET /balance | Balance | Includes per-channel usage |
SDK & MCP
The TypeScript SDK and MCP server use the same API endpoints. MCP configuration is in the tabs above.MCP demo →
Send your first OTP in five minutes.
No credit card. Start on a sandbox key and switch to live when you're ready.