All endpoints are served from https://maskr.space. Authenticated endpoints require a valid session cookie or bearer token obtained via the authentication flow. Request and response bodies are JSON unless otherwise noted.
Authentication
| Endpoint | Method | Description |
|---|
/api/auth/[...nextauth] | GET / POST | NextAuth.js handler — OAuth sign-in, sign-out, and session callbacks |
/api/account/create | POST | Create a new Maskr account and associate it with the current session |
/api/session | POST | Check session status and retrieve the public key for the current user |
/api/webauthn/* | POST | WebAuthn passkey registration and authentication endpoints |
Nostr Operations
| Endpoint | Method | Description |
|---|
/api/nostr/keys | POST | Retrieve existing Nostr keys or generate a new key pair for the session |
/api/nostr/sign | POST | Server-side event signing for passkey users (decrypts nsec and signs the provided event object) |
/api/nostr/encrypt | POST | Encrypt a message using NIP-04 (shared-secret ECDH + AES-256-CBC) |
/api/nostr/decrypt | POST | Decrypt a NIP-04 encrypted message for the current user |
Content
| Endpoint | Method | Description |
|---|
/api/drafts | POST | Create, retrieve, update, or delete post drafts stored server-side |
/api/scheduled-posts | POST | Schedule a post to be published to Nostr relays at a future time |
/api/media | POST | Upload an image or file; returns a public URL for embedding in posts |
/api/link-preview | GET | Fetch Open Graph metadata for a URL to render inline link previews |
Social & Discovery
| Endpoint | Method | Description |
|---|
/api/profile/[id] | GET | Retrieve a cached Nostr profile (kind 0 metadata) by public key or NIP-05 identifier |
/api/search | POST | Global search across posts, profiles, articles, and hashtags |
/api/trending/hashtags | POST | Return currently trending hashtags based on recent relay activity |
/api/suggested-follows | POST | Return a list of suggested accounts to follow based on the current user's network |
Social Graph
| Endpoint | Method | Description |
|---|
/api/followers/[pubkey] | GET | Get followers for a given public key |
/api/following/[pubkey] | GET | Get following list for a given public key |
/api/mutuals/[pubkey] | GET | Get mutual followers for a given public key |
/api/following-feed | GET | Fetch the following feed for the current user |
Media & Files
| Endpoint | Method | Description |
|---|
/api/blossom/record | POST | Record a Blossom file upload operation |
/api/blossom/verify | POST | Verify a Blossom media upload |
/api/blossom/tier | GET | Get the storage tier for the current user |
AI & Translation
| Endpoint | Method | Description |
|---|
/api/ai/generate-image | POST | Generate an image from a text prompt (OpenAI DALL-E) |
/api/ai/suggest-reply | POST | Get AI-suggested replies for a given post |
/api/ai/summarize | POST | Summarise a post or article |
/api/translate | POST | Translate content between languages |
Lightning
| Endpoint | Method | Description |
|---|
/api/lightning/configure | POST | Set a Lightning address for the current user's profile |
/api/lightning/nwc | GET | Check Nostr Wallet Connect status |
/api/lightning/nwc/pay | POST | Pay a Lightning invoice via NWC (coming soon) |
Identity
| Endpoint | Method | Description |
|---|
/api/nip05/register | POST | Register a NIP-05 identifier (e.g. handle@maskr.space) for the current user's public key |
/api/nip05/check | GET | Verify whether a NIP-05 identifier is available or already registered |
/.well-known/nostr.json | GET | NIP-05 resolution endpoint — returns the public key for a given ?name= query parameter |