API
API Documentation
Authentication
All authenticated endpoints require either:
- Session Cookie - Obtained via web login
- Personal Access Token (PAT) - For API automation
Using PAT Tokens
Include your PAT in the request using one of these methods:
- Authorization header:
Authorization: Bearer YOUR_TOKEN - X-Micro-Token header:
X-Micro-Token: YOUR_TOKEN
Example:
curl -H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
https://example.com/api/endpoint
Creating a PAT Token
- Log in to your account via the web interface
- Navigate to
/tokenendpoint - Create a new token with desired permissions
- Save the token immediately - it’s only shown once!
MCP
AI agents and tools can connect to Mu via the Model Context Protocol (MCP) server at /mcp.
Authentication
Include a token in the Authorization header:
Authorization: Bearer YOUR_TOKEN
Two ways to obtain a token:
- Personal Access Token (PAT) — create one at
/tokenafter logging in. - Signup / Login tools — the agent can call the
signuporloginMCP tool to obtain a session token programmatically.
Endpoints
Get Chat Info
Get available chat topics and summaries
GET /chat
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| topics | array | Available chat topics/categories |
| summaries | object | Topic summaries and context information |
Chat
Chat with AI
POST /chat
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| context | array | Past messages to use as context; [{‘prompt’: xxx, ‘answer’: xxx}] |
| prompt | string | Prompt to send the AI |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| answer | string | The response from the AI |
News
Read the news
GET /news
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| feed | array | The news feed |
News Search
Search for news articles
POST /news
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| query | string | News search query |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| query | string | The search query |
| results | array | Array of news article objects with id, title, description, url, category, image, published |
| count | number | Number of results returned |
Get Post
Get a single blog post by ID
GET /post/{id}
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| id | string | Post ID |
| title | string | Post title |
| content | string | Post content (raw markdown) |
| author | string | Author name |
| author_id | string | Author ID |
| created_at | string | Post creation timestamp |
Update Post
Update an existing blog post (author only)
PATCH /post/{id}
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| title | string | Post title (optional) |
| content | string | Post content (minimum 50 characters) |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the post was updated successfully |
| id | string | The ID of the updated post |
Create Post
Create a new blog post
POST /post
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| title | string | Post title (optional) |
| content | string | Post content (minimum 50 characters) |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the post was created successfully |
| id | string | The ID of the created post |
Blog
Get all blog posts
GET /blog
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| posts | array | Array of post objects |
Video
Latest videos
GET /video
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| channels | array | Latest videos |
Video Search
Search for videos
POST /video
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| query | string | Video search query |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| results | array | Video search results |
| html | string | Pre-rendered html string of results |
List Tokens
List all Personal Access Tokens for authenticated user
GET /token
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| tokens | array | Array of token objects with id, name, created, last_used, expires_at, permissions |
Create Token
Create a new Personal Access Token for API automation
POST /token
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| name | string | Token name/description |
| permissions | array | Permissions array (e.g., [‘read’, ‘write’]). Default: [‘read’, ‘write’] |
| expires_in | number | Expiration in days (0 = never expires). Default: 0 |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether token was created |
| id | string | Token ID |
| token | string | The actual token (SAVE IT - shown only once!) |
| name | string | Token name |
| created | string | Creation timestamp |
| expires_at | string | Expiration timestamp (if set) |
| permissions | array | Token permissions |
Delete Token
Delete a Personal Access Token
DELETE /token/{id}
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether token was deleted |
| message | string | Success message |
Delete Post
Delete a blog post (author only)
DELETE /post/{id}
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the post was deleted |
User Profile
Get user profile and their posts
GET /@{username}
Headers
Content-Type: application/json
Response
Format: HTML
| Field | Type | Description |
|---|---|---|
| html | string | Rendered user profile page |
Update User Status
Update user status message (own profile only)
POST /@{username}
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| status | string | Status message (max 100 characters) |
Response
Format: Redirect
| Field | Type | Description |
|---|---|---|
| location | string | Redirects to user profile |
Add Comment
Add a comment to a blog post
POST /post/{id}/comment
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| content | string | Comment content (minimum 10 characters) |
Response
Format: Redirect
| Field | Type | Description |
|---|---|---|
| location | string | Redirects back to the post |
Search Data
Search across all indexed content (posts, news, videos)
GET /search
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| q | string | Search query |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| results | array | Search results with type, id, title, content, score |
Flag Content
Flag inappropriate content
POST /flag
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| type | string | Content type (post, comment) |
| id | string | Content ID |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| success | boolean | Whether the flag was recorded |
| count | number | Total flag count |
Session Status
Check authentication status (returns guest session if not authenticated)
GET /session
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| type | string | Session type (account, token, anonymous) |
| account | string | Account username if authenticated |
Wallet Balance
Get wallet credit balance
GET /wallet?balance=1
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| balance | number | Current credit balance (1 credit = 1p) |
Wallet Topup
Get available wallet topup payment methods. Returns card (Stripe) preset tiers with amount, credits, and label. Requires authentication.
GET /wallet/topup
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| methods | array | Array of payment method objects. Each has a type (card) and tiers with amount, credits, and label. |
Markets
Get live market prices for cryptocurrencies, futures, and commodities
GET /markets
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| category | string | Category: crypto, futures, or commodities (default: crypto) |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| category | string | The requested category |
| data | array | Array of market items with symbol, price, type |
Reminder
Get the daily Islamic reminder with Quranic verse, hadith, and name of Allah
GET /reminder
Headers
Content-Type: application/json
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| verse | string | Quranic verse |
| name | string | Name of Allah |
| hadith | string | Hadith text |
| message | string | Additional message |
| updated | string | Last updated timestamp |
Weather Forecast
Get the weather forecast for a location by latitude and longitude. Costs 1 credit.
GET /weather
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| lat | number | Latitude of the location |
| lon | number | Longitude of the location |
| pollen | string | Set to 1 to include pollen forecast (+1 credit) |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| forecast | object | Weather forecast with current conditions, hourly and daily items |
| pollen | array | Pollen forecast by date (if requested) |
Places Search
Search for places by name or category, optionally near a location
POST /places/search
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| q | string | Search query (e.g. cafe, pharmacy, Boots) |
| near | string | Location name or address to search near (optional) |
| near_lat | number | Latitude of the search location (optional) |
| near_lon | number | Longitude of the search location (optional) |
| radius | number | Search radius in metres, 100–5000 (default 1000) |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| results | array | Array of place objects with id, name, category, address, lat, lon, phone, website, opening_hours, cuisine, distance |
| count | number | Number of results returned |
Places Nearby
Find all places of interest near a given location
POST /places/nearby
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| address | string | Address or postcode to search near (optional if lat/lon provided) |
| lat | number | Latitude of the search location |
| lon | number | Longitude of the search location |
| radius | number | Search radius in metres, 100–5000 (default 500) |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| results | array | Array of place objects sorted by distance |
| count | number | Number of results returned |
| lat | number | Resolved latitude |
| lon | number | Resolved longitude |
| radius | number | Search radius used |
Web Search
Search the web using Brave Search. Requires authentication. Costs credits per query.
GET /web
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| q | string | Search query |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| results | array | Array of web result objects with title, url, description, age |
| query | string | The search query |
Agent Query
Query the AI agent. The agent plans and executes tool calls (news, weather, places, markets, etc.) then synthesizes a response. Requires authentication. Costs credits per query. Returns a Server-Sent Events stream.
POST /agent
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| prompt | string | The question or request for the agent |
| model | string | Model tier: standard (default) or premium |
Response
Format: text/event-stream
| Field | Type | Description |
|---|---|---|
| type | string | Event type: thinking, tool_start, tool_done, response, error, done |
| message | string | Human-readable status message |
| html | string | Rendered HTML answer (on response event) |
MCP Server
Model Context Protocol server for AI tool integration. Supports initialize, tools/list, tools/call, and ping methods. Tools include chat, news, blog, video, mail, search, wallet, weather, places, markets, reminder, login, and signup. Metered tools (chat: 3 credits, news_search: 1 credit, video_search: 2 credits, mail_send: 4 credits, weather_forecast: 1 credit + optional 1 credit for pollen data) use the same wallet credit system as the REST API. 10 free queries per day.
POST /mcp
Headers
Content-Type: application/json
Request
Format: JSON
| Field | Type | Description |
|---|---|---|
| jsonrpc | string | JSON-RPC version (must be ‘2.0’) |
| id | number | Request ID |
| method | string | MCP method: initialize, tools/list, tools/call, ping |
| params | object | Method parameters (e.g. {name, arguments} for tools/call) |
Response
Format: JSON
| Field | Type | Description |
|---|---|---|
| jsonrpc | string | JSON-RPC version ‘2.0’ |
| id | number | Request ID echoed back |
| result | object | Method result (tools list, tool output, server info) |
| error | object | Error object with code and message (if failed) |












