You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Future request] Implement API support for Docmost #346
I'd like to request API support for Docmost. This API will allow external systems to communicate with Docmost, enabling functions such as automated document generation, external system integration, and remote data retrieval.
Use cases:
Integration with third-party applications for automatic document generation.
External tools to manage, search, and retrieve documents from Docmost without requiring direct access to the UI.
Enabling automated workflows where documents need to be processed and transferred between different services or systems.
Consider integrating such capabilities early in the app development process. It would be wonderful if we could send API queries instead of exchanging records in the database.
Reacted by Astecom, Floris van Lint, David Sabbath Grits, prolawg, Adam Dumicich, Gerold Penz, Daniel Dunning, Mahmoud Samy, BrandForge-Matt, Boris Kayi and 17 more
I am also interested in this and it is the most important feature I am looking for. Looking through the code I am not able to find anything for updating the content on a page.
I found this to update the page name etc, but not anything about content.
Having a bit of a hard time navigating the project, I decided to look at how the frontend updates the page content and it is using Tiptap over websocket.
This is also something I stumbled in to. Was looking at a game development use case where a script would create a document for each item in a game, allowing the writers to work on descriptions there, and using a script to export & recycle the documents after everything was done.
There is an API. It will be documented in the future. @Philipinho, is there any update on this request?
Docmost is being reviewed and would likely be adopted by my team. Thank you and your team for great software, we need our deployed services to have api endpoints to send reports to.
I'm also curious about what others are using. At the moment I'm considering falling back to Notion because it has an API and it's possible to allow guests to comment documents for free without accounts.
There is an API. It will be documented in the future.
Is there currently any priority to at least list features of the API with the endpoint names. And maybe the link to the source code to know what object to pass to the endpoint?
As we search for a solution which we could simultaneously integrate with an AI Agent to search and retrieve information from it it would be crucial to be able to search and retrieve pages
@oliviertripet format accepts both markdown and html. You should attach the file as binary. See screenshot below. Make sure the file key comes last in the request.
is there a documentation somewhere how to use the API... i found the postman webpage (https://www.postman.com/docmost-api) but already fail at the auth part... with "cannot Post /auth/login (404). i use docmost (vanilla), converted the docker compose file to k8s deployment! I wonder if it might have something to do with the APP_SECRET, but am completely lost at the moment.
is there a documentation somewhere how to use the API... i found the postman webpage (https://www.postman.com/docmost-api) but already fail at the auth part... with "cannot Post /auth/login (404). i use docmost (vanilla), converted the docker compose file to k8s deployment! I wonder if it might have something to do with the APP_SECRET, but am completely lost at the moment. @dderichswei
@Benone - I am interested in your question to re: being able to update existing. I suspect it' only for new page content addition since it does not look like it accepts an ID value and this would be necessary for updating content.
I tried to create an endpoint in Python to fix this quickly until there is a fully-documented API
After investigating DB realized actual content is stored as JSON and not just simple markdown
This storage is likely standard for Prosemirror but makes it tough to just create some temporary endpoint as I'd have to parse this json and think through Prosemirror's logic
Going to abandon this idea ... Maybe could write a temporary endpoint using Prosemirror's API and Node but just documenting that this hack idea has failed me to save anyone else time that has this idea
Update: Looks like finally got this working! I had some port blocking because of Cloudflare and now it works but had to used Y.js and websockets and mirror the collab server within app to get it work with external requests!
@Philipinho ... thanks for the reply. But import only creates a new page with content, right? It does not update an existing page? We're create a bidirectional sync so need a way to update existing content. I was using Python and then hit the Webocket issue of the collaborative editor and then started to use Node to try to get around this but finally hit an error that may be the result of inherent restrictions on making page edits outside the web editor? ... that scripts are restricted in current, default Docmost build? Testing a fully Node-based version and getting "wss://docs.mydomain.com:3001/collab' failed: " in Console ... so maybe this is security blocked?
Using Node, I created a rest-based endpoint just for updating content.
Until Docmost has a full-featured API you can now just run this on a server somewhere and it will act as a bridge. You can still use the rest of the endpoints in the Postman for all the other operations but if you also need to update, this works.
Of course, I may have missed something in all this and not needed to do this but I couldn't get IMPORT to work for update and was anxious to try to get it working.
I just run mine on a little VPS and run it directly on Node 22.x ... it is important to use a newish version of Node, like great than 20. When you run it like this I just added a little .env file to define my IP or domain. The docker-based version might worker but I didn't test it after I got it running directly and it worked fine for my needs.
The update seems to take a few seconds / not immediate. Unclear why.
Activity
timiil commentedon Sep 30, 2024
yes, we need APIs with create space , create doc, update doc, remove doc, list space doc tree ...
Philipinho commentedon Sep 30, 2024
API Documentation: https://docmost.com/api-docs
There is an API. It will be documented in the future.timiil commentedon Sep 30, 2024
please tell us which API ? we are looking for use apis to update doc, not use websocket. thanks advance!
erictuvesson commentedon Oct 29, 2024
I am also interested in this and it is the most important feature I am looking for. Looking through the code I am not able to find anything for updating the content on a page.
I found this to update the page name etc, but not anything about content.
docmost/apps/server/src/core/page/page.controller.ts
Line 80 in 978fadd
Having a bit of a hard time navigating the project, I decided to look at how the frontend updates the page content and it is using Tiptap over websocket.
docmost/apps/client/src/features/editor/page-editor.tsx
Lines 73 to 79 in 978fadd
docmost/apps/client/src/features/editor/page-editor.tsx
Line 166 in 978fadd
@Philipinho could you provide a little bit more context? Or reopen the issue as it doesn't seem to exist.
jcpsantiago commentedon Nov 24, 2024
@erictuvesson did you see anything about accessing content? I just want to get a page's Markdown via an API call.
erictuvesson commentedon Nov 25, 2024
A quick look, it seems you might be able to use this.
Which I expect would return this:
I have not looked at authentication.
Since I didn't get a response on this issue and the lack of support I decided to use another system to meet my requirements.
IcedQuinn commentedon Dec 13, 2024
This is also something I stumbled in to. Was looking at a game development use case where a script would create a document for each item in a game, allowing the writers to work on descriptions there, and using a script to export & recycle the documents after everything was done.
dockerman2020 commentedon Dec 26, 2024
martinjo commentedon Jan 13, 2025
What other system did you settle for? I’m also looking for something similar to docmost that I can integrate into other systems.
jcpsantiago commentedon Jan 13, 2025
I'm also curious about what others are using. At the moment I'm considering falling back to Notion because it has an API and it's possible to allow guests to comment documents for free without accounts.
wienans commentedon Feb 15, 2025
Is there currently any priority to at least list features of the API with the endpoint names. And maybe the link to the source code to know what object to pass to the endpoint?
As we search for a solution which we could simultaneously integrate with an AI Agent to search and retrieve information from it it would be crucial to be able to search and retrieve pages
n8himmel commentedon Feb 16, 2025
I found this documentation, but didn't have a chance to look into it yet.
https://www.postman.com/docmost-api
Would appreciate any comment if it works for you.
I will certainly post after trying.
paulpv commentedon Feb 17, 2025
As is mentioned in #503
7 remaining items
oliviertripet commentedon Apr 13, 2025
@Philipinho it works like a charm. Many thanks !
me-kirill commentedon Apr 27, 2025
Thank you! Can I overwrite existing file using import?
dderichswei commentedon Jun 22, 2025
is there a documentation somewhere how to use the API... i found the postman webpage (https://www.postman.com/docmost-api) but already fail at the auth part... with "cannot Post /auth/login (404). i use docmost (vanilla), converted the docker compose file to k8s deployment! I wonder if it might have something to do with the APP_SECRET, but am completely lost at the moment.
der--flo commentedon Jun 28, 2025
Try to add /api/ to your base_url, so the whole url reads https://domain.tld/api/auth/login
ReessKennedy commentedon Jul 26, 2025
@Benone - I am interested in your question to re: being able to update existing. I suspect it' only for new page content addition since it does not look like it accepts an ID value and this would be necessary for updating content.
ReessKennedy commentedon Aug 8, 2025
Philipinho commentedon Aug 8, 2025
@ReessKennedy use the page import endpoint to create pages with markdown or html.
ReessKennedy commentedon Aug 8, 2025
Update: Looks like finally got this working! I had some port blocking because of Cloudflare and now it works but had to used Y.js and websockets and mirror the collab server within app to get it work with external requests!
@Philipinho ... thanks for the reply. But import only creates a new page with content, right? It does not update an existing page? We're create a bidirectional sync so need a way to update existing content. I was using Python and then hit the Webocket issue of the collaborative editor and then started to use Node to try to get around this but finally hit an error that may be the result of inherent restrictions on making page edits outside the web editor? ... that scripts are restricted in current, default Docmost build? Testing a fully Node-based version and getting "wss://docs.mydomain.com:3001/collab' failed: " in Console ... so maybe this is security blocked?
ReessKennedy commentedon Aug 22, 2025
See here - https://github.com/tool-ext/docmost-api-bridge
Using Node, I created a rest-based endpoint just for updating content.
Until Docmost has a full-featured API you can now just run this on a server somewhere and it will act as a bridge. You can still use the rest of the endpoints in the Postman for all the other operations but if you also need to update, this works.
Of course, I may have missed something in all this and not needed to do this but I couldn't get IMPORT to work for update and was anxious to try to get it working.
I just run mine on a little VPS and run it directly on Node 22.x ... it is important to use a newish version of Node, like great than 20. When you run it like this I just added a little .env file to define my IP or domain. The docker-based version might worker but I didn't test it after I got it running directly and it worked fine for my needs.
The update seems to take a few seconds / not immediate. Unclear why.
Philipinho commentedon Feb 13, 2026
Full API Documentation: https://docmost.com/api-docs
perf(delivery): pre-compress static + cache headers + compress API re…
fix(docmost#346 review F1-F4): no 206-compress + Vary + precompress V…
Merge pull request 'perf(delivery): пре-сжатие статики + кэш-заголовк…
fix(delivery): immutable-кэш ассетов — отключить дефолтный cacheContr…