REST API for Headless Multilingual WordPress
If you’re building a headless WordPress site — React, Next.js, Nuxt, SvelteKit, Astro, or any other JavaScript frontend — you need to fetch translated content from WordPress over HTTP. Lang Forge exposes a REST API so you can.
The endpoints
All endpoints live under /wp-json/langforge/v1/ and follow standard WordPress REST API conventions — HTTP methods, status codes, and authentication via WordPress’s existing auth mechanisms (cookies for logged-in users, application passwords for API keys, OAuth for third-party apps).
Languages
GET /languages: list the active languages with their code, name, locale, and URL
Translations
GET /translations/<post_id>: list the translations of a post, with the ID, title, status, and permalink of eachPOST /translations: link two existing posts as translations of each other (post_id,target_post_id,language)DELETE /translations/<post_id>/<lang>: remove the link to the translation in that language (the translated post itself is kept)
Translation status
GET /translation-status: how many posts are translated in each language, for one post type (post_type, defaultpost)
Glossary
GET /glossary: list glossary terms (filter withfrom,to, andsearch)POST /glossary: add a termPUT /glossary/<id>: update a termDELETE /glossary/<id>: delete a termPOST /glossary/check: check a text against the glossary for a language pairPOST /glossary/import: import terms from CSV text
Translation memory (Pro)
GET /tm/suggest: get translation memory suggestions for a text (text,from,to)GET /tm: list the entries page by page, with searchGET /tm/entries: list the entries for a language pairPUT /tm/<id>: update the translated text of an entryDELETE /tm/<id>: delete an entryPOST /tm/populate: fill the memory from existing translationsPOST /tm/import-tmx: import a TMX fileGET /tm/export-tmx: export the memory as a TMX file
Analytics (Pro)
GET /analytics: translation analytics for a period (period, default30d)
Language fields on posts
The standard WordPress endpoints for posts and pages also carry two extra fields: langforge_language, the language of the post (you can set it in a write request), and langforge_translations, read only, a map from language code to the ID of the translation.
Authentication
The REST API uses WordPress’s native authentication. For headless frontends, the recommended approach is application passwords (a built-in WordPress feature since 5.6) or JWT via a third-party plugin. Lang Forge doesn’t introduce its own auth layer — it respects whatever you already have.
Every endpoint requires authentication. Languages, translations, glossary checks, and translation memory suggestions need the edit_posts capability, and the translation endpoints also check that you can edit the posts involved. Translation status, the rest of the glossary and translation memory endpoints, and analytics need manage_options.
Use cases
Headless WordPress sites
Fetch translated content into a React or Next.js frontend. Lang Forge returns the same shape as the WordPress core REST API, with additional language metadata on every post.
Mobile apps
Consume translated content in a native mobile app via the REST API. Users see the app in their preferred language, served by WordPress on the backend.
Third-party integrations
A Zapier, Make, or n8n workflow that fetches a translated post on demand — for sending out newsletters, syndicating to social media, or piping content into a separate CMS.
Custom admin tools
Build an admin dashboard in Retool, Budibase, or your own tool that talks to Lang Forge directly. Useful for agencies managing multilingual content across dozens of client sites.
CI/CD automation
Nightly build pipelines that fetch the latest translations and rebuild a static site.
Rate limiting and caching
Every request must be authenticated, and Lang Forge adds no cache headers or rate limits of its own.
Documentation and examples
Full endpoint documentation, with request/response examples and authentication walkthroughs, lives in our documentation →.
Ready to build a headless multilingual site?
The REST API is included in every paid plan and in the free version on WordPress.org. The translation memory and analytics endpoints are part of Pro.