The NodeForgeCMS API is designed for developers extending or integrating NodeForgeCMS into their own applications and workflows. Familiarity with REST conventions and JSON is assumed throughout this reference.
Base URL
All API endpoints are relative to the following base URL:| Environment | Base URL |
|---|---|
| Production | https://yourdomain.com/api |
| Development | http://localhost:3000/api |
yourdomain.com with the domain of your NodeForgeCMS deployment. Every path in this reference is appended to this base URL — for example, GET /api/articles resolves to https://yourdomain.com/api/articles in production.
Request & Response Format
All requests and responses use JSON. Every request that sends a body must include theContent-Type: application/json header, and every response from the API will carry Content-Type: application/json.
Standard Response Envelope
Every successful API response is wrapped in a consistent envelope:| Field | Type | Description |
|---|---|---|
code | integer | HTTP status code mirrored in the response body |
data | object | array | The requested or mutated resource(s) |
message | string | Human-readable status string, typically "success" |
Error Responses
When a request cannot be fulfilled, the API returns an error envelope. Thedata field is omitted:
| Code | Meaning |
|---|---|
400 | Bad Request — malformed or missing parameters |
401 | Unauthorized — missing or invalid JWT token |
403 | Forbidden — valid token but insufficient permissions |
404 | Not Found — the requested resource does not exist |
500 | Internal Server Error — unexpected server-side failure |
Authentication
JWT Bearer tokens are required for all write operations (POST, PUT, PATCH, DELETE). Some read endpoints (GET) are publicly accessible without a token — these are noted individually in the endpoint reference. See the Authentication guide for full details on obtaining and using tokens.
Endpoint Groups
Columns
Define and manage the content structure of your CMS — create custom column types, configure fields, and control how content is organised.
Articles
Create, read, update, and delete article content. Supports filtering, pagination, and publishing state management.
Media
Upload and manage image and file assets. Retrieve media metadata and integrate assets into your content programmatically.
Users
Administer CMS user accounts — create users, assign roles, update credentials, and manage access permissions.
AI Endpoints
NodeForgeCMS exposes two AI-powered endpoints for semantic search and content translation. Both require a valid Bearer token.AI Semantic Search
Performs a semantic search across all published content using natural language. Returns ranked results relevant to the query. Requires a valid Bearer token.Request Body
The natural-language search query. The AI engine interprets meaning and intent rather than matching keywords literally.
Language code for the search context (e.g.
en, zh, fr). Results are ranked within the specified language corpus.Response
| Field | Type | Description |
|---|---|---|
results | array | Ranked array of matching article summaries |
results[].id | number | Article ID |
results[].title | string | Article title |
results[].summary | string | Short excerpt from the article |
results[].score | number | Relevance score between 0 and 1 — higher is more relevant |
total | number | Total number of results returned |
AI Content Translation
Translates a block of content from one language to another using the AI translation engine. Useful for automating multi-locale content workflows. Requires a valid Bearer token.Request Body
The content to translate. Accepts plain text or HTML. HTML tags and structure are preserved in the translated output.
Language code of the input content (e.g.
en, zh, de). Must match the actual language of the supplied content.Language code of the desired output language (e.g.
fr, es, ja). The translated content will be returned in this language.Response
| Field | Type | Description |
|---|---|---|
translatedContent | string | The translated content in the target language. HTML structure is preserved if the input contained HTML. |
Translation quality depends on the AI model configured in your NodeForgeCMS deployment. Very long content bodies may be subject to token limits — split large articles into sections if you encounter
400 errors.