We’re excited to announce the release of API v2, a redesigned Foru.ms API built with developer experience as our top priority.
After listening to feedback from our community and analyzing real-world usage patterns, we’ve created an API that’s more consistent, more powerful, and easier to use than ever before.
No more guessing between singular and plural endpoints. In v2, all resources use plural names consistently:
- GET /api/v1/thread/:id
+ GET /api/v2/threads/:id
- POST /api/v1/post
+ POST /api/v2/posts
- GET /api/v1/user/:id
+ GET /api/v2/users/:idEvery list endpoint now returns data in a consistent, predictable format:
{
"data": {
"items": [...],
"nextCursor": "eyJpZCI6...",
"count": 42
}
}No more remembering whether the key is threads, posts, or results — it’s always items.
We’ve consolidated likes, dislikes, upvotes, and downvotes into a single, flexible reactions system:
# React to a thread
POST /api/v2/threads/:id/reactions
Content-Type: application/json
{
"type": "like"
}
# React to a post
POST /api/v2/posts/:id/reactions
Content-Type: application/json
{
"type": "upvote"
}This opens the door for custom reaction types in the future — think emojis, awards, and more!
Instead of dedicated endpoints for every relationship, v2 uses intuitive query parameters:
# Get threads by tag
GET /api/v2/threads?tagId=abc123
# Get posts by user
GET /api/v2/posts?userId=xyz789
# Search with type filter
GET /api/v2/search?query=hello&type=threadsErrors are now consistent and actionable:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The 'title' field is required",
"details": {
"field": "title",
"constraint": "required"
}
}
}/threads/:id/poll/votes/webhooks/:id/deliveries/private-messages/:id/replies/threads/:id/subscribers and /tags/:id/subscribers- const baseUrl = 'https://foru.ms/api/v1';
+ const baseUrl = 'https://api.foru.ms/v2';Replace all singular resource paths with their plural equivalents:
| v1 | v2 |
|---|---|
/thread/ | /threads/ |
/post/ | /posts/ |
/user/ | /users/ |
/tag/ | /tags/ |
/notification/ | /notifications/ |
/private-message/ | /private-messages/ |
/report/ | /reports/ |
/role/ | /roles/ |
If you were accessing response data directly:
- const threads = response.threads;
+ const threads = response.data.items;- await client.post(`/thread/${id}/like`);
+ await client.post(`/threads/${id}/reactions`, { type: 'like' });Our official JavaScript/TypeScript SDK has been updated with full v2 support:
npm install @foru-ms/sdk@latestimport { ForumClient } from '@foru-ms/sdk';
const client = new ForumClient({
apiKey: 'your_api_key',
baseUrl: 'https://api.foru.ms/v2'
});
// All methods now use v2 endpoints
const { data } = await client.threads.list({ limit: 10 });
console.log(data.items); // Always 'items'!The v1 API will remain available for 12 months from today. We recommend migrating to v2 as soon as possible to take advantage of the new features and improvements.
During the deprecation period:
Explore the new API with our interactive documentation:
This redesign was driven by your feedback, and we want to keep improving. If you have questions, suggestions, or run into any issues during migration, please reach out:
Thank you for being part of the Foru.ms community. We can’t wait to see what you build with API v2! 🚀