Base URL: `https://api.minimoth.dev`. Every `/v1/*` request needs your project's API key in the `X-Api-Key` header — see [Authentication](/docs/authentication) for how to send it, and for the full rate-limit table.

## OTP

| Method | Endpoint | Description | Details |
|---|---|---|---|
| <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-saffron">POST</code> | <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-ink/80">/v1/otp/send</code> | Send an OTP to a phone number. Tries WhatsApp first, falls back to SMS automatically. | <a href="/docs/quickstart#send-an-otp-raw" className="text-saffron-dim hover:text-saffron underline underline-offset-2 decoration-saffron-dim/50 hover:decoration-saffron transition-colors">Quickstart&nbsp;→</a> |
| <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-saffron">GET</code> | <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-ink/80">/v1/otp/status/:otp_id</code> | Check delivery status of a previously sent OTP. Optional — you can verify directly without polling this first. | <a href="/docs/quickstart#check-delivery-status-optional" className="text-saffron-dim hover:text-saffron underline underline-offset-2 decoration-saffron-dim/50 hover:decoration-saffron transition-colors">Quickstart&nbsp;→</a> |
| <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-saffron">POST</code> | <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-ink/80">/v1/otp/verify</code> | Verify the code the user entered. Returns an access token and refresh token on success. | <a href="/docs/quickstart#verify-the-code" className="text-saffron-dim hover:text-saffron underline underline-offset-2 decoration-saffron-dim/50 hover:decoration-saffron transition-colors">Quickstart&nbsp;→</a> |

## Session

| Method | Endpoint | Description | Details |
|---|---|---|---|
| <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-saffron">POST</code> | <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-ink/80">/v1/session/validate</code> | Check whether an access token is still valid. Fast enough to call on every authenticated request. | <a href="/docs/sessions#validate-a-session" className="text-saffron-dim hover:text-saffron underline underline-offset-2 decoration-saffron-dim/50 hover:decoration-saffron transition-colors">Sessions&nbsp;→</a> |
| <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-saffron">POST</code> | <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-ink/80">/v1/session/refresh</code> | Exchange a refresh token for a new access + refresh token pair. Always replace both. | <a href="/docs/sessions#refresh-a-session" className="text-saffron-dim hover:text-saffron underline underline-offset-2 decoration-saffron-dim/50 hover:decoration-saffron transition-colors">Sessions&nbsp;→</a> |
| <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-saffron">POST</code> | <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-ink/80">/v1/session/logout</code> | Revoke a session's refresh token and its current access token. | <a href="/docs/sessions#log-out" className="text-saffron-dim hover:text-saffron underline underline-offset-2 decoration-saffron-dim/50 hover:decoration-saffron transition-colors">Sessions&nbsp;→</a> |

## Node.js SDK

[@minimoth/sdk-node](/docs/sdk-nodejs) wraps every endpoint above — `mm.otp.send()`, `mm.otp.verify()`, `mm.session.validate()`, and the rest — and handles the parts you'd otherwise write yourself: it attaches your API key to every request, **silently refreshes an expired session for you (`safeValidate`)**, and lets you configure where refresh tokens are stored (in-memory by default, Redis-backed for multi-replica deployments). Validation itself is configurable too — from `instant` (local JWT check, zero network round trip) to `strict` (revocation checked on every call) with cached in-between modes — see [validateMode](/docs/sdk-nodejs#validatemode) for the full comparison.

## Identity

Recognise the same phone number across logins. Both lookup and delete are off by default per project — turn them on from the project's Identity settings card in the dashboard first.

| Method | Endpoint | Description | Details |
|---|---|---|---|
| <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-saffron">GET</code> | <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-ink/80">/v1/identity/:id</code> | Look up an identity by its id. | <a href="/docs/identity#looking-up-an-identity" className="text-saffron-dim hover:text-saffron underline underline-offset-2 decoration-saffron-dim/50 hover:decoration-saffron transition-colors">Identity&nbsp;→</a> |
| <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-saffron">GET</code> | <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-ink/80">/v1/identity?phone=</code> | Look up an identity by phone number (exact match). | <a href="/docs/identity#looking-up-an-identity" className="text-saffron-dim hover:text-saffron underline underline-offset-2 decoration-saffron-dim/50 hover:decoration-saffron transition-colors">Identity&nbsp;→</a> |
| <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-saffron">DELETE</code> | <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-ink/80">/v1/identity/:id</code> | Hard-delete an identity and revoke every session tied to it. | <a href="/docs/identity#deleting-an-identity" className="text-saffron-dim hover:text-saffron underline underline-offset-2 decoration-saffron-dim/50 hover:decoration-saffron transition-colors">Identity&nbsp;→</a> |

## Public key

| Method | Endpoint | Description | Details |
|---|---|---|---|
| <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-saffron">GET</code> | <code className="font-mono text-xs bg-white/5 border border-white/10 rounded px-1.5 py-0.5 text-ink/80">/.well-known/jwks.json</code> | MiniMoth's public signing keys, for verifying access tokens locally without a network round trip per request. No API key needed. | <a href="/docs/sessions#validation-methods" className="text-saffron-dim hover:text-saffron underline underline-offset-2 decoration-saffron-dim/50 hover:decoration-saffron transition-colors">Sessions&nbsp;→</a> |

---

See [Error Codes](/docs/error-codes) for what each endpoint returns on failure, or [Recipes](/docs/recipes) for common integration patterns.

---

Full documentation index: https://minimoth.dev/llms.txt
