Quickstart
1. Get an API key
Create a project in the dashboard.
Every project gets an API key in the format mm_live_..., shown once on creation and available any time under Project Settings.
2. Send an OTP
await fetch('https://api.minimoth.dev/v1/otp/send', {
method: 'POST',
headers: { 'X-Api-Key': 'mm_live_...', 'Content-Type': 'application/json' },
body: JSON.stringify({ phone: '+919876543210' }),
}) 3. Verify the code
const res = await fetch('https://api.minimoth.dev/v1/otp/verify', {
method: 'POST',
headers: { 'X-Api-Key': 'mm_live_...', 'Content-Type': 'application/json' },
body: JSON.stringify({ phone: '+919876543210', code: '123456' }),
})
const { access_token, refresh_token, expires_at } = await res.json()
// expires_at is the access_token expiry (ISO 8601) access_token is valid for 15 minutes.
refresh_token is valid for your project's configured refresh window (default 10 days, max 30 days). See Sessions for how to refresh and validate tokens.