MOiN API Documentation
Build integrations with the privacy-focused social platform. No tracking, no algorithms. Just a clean, developer-friendly API.
MOiN is a privacy-first social media platform with chronological feeds and credit-based premium features. This documentation covers everything you need to integrate with our API.
Authentication
Passwordless OTP login, JWT cookies, CSRF tokens
Posts
Create, read, edit, delete posts with media and polls
Real-time
Server-Sent Events for live feed updates and notifications
Credits
Credit system, premium features, payments via Stripe
Profiles
User profiles, avatars, followers, search
Rate Limits
Understand request limits and best practices
Quick Start
Get up and running with the MOiN API in minutes.
Create an account
Sign up at moin.net to get started. You need an active account to use authenticated endpoints. Registration may be temporarily closed, so check GET /api/v1/auth/registration-status before building a sign-up flow.
Authenticate via OTP
Request a one-time password, then verify it to receive your session cookie.
# Step 1: Request OTP
curl -X POST https://moin.net/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com"}'
# Step 2: Verify OTP (check your email for the 6-digit code)
curl -X POST https://moin.net/api/v1/auth/login/verify \
-H "Content-Type: application/json" \
-c cookies.txt \
-d '{"email": "you@example.com", "code": "123456"}'
// Step 1: Request OTP
await fetch('https://moin.net/api/v1/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({ email: 'you@example.com' })
});
// Step 2: Verify OTP (check your email for the 6-digit code)
const res = await fetch('https://moin.net/api/v1/auth/login/verify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
credentials: 'include',
body: JSON.stringify({ email: 'you@example.com', code: '123456' })
});
const { user } = await res.json();
Make your first API call
Fetch your profile to confirm authentication is working.
curl https://moin.net/api/v1/me -b cookies.txt
const me = await fetch('https://moin.net/api/v1/me', {
credentials: 'include'
}).then(r => r.json());
Create your first post
curl -X POST https://moin.net/api/v1/posts \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
-b cookies.txt \
-d '{"body": "Hello from the API!"}'
await fetch('https://moin.net/api/v1/posts', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': getCsrfToken()
},
credentials: 'include',
body: JSON.stringify({ body: 'Hello from the API!' })
});
Base URL
https://moin.net/api/v1All API endpoints are prefixed with /api/v1. Responses are JSON (application/json). Request bodies should use Content-Type: application/json except for file uploads which use multipart/form-data.
The API is currently at version 1. Breaking changes will be introduced under a new version prefix (e.g. /api/v2).
Authentication Overview
MOiN uses passwordless OTP authentication. There are no API keys, and no OAuth flow is required for API access. Authentication works via cookie-based JWT sessions, or via a bearer token for non-browser clients.
How it works
- Send your email to the login endpoint, and a 6-digit code is emailed to you
- Submit the code to the verify endpoint, which sets a JWT as an
HttpOnlycookie and also returns it astokenin the response body - Include the cookie in subsequent requests (automatic in browsers with
credentials: 'include') - When authenticating via cookie, include a
X-CSRF-Tokenheader for all state-changing requests (POST, PATCH, DELETE)
Bearer tokens (non-browser clients)
Native apps, scripts, and server-side clients can skip cookies entirely: the login verify response includes the JWT as token. Send it on every request as an Authorization header:
curl https://moin.net/api/v1/me \
-H "Authorization: Bearer YOUR_TOKEN"CSRF tokens protect cookie-based sessions against cross-site request forgery. Requests authenticated purely via Authorization: Bearer (without the session cookie) do not need a CSRF header. Treat the token like a password. It is long-lived until you log out.
Cookie details
| Property | Value |
|---|---|
| Name | moin-auth-token |
| HttpOnly | true (not accessible via JavaScript) |
| Secure | true (HTTPS only) |
| SameSite | Strict |
| Max-Age | 10 years (sessions are long-lived; they end on logout or server-side revocation, and each account keeps at most 10 active sessions, with the oldest revoked beyond that) |
Registration Status
Check whether new account registration is currently open.
{ "enabled": true }Register
Create a new account. An OTP code will be sent to the provided email for verification.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Required | 3-15 characters, alphanumeric and underscore only |
| string | Required | Valid email address | |
| displayName | string | Required | 1-25 characters |
| bio | string | Optional | Max 200 characters, up to 3 lines |
| browserLanguages | string[] | Optional | Browser language preferences for content localization |
Response
{
"user": { ... },
"email": "y***@example.com",
"expiresAt": "2026-01-15T10:05:00.000Z",
"message": "Account created. We've emailed a verification code to y***@example.com.",
"retryAfterSeconds": 600
}The response includes the created user object. Registration checks email availability directly: if the address is already registered you receive an explicit Email already in use error. (The login and recovery endpoints, in contrast, always return the same response whether or not an account exists.) Emails are accepted from a curated allowlist of common TLDs; exotic TLDs are rejected. Registration may also be temporarily closed. Check GET /api/v1/auth/registration-status first, otherwise this endpoint returns 403.
Login (OTP Flow)
Authentication is a two-step process: request an OTP code, then verify it.
Step 1: Request OTP
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Required | Your account email address |
{
"email": "y***@example.com",
"expiresAt": "2026-01-15T10:05:00.000Z",
"message": "If this email is registered, a one-time passcode has been sent to y***@example.com.",
"retryAfterSeconds": 600,
"requiresTwoFactor": false
}Step 2: Verify OTP
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Required | Same email from step 1 | |
| code | string | Required | 6-digit OTP from your email |
| twoFactorCode | string | Optional | TOTP code if 2FA is enabled |
On success, the server sets an HttpOnly cookie and returns the user object plus the JWT as token (for bearer-token clients):
{
"user": {
"id": "clx1abc2d0000abcd1234efgh",
"username": "johndoe",
"email": "john@example.com",
"displayName": "John Doe",
"bio": "Hello world",
"handle": "johndoe",
"avatarUrl": "/uploads/avatars/clx1abc.webp",
"headerImageUrl": null,
"role": "USER",
"verified": false,
"creditBalance": 0,
"twoFactorEnabled": false,
"pinnedPostId": null,
"createdAt": "2026-01-01T00:00:00.000Z"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}Email Recovery
Recover access to your account if you've lost access to your email.
Step 1: Request Recovery
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Required | Your account username |
Returns the masked email address associated with the account (if found). An OTP code is sent to the account's email.
Step 2: Verify Recovery Code
| Parameter | Type | Required | Description |
|---|---|---|---|
| username | string | Required | Same username from step 1 (3-15 characters, alphanumeric and underscore only) |
| code | string | Required | 6-digit OTP from your email |
On success, sets the auth cookie and returns the user object (same as login verify).
Recovery requests are limited to one attempt per 24 hours per username.
CSRF Tokens
All state-changing requests (POST, PATCH, DELETE) made with a cookie session require a X-CSRF-Token header. The CSRF token is provided in the non-HttpOnly csrf_token cookie set by the server once you are logged in. Requests authenticated via Authorization: Bearer without the session cookie are exempt.
Reading the CSRF token
# The CSRF token is in the cookies from your login response.
# Extract it and pass as a header:
curl -X POST https://moin.net/api/v1/posts \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
-b cookies.txt \
-d '{"body": "Hello!"}'
function getCsrfToken() {
const match = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]*)/);
return match ? decodeURIComponent(match[1]) : '';
}
// Use it in every state-changing request:
await fetch('/api/v1/posts', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': getCsrfToken()
},
credentials: 'include',
body: JSON.stringify({ body: 'Hello!' })
});
Requests without a valid CSRF token will return 403 Forbidden.
Session Management
Logout
Revokes the current JWT and clears the auth cookie. Works without authentication. If no valid session exists, it simply clears the cookie.
Refresh Session
Rotates the session: a new long-lived JWT is issued and the old token is revoked. Sessions do not expire on a fixed schedule. They remain valid until you log out, the session is revoked server-side, or the account exceeds its limit of 10 active sessions (the oldest is revoked automatically).
Re-authentication (elevated session)
Security-sensitive operations (changing your email and enabling or disabling 2FA) require a recently re-authenticated (“elevated”) session. Without it they return 403 with { "requiresReauth": true }.
Sends a 6-digit verification code to your account email.
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | Required | 6-digit code from your email |
On success the response is { "elevated": true, "expiresIn": 300 }. The elevation lasts 5 minutes.
The Post Object
Posts are the core content unit on MOiN.
Unique identifier (CUID)
Feed entry identifier
Post content text
Post type: QUICK, DEEP, or SIGNAL
Network identifier (default ECHOSPHERE)
PUBLIC, FOLLOWERS, or HIDDEN (system-assigned by moderation, not user-selectable)
Optional tag (max 64 chars)
Optional source link URL
ISO 8601 datetime when the post becomes visible
ISO 8601 creation timestamp
ISO 8601 last update timestamp (returned on create; not part of feed/single-post payloads)
Parent post ID if this is a reply (returned on create; not part of feed/single-post payloads)
Whether this feed entry is a repost. Repost entries carry a repostContext object ({ id, username, displayName, handle, isSelf, verified } of the reposter), a repostEntryId, and originalCreatedAt; the remaining fields describe the original post.
Whether link preview cards are hidden for this post
Auto-detected language code
Author profile: { id, username, handle, displayName, avatarUrl, verified }
Attached media objects (see Media)
Poll data if attached (see Polls)
Users mentioned in the post via @username
Number of replies
Reaction counts keyed by type, e.g. { "LIKE": 5, "BOOST": 2 }. Types with zero reactions are omitted, so treat missing keys as 0.
Feed and single-post payloads include further contextual fields not listed here, e.g. relationship and reactedByCurrentUser (authenticated requests only), isPinned, linkPreview, factCheckStatus/factCheckVerdict, and signals.
Create a Post
Create a new post. Use application/json for text-only posts, or multipart/form-data for posts with media.
| Parameter | Type | Required | Description |
|---|---|---|---|
| body | string | Optional | Post text. Max 300 chars (free) or 1,000 chars (with extended_posts). At least one of body, media, video, or poll is required. |
| type | string | Optional | quick (default), deep, or signal |
| visibility | string | Optional | PUBLIC (default) or FOLLOWERS |
| tag | string | Optional | Tag for the post (max 64 chars) |
| sourceUrl | string | Optional | Source URL link |
| publishAt | string | Optional | ISO 8601 datetime for scheduled posts (min 60s in the future). Requires scheduling feature. |
| replyToId | string | Optional | Post ID to reply to (see the reply restrictions below) |
| media | File | Optional | Image file (multipart/form-data). Repeat the media field once per image for multiple attachments. |
| video | File | Optional | Single video file (multipart/form-data) |
| mediaAltText | string | Optional | ALT text for the media files: repeat the field in the same order as the media fields |
| poll | string | Optional | JSON string with poll data (see Polls) |
| hideLinkPreview | boolean | Optional | Set true to hide link preview cards |
# Text-only post
curl -X POST https://moin.net/api/v1/posts \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
-b cookies.txt \
-d '{"body": "Hello from the API!", "type": "quick"}'
# Post with images (repeat "media" once per file)
curl -X POST https://moin.net/api/v1/posts \
-H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
-b cookies.txt \
-F "body=Check out these photos" \
-F "media=@photo.jpg" \
-F "mediaAltText=A beautiful sunset" \
-F "media=@second.jpg" \
-F "mediaAltText=The same sunset, minutes later"
// Text-only post
await fetch('/api/v1/posts', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': getCsrfToken()
},
credentials: 'include',
body: JSON.stringify({ body: 'Hello from the API!' })
});
// Post with images (append 'media' once per file)
const form = new FormData();
form.append('body', 'Check out these photos');
form.append('media', imageFile);
form.append('mediaAltText', 'A beautiful sunset');
form.append('media', secondImageFile);
form.append('mediaAltText', 'The same sunset, minutes later');
await fetch('/api/v1/posts', {
method: 'POST',
headers: { 'X-CSRF-Token': getCsrfToken() },
credentials: 'include',
body: form
});
Free accounts can post 5 times per day. Enable the unlimited_posts feature (5 credits/day) for unlimited posting.
A post can carry either images or one video or a poll. These cannot be combined. body text can accompany any of them.
Replying via replyToId only works if the post author has enabled replies (allowFriendsReply in their settings, off by default) and you are mutual follows (“friends”). You can always reply to your own posts. Otherwise the request fails with 400.
Get a Post
Retrieve a single post by ID. Authenticated requests include relationship context and user reaction status.
Get Replies
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | number | Optional | Number of replies to return (default 20, max 50) |
| cursor | string | Optional | Pagination cursor from previous response |
Edit a Post
Edit an existing post. You must be the author. It uses the same parameters as Create a Post. You can update the text, add or replace media, change visibility, and more.
Send as application/json for text-only changes, or multipart/form-data when updating media.
| Parameter | Type | Required | Description |
|---|---|---|---|
| body | string | Optional | Updated post text |
| visibility | string | Optional | PUBLIC or FOLLOWERS |
| tag | string | Optional | Tag for the post (max 64 chars) |
| sourceUrl | string | Optional | Source URL link |
| publishAt | string | Optional | ISO 8601 datetime to reschedule the post (only for unpublished scheduled posts) |
| hideLinkPreview | boolean | Optional | Set true to hide link preview cards |
| media | File | Optional | Additional image files (multipart/form-data). Repeat the field once per image; new images are appended to the existing ones |
| video | File | Optional | Video file (multipart/form-data); only allowed when the post has no images |
| mediaAltText | string | Optional | ALT text per new media file: repeat the field in the same order as media |
| keepMediaIds | string[] | Optional | IDs of existing media to keep (JSON array; as a JSON string in multipart requests). Existing media not listed here is removed. Omit the field to keep all existing media. |
Free accounts: 1 edit within 5 minutes of creation. With extended_edits feature: 5 edits within 60 minutes.
Delete a Post
Permanently delete a post. You must be the author.
Bulk Delete
| Parameter | Type | Required | Description |
|---|---|---|---|
| range | string | Required | today, week, month, year, or all |
| tzOffset | number | Optional | Timezone offset in minutes as returned by JavaScript's getTimezoneOffset() (positive = west of UTC; accepted range covers UTC-12 to UTC+14), for accurate day/week/month boundaries |
Pin / Unpin
Pin a post to the top of your profile. Only one post can be pinned at a time; pinning a new post automatically unpins the previous one.
Reactions
React to a post. Calling again with the same reaction type removes it (toggle behavior).
| Parameter | Type | Required | Description |
|---|---|---|---|
| reaction | string | Required | LIKE, BOOST, or SAVE |
curl -X POST https://moin.net/api/v1/posts/POST_ID/react \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
-b cookies.txt \
-d '{"reaction": "LIKE"}'
await fetch(`/api/v1/posts/${postId}/react`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': getCsrfToken()
},
credentials: 'include',
body: JSON.stringify({ reaction: 'LIKE' })
});
Fact Check
Request an AI-powered fact-check on a post or retrieve a cached result.
Request Fact Check
Submit a post for AI fact-checking. Rate limited.
curl -X POST https://moin.net/api/v1/posts/POST_ID/fact-check \
-H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
-b cookies.txt
await fetch(`/api/v1/posts/${postId}/fact-check`, {
method: 'POST',
headers: { 'X-CSRF-Token': getCsrfToken() },
credentials: 'include'
});
Get Fact Check Result
Retrieve the cached fact-check result for a post, if available.
Translation
Translate a post into another language or retrieve a cached translation.
Translate Post
Request a translation of a post. Rate limited.
| Parameter | Type | Required | Description |
|---|---|---|---|
| targetLang | string | Required | 2-character language code (e.g. en, de, fr) |
curl -X POST https://moin.net/api/v1/posts/POST_ID/translate \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
-b cookies.txt \
-d '{"targetLang": "de"}'
await fetch(`/api/v1/posts/${postId}/translate`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': getCsrfToken()
},
credentials: 'include',
body: JSON.stringify({ targetLang: 'de' })
});
Get Cached Translation
Retrieve a previously generated translation for a post in the specified language.
Get Feed
Retrieve the chronological feed. Authenticated users see personalized content; unauthenticated users see public posts.
| Parameter | Type | Required | Description |
|---|---|---|---|
| filter | string | Optional | Feed filter: all (default), news, friends, following, followers, verified, reposts, saves, scheduled. All filters except all and news require authentication. |
| search | string | Optional | Filter posts by text (max 140 characters) |
| limit | number | Optional | Posts per page (default 40, max 100) |
| cursor | string | Optional | Pagination cursor |
Search Posts
Search posts with the filter options below.
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | Optional | Search text (matches post body, display name, and handle) |
| hasMedia | boolean | Optional | Filter by media presence |
| hasPoll | boolean | Optional | Filter by poll presence |
| fromUser | string | Optional | Filter by author username |
| followingOnly | boolean | Optional | Only posts from people you follow |
| verifiedOnly | boolean | Optional | Only posts from verified accounts |
| dateFrom | string | Optional | ISO 8601 start date |
| dateTo | string | Optional | ISO 8601 end date |
| minFavs | number | Optional | Minimum like count |
| minReposts | number | Optional | Minimum repost count |
| mediaType | string | Optional | Filter by media type: image or video |
| toUser | string | Optional | Filter by @mentioned username |
| followersOnly | boolean | Optional | Only posts from your followers |
| friendsOnly | boolean | Optional | Only posts from mutual follows |
| isRepost | boolean | Optional | Filter for reposts (true) or original posts (false) |
| languages | string | Optional | Comma-separated list of language codes to filter by (e.g. en,de) |
| limit | number | Optional | Results per page (default 20, max 50) |
| cursor | string | Optional | Pagination cursor from the previous response's nextCursor |
Without q, the endpoint returns an empty result set. The text query is what drives the search; all other parameters narrow it down.
Link Preview
Fetch Open Graph metadata for a URL. Responses are cached for 1 hour.
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Required | URL to preview (max 2,048 chars, must be a valid URL) |
{
"url": "https://example.com/article",
"title": "Example Article",
"description": "A description of the article",
"image": "https://example.com/og-image.jpg",
"siteName": "Example",
"favicon": "https://example.com/favicon.ico",
"type": "article"
}Upload Images
Images are uploaded as part of post creation using multipart/form-data. Use the media field for image files (repeat it once per image) and mediaAltText for corresponding ALT text in the same order.
| Limit | Free | With Feature |
|---|---|---|
| Daily quota | 5 images/day | 30/day (more_images) |
| Max file size | 5 MB | 15 MB (bigger_images) |
| Compression | Auto-compressed | No compression (hd_images) |
Images are automatically processed: EXIF metadata is stripped, auto-rotation is applied, and preview thumbnails are generated. Animated GIFs and animated WebPs are preserved.
Upload Video
Use the video field (singular) in your post creation request. Only one video per post is allowed.
| Limit | Free | With Feature |
|---|---|---|
| Daily quota | 2 videos/day | 10/day (more_videos) |
| Max file size | 100 MB | 500 MB (bigger_videos) |
Videos are generally stored as-is without re-encoding. The one exception: HEVC/H.265 videos (typical for iPhone recordings) are transcoded to H.264 for browser compatibility. File type is detected from the file contents, not the client-supplied MIME type.
Supported Formats
Images
| Format | MIME Types |
|---|---|
| JPEG | image/jpeg, image/pjpeg |
| PNG | image/png, image/x-png |
| WebP | image/webp |
| GIF | image/gif |
Videos
| Format | MIME Type |
|---|---|
| MP4 | video/mp4 |
| WebM | video/webm |
| MOV | video/quicktime |
Media Object
Unique media ID
Full-size media URL
Thumbnail preview URL (images only)
MIME type of the file
Width in pixels
Height in pixels
ALT text description
File size in bytes
File content hash for deduplication
Whether the media is animated (GIF/animated WebP)
Display order (0-based)
AI ALT Text Generation
Generate descriptive ALT text for an image using AI. Requires the auto_alt_text feature (3 credits/day).
Upload a single image as multipart/form-data with field name image. Returns:
{ "altText": "A golden retriever playing fetch in a sunlit park" }Create a Poll
Polls are attached to posts. Include a poll parameter as a JSON string when creating a post. Requires the polls feature (3 credits/day).
| Field | Type | Required | Description |
|---|---|---|---|
| question | string | Required | Poll question (max 240 characters) |
| options | string[] | Required | Array of option strings (2-4 options, max 50 chars each, must be unique) |
| allowsMultiple | boolean | Optional | Allow selecting multiple options (default: false) |
| durationSeconds | number | Required | Poll duration. Allowed values: 300 (5 min), 3600 (1 hr), 21600 (6 hr), 86400 (24 hr), 259200 (3 days), 604800 (7 days) |
curl -X POST https://moin.net/api/v1/posts \
-H "Content-Type: application/json" \
-H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
-b cookies.txt \
-d '{
"body": "What is your favorite language?",
"poll": "{\"question\":\"Favorite language?\",\"options\":[\"JavaScript\",\"Python\",\"Rust\",\"Go\"],\"durationSeconds\":86400}"
}'
await fetch('/api/v1/posts', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': getCsrfToken()
},
credentials: 'include',
body: JSON.stringify({
body: 'What is your favorite language?',
poll: JSON.stringify({
question: 'Favorite language?',
options: ['JavaScript', 'Python', 'Rust', 'Go'],
durationSeconds: 86400
})
})
});
Vote on a Poll
| Parameter | Type | Required | Description |
|---|---|---|---|
| optionIds | string[] | Required | Array of option IDs to vote for (1–4). Multiple selections only work if the poll has allowsMultiple: true. |
Users can vote once per poll. Voting again replaces the previous selection.
The User Object
Unique user identifier
Unique handle (3-15 characters)
Display name (1-25 characters)
User bio (max 200 characters)
Avatar image URL
Profile header image URL
Whether the account is verified
Account creation date (ISO 8601)
Number of followers
Number of accounts followed
Total number of posts
Get Authenticated User
Retrieve the currently authenticated user's full profile, including private fields like email, credit balance, and settings.
{
"id": "clx1abc2d0000abcd1234efgh",
"username": "johndoe",
"email": "john@example.com",
"displayName": "John Doe",
"bio": "Hello world",
"handle": "johndoe",
"avatarUrl": "/uploads/avatars/clx1abc.webp",
"headerImageUrl": null,
"role": "USER",
"verified": false,
"creditBalance": 250,
"twoFactorEnabled": false,
"pinnedPostId": null,
"createdAt": "2026-01-01T00:00:00.000Z",
"followerCount": 42,
"followingCount": 18,
"postCount": 137
}This endpoint returns private fields (email, creditBalance, twoFactorEnabled) that are not included in public profile responses. The full payload also contains additional private objects not shown above, e.g. settings, metrics, notificationCount, antiPhishingCode, and pendingEmailChange.
Get Profile
Retrieve a user's public profile. Authenticated requests include relationship context (whether you follow them, etc.).
Update Profile
Update your profile information. Rate limited to 10 updates per 15 minutes.
| Parameter | Type | Required | Description |
|---|---|---|---|
| displayName | string | Optional | 1-25 characters |
| bio | string | Optional | Max 200 characters, max 3 lines |
| username | string | Optional | New username (3-15 characters, alphanumeric and underscore). Must be available and not reserved; your previous username is released. |
Avatar & Header
Upload avatar image (max 3 MB). Saved as WebP.
Upload header image (max 5 MB). Saved as WebP.
Authentication RequiredBoth use multipart/form-data with the field name avatar or header respectively.
Followers & Following
Returns the most recent connections, up to 200 entries per list. These endpoints are not paginated.
User Replies
Retrieve a user's replies. Returns the 20 most recent replies (no pagination parameters). Returns 404 if the user is not found.
Search Profiles
| Parameter | Type | Required | Description |
|---|---|---|---|
| q | string | Required | Search query (matches username and display name) |
Returns up to 8 matches as { "items": [...] }. There is no limit parameter.
Follow / Unfollow
Follow or unfollow a user. Use the action parameter to specify the operation.
| Parameter | Type | Required | Description |
|---|---|---|---|
| targetId | string | Required | User ID to follow/unfollow |
| action | string | Optional | follow (default) or unfollow |
Response includes the full relationship object:
{
"relationship": {
"isFollowing": true,
"isFollower": false,
"isMuted": false,
"isBlocked": false,
"hasBlockedYou": false
}
}Mute / Unmute
Mute or unmute a user. Muted users' posts are hidden from your feed.
| Parameter | Type | Required | Description |
|---|---|---|---|
| targetId | string | Required | User ID to mute/unmute |
| action | string | Optional | mute (default) or unmute |
Block / Unblock
Block or unblock a user. Blocking a user automatically unfollows both directions.
| Parameter | Type | Required | Description |
|---|---|---|---|
| targetId | string | Required | User ID to block/unblock |
| action | string | Optional | block (default) or unblock |
Relationship Status
Get the full relationship between you and another user.
{
"relationship": {
"isFollowing": true,
"isFollower": false,
"isMuted": false,
"isBlocked": false,
"hasBlockedYou": false
}
}Blocked & Muted Users
Authentication RequiredList Blocked Users
Returns the list of users you have blocked.
List Muted Users
Returns the list of users you have muted.
Report Content
Report a post or a user for review. Rate limited to 10 reports per 15 minutes. At least one of postId or reportedUserId is required.
| Parameter | Type | Required | Description |
|---|---|---|---|
| postId | string | Optional* | Post ID to report (CUID format) |
| reportedUserId | string | Optional* | User ID to report (for profile-level reports) |
| category | string | Required | Report category enum value (use GET /api/v1/social/report/categories) |
| subcategory | string | Optional | Report subcategory (max 100 characters) |
| description | string | Optional | Additional context (max 2,000 characters) |
Get Report Categories
List Notifications
Retrieve your most recent 50 notifications. Supports limit (max 50) and cursor query parameters; the first page (request without cursor) automatically marks the fetched notifications as read.
Unread Count
{ "count": 5 }Drafts
Authentication RequiredSave posts as drafts before publishing. Maximum 50 drafts per user.
List all drafts.
Create a draft.
| Parameter | Type | Required | Description |
|---|---|---|---|
| body | string | Optional | Draft text (max 10,000 characters, default empty) |
| visibility | string | Optional | PUBLIC (default) or FOLLOWERS |
| pollData | object | null | Optional | Poll data: { question, options, duration }. question max 500 chars, options string array (2-4, max 100 chars each), duration positive integer in seconds |
| scheduledAt | string | null | Optional | ISO 8601 datetime for scheduling |
Update a draft.
Delete a draft.
Settings
Get your current settings.
Update settings. Pass only the fields you want to change.
Languages
Get the list of supported language codes.
Two-Factor Authentication
Authentication RequiredMOiN supports TOTP-based two-factor authentication.
enable and disable require a recently re-authenticated session (see Re-authentication). Without it they return 403 with { "requiresReauth": true }.
Initialize 2FA setup. Returns a TOTP secret and QR code data URL for authenticator apps.
Enable 2FA by submitting a valid TOTP code from your authenticator app.
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | Required | 6-digit TOTP code from your authenticator |
Disable 2FA. Requires a valid TOTP code for confirmation.
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | Required | 6-digit TOTP code from your authenticator |
Cancel a pending 2FA setup before it is enabled.
Credits Overview
MOiN uses a credit-based system for premium features. 1 credit = 0,01 €. Credits are purchased by card, Apple Pay, Google Pay, or bank transfer (via Stripe). Stripe is a US provider — the one part of MOiN where data leaves the EU/EEA. We plan to move payments to a European provider once a suitable one exists.
Features are unlocked on a daily basis. Enabling a feature deducts its daily cost from your balance. Features auto-renew each day if you have sufficient credits.
1. Purchase a credit package
2. Enable features you want
3. Credits are deducted daily
4. Disable anytime, and the feature stays active until the current period ends
Balance & Transactions
Get Balance
{ "balance": 250 }Transaction History
Returns a paginated list of credit transactions (purchases, feature charges, transfers, etc.).
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | number | Optional | Results per page |
| offset | number | Optional | Number of records to skip |
| filter | string | Optional | Restrict to a type group: purchases, features, factchecks, translations, or transfers |
| direction | string | Optional | in (credits received) or out (credits spent) |
Get Pricing
Returns the current feature pricing list.
Credit Packages
| Package | Credits | Price (EUR) | Discount |
|---|---|---|---|
| pack_100 | 100 | 1,- € | — |
| pack_500 | 500 | 4,50 € | 10% |
| pack_1000 | 1,000 | 8,50 € | 15% |
| pack_5000 | 5,000 | 40,- € | 20% |
| pack_10000 | 10,000 | 75,- € | 25% |
Features & Pricing
Lists all available features with their pricing and your current activation status.
| Feature | Credits/Day | Description |
|---|---|---|
unlimited_posts | 5 | Remove the 5 posts/day limit |
extended_posts | 3 | 1,000 character limit (vs 300) |
extended_edits | 2 | 5 edits in 60 min (vs 1 in 5 min) |
more_images | 3 | 30 images/day (vs 5) |
bigger_images | 2 | 15 MB max (vs 5 MB) |
hd_images | 2 | No auto-compression |
more_videos | 5 | 10 videos/day (vs 2) |
bigger_videos | 4 | 500 MB max (vs 100 MB) |
polls | 3 | Attach polls to posts |
scheduling | 4 | Schedule posts for later |
friends_only | 2 | Friends-only posts (visible to mutual follows only) |
auto_alt_text | 3 | AI-generated image descriptions |
direct_messaging | 5 | End-to-end encrypted direct messages to mutual friends |
hide_display_name | 2 | Hide your display name; only your @username is shown |
highlight_palette | 2 | Custom accent color for the app's highlights |
no_limits | 35 | All features bundled (saves 12/day vs. enabling everything individually) |
Enable a Feature
Disable Auto-Renew
Re-enable Auto-Renew
Account Limits
Returns your current account limits based on your active features. Useful for checking quotas before uploading or posting.
{
"postCharacterLimit": 300,
"dailyPostAllowance": "5",
"allowImages": true,
"imageQuota": 5,
"imageMaxSizeMb": 5,
"allowVideos": true,
"videoQuota": 2,
"videoMaxSizeMb": 100,
"allowPolls": false,
"allowScheduling": false,
"allowFriendsOnly": false,
"compressImages": true,
"hasAutoAltText": false,
"allowHideDisplayName": false,
"allowHighlightPalette": false,
"editWindowMs": 300000
}Purchase Credits
| Parameter | Type | Required | Description |
|---|---|---|---|
| packageId | string | Required | Package ID (e.g. pack_500) |
Returns a checkout URL. Redirect the user there to complete the payment:
{
"paymentId": "cs_test_a1b2c3",
"checkoutUrl": "https://checkout.stripe.com/c/pay/cs_test_a1b2c3",
"credits": 500,
"priceEur": 4.5
}Transfer Credits
Send credits to another user. Limited to 10 transfers per day. Minimum transfer: 10 credits.
| Parameter | Type | Required | Description |
|---|---|---|---|
| recipientId | string | Required | User ID of the recipient |
| amount | number | Required | Number of credits to send (min 10) |
You cannot transfer credits to users you have blocked or who have blocked you.
Real-time: Connecting
Open a Server-Sent Events connection for real-time updates. The server sends heartbeats every 25 seconds to keep the connection alive.
curl -N https://moin.net/api/v1/feed/stream \
-b cookies.txt \
-H "Accept: text/event-stream"
const es = new EventSource('/api/v1/feed/stream', {
withCredentials: true
});
es.addEventListener('feed', (event) => {
const data = JSON.parse(event.data);
console.log('Event:', data.type, data);
});
es.addEventListener('error', () => {
console.log('Connection lost, reconnecting...');
});
SSE Event Types
All events arrive as event: feed with JSON payloads in the data field. The type field distinguishes event types.
feed.refresh
Indicates new content is available in the feed.
{ "type": "feed.refresh", "trigger": "post" }post.reaction
Real-time reaction count update.
{
"type": "post.reaction",
"postId": "clx...",
"reaction": "LIKE",
"counts": { "LIKE": 5, "BOOST": 2, "SAVE": 1 },
"userId": "clx...",
"isActive": true
}profile.updated
A user's profile has changed.
{ "type": "profile.updated", "userId": "clx...", "username": "newname" }notification.update
Unread notification count has changed.
{ "type": "notification.update", "userId": "clx...", "unreadCount": 3 }announcement.updated
A platform announcement has been created or modified.
{ "type": "announcement.updated" }The stream also carries an event: dm channel used by the encrypted messaging system of the official apps; its payloads are internal and not part of the stable API.
Request Verification
Submit a request to verify your account. Rate limited to 5 requests per 15 minutes.
Verification Status
Check the current status of your verification request.
DNS Verification
Manually trigger a DNS re-check for domain-based verification. Rate limited to 5 per 15 minutes.
Change Email
Authentication RequiredChange your account email address. A verification code is sent to the new email.
Starting an email change requires a recently re-authenticated session (see Re-authentication). Without it the request returns 403 with { "requiresReauth": true }.
Start Email Change
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Required | New email address |
Resend Verification Code
Verify Email Change
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | Required | 6-digit verification code sent to the new email |
Cancel Email Change
Cancel a pending email change request.
Verification codes expire after 15 minutes. You can resend a code once per 60 seconds, with a maximum of 5 attempts per change request.
Data Export (GDPR)
Authentication RequiredRequest a full export of your data in compliance with GDPR Article 20.
Check the status of your export request.
Request a new data export. Processing may take a few minutes.
Download your export as a ZIP file using the token from the export status response.
Login History
View your login history from the last 30 days. Each entry contains the timestamp (date), an anonymized IP address (last octet masked), and a human-readable device label derived from the user agent.
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | number | Optional | Results per page (max 50, default 10) |
| page | number | Optional | Page number (min 1, default 1) |
Delete Account
Permanently delete your account.
| Parameter | Type | Required | Description |
|---|---|---|---|
| deletePosts | string | Optional | Query parameter. Set to "true" to also delete all your posts (default: "false") |
This action permanently deletes your account and all associated data. It cannot be undone.
Announcements
Get Active Announcement
Returns the currently active platform announcement, if any. May include a poll for community feedback.
{
"announcement": {
"id": "clx...",
"headline": "Platform Update",
"body": "We've added new features...",
"active": true,
"createdAt": "2026-01-15T00:00:00.000Z"
}
}Vote on Announcement Poll
| Parameter | Type | Required | Description |
|---|---|---|---|
| optionId | string | Required | ID of the poll option to vote for |
Rate Limits
The API enforces rate limits to ensure fair usage. When you exceed a limit, you'll receive a 429 Too Many Requests response.
| Endpoint Category | Window | Limit | Key |
|---|---|---|---|
| General API | 60 seconds | 180 | User ID or IP |
| Auth (login/register) | 60 seconds | 20 | IP only |
| OG / embed crawl | 10 minutes | 30 | IP |
| Profile update | 15 minutes | 10 | User ID or IP |
| Content report | 15 minutes | 10 | User ID or IP |
| Credit transfer | 15 minutes | 10 | User ID or IP |
| Verification request | 15 minutes | 5 | User ID or IP |
| Bug report | 60 minutes | 5 | User ID or IP |
| Fact-check request | 15 minutes | 5 | User ID or IP |
| Translation request | 15 minutes | 20 | User ID or IP |
| Billing webhook | 60 seconds | 20 | IP |
Responses include a RateLimit header using the IETF draft-7 format (e.g. RateLimit: limit=180, remaining=179, reset=60). Authenticated requests are tracked by user ID; unauthenticated requests are tracked by IP address.
Errors
All errors return a JSON body with a human-readable message field:
{
"message": "Posts can be up to 300 characters."
}Some validation endpoints additionally include an errors payload with per-field detail. Its shape varies by endpoint (Zod issues array or a fieldErrors object), so treat message as the reliable field and errors as optional debugging detail:
{
"message": "Invalid draft data",
"errors": [
{ "code": "too_big", "path": ["body"], "message": "String must contain at most 10000 character(s)" }
]
}Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 202 | Accepted: request received, processing started (e.g. OTP sent) |
| 400 | Bad Request: validation error or malformed request |
| 401 | Unauthorized: missing or invalid authentication |
| 403 | Forbidden: CSRF token missing, insufficient permissions |
| 404 | Not Found: resource does not exist. Note: some mutation endpoints (e.g. editing or deleting a post that does not exist) report “not found” as a 400 with an explanatory message instead. |
| 413 | Payload Too Large: avatar/header upload exceeds its size limit. Oversized post media (images/videos) returns 400 with a size message instead. |
| 429 | Too Many Requests: rate limit exceeded |
| 500 | Internal Server Error |
| 503 | Service Unavailable: maintenance mode or feature disabled |
Webhooks
This endpoint receives billing events from our payment provider, Stripe. It is documented for transparency — it is not a subscription you can register for, and MOiN does not send webhooks to third-party applications.
Payloads are signed by Stripe. The Stripe-Signature header is verified against the raw request body before anything is acted on; unsigned or mismatched requests are rejected.
Events
| Event | Description |
|---|---|
| checkout.session.completed | Checkout finished — credited once the payment status says the money arrived |
| checkout.session.async_payment_succeeded | A delayed method (SEPA debit, bank transfer) has now been paid |
| checkout.session.async_payment_failed | A delayed payment ultimately failed |
| checkout.session.expired | Checkout expired without payment |
A Checkout Session carries status and payment_status separately. With SEPA debit and bank transfer the session completes immediately while the payment stays unpaid for days, so a completed session alone never grants credits.
Verifying Signatures
const crypto = require('crypto');
// Header looks like: t=<unix>,v1=<hex>[,v1=<hex>]
// Several v1 entries appear while the endpoint secret is rotated.
function verifyWebhookSignature(rawBody, header, secret) {
const parts = Object.create(null);
const signatures = [];
for (const part of header.split(',')) {
const i = part.indexOf('=');
const key = part.slice(0, i).trim();
const value = part.slice(i + 1).trim();
if (key === 't') parts.t = value;
else if (key === 'v1') signatures.push(value);
}
if (!parts.t || signatures.length === 0) return false;
if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;
const expected = crypto
.createHmac('sha256', secret)
.update(`${parts.t}.${rawBody}`)
.digest();
return signatures.some((sig) => {
const provided = Buffer.from(sig, 'hex');
return provided.length === expected.length
&& crypto.timingSafeEqual(provided, expected);
});
}The timestamp is part of the signed payload, so webhooks older than 5 minutes are rejected rather than processed, and a completed purchase is only credited once.
Internal Endpoints
Beyond what is documented here, the API serves a number of internal endpoints used by the official web, iOS, and Android apps, including end-to-end encrypted direct messaging (/dm, /e2ee), passkey and OAuth sign-in (/auth/passkey, /auth/oauth/*), session management (/sessions), push notifications (/push), newsletter management (/newsletter), connect/shake features, and subscription billing (/billing/* besides the webhook).
These are not part of the stable public API: they may change or disappear without notice and are intentionally undocumented. Build integrations only against the endpoints described in this documentation.