For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog inStart for free
  • Getting started
    • Overview
    • How it works
    • Quickstart
    • Project structure
    • Customer showcase
    • Changelog
  • Configuration
    • Overview
    • Site-level settings
    • Page-level settings
  • Writing content
    • Markdown basics
    • Rich media in Markdown
    • Fern Editor
    • Reusable snippets
  • AI features
    • Overview
    • Fern Writer
    • AI-generated examples
    • Markdown access
      • Overview
      • Customize LLM output
      • Agent directives
      • Analytics and integration
    • MCP server
    • API catalog discovery
      • Overview
        • Overview
          • POSTCreate Document
          • POSTBatch Create Document
          • GETGet Document By Id
          • PATCHUpdate Document
          • DELDelete Document By Id
          • DELBatch Delete Document
          • GETGet Documents
          • DELDelete All Documents
  • Public API
    • GETJWT from Fern API key
    • GETAlgolia search credentials
    • GETCurrent user information
  • Fern Writer API
    • GETGet Fern Writer Install Link
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
AI featuresAsk FernAPI referenceDocument

Update Document

||View as Markdown|
PATCH
/document/:domain/:document_id
PATCH
/document/:domain/:document_id
$curl -X PATCH https://fai.buildwithfern.com/document/domain/document_id \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "document": {
3 "document_id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
4 "domain": "example.com",
5 "chunk": "This is a sample chunk of text extracted from the document for indexing purposes.",
6 "document": "This document provides detailed information about the API usage and integration guidelines.",
7 "created_at": "2024-01-15T09:30:00Z",
8 "updated_at": "2024-01-15T09:30:00Z",
9 "title": "API Integration Guide",
10 "url": "https://example.com/api-integration-guide",
11 "version": "v2.3.1",
12 "product": "ExampleAPI",
13 "keywords": [
14 "API",
15 "integration",
16 "guide",
17 "documentation"
18 ],
19 "authed": true
20 }
21}
Was this page helpful?
Previous

Get Document By Id

Next

Delete Document By Id

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

domainstringRequired
document_idstringRequired

Request

This endpoint expects an object.
documentstring or nullOptional
The updated content of the document that will be returned to Ask Fern during document retrieval. If not provided, this field will remain unchanged.
chunkstring or nullOptional
The updated textual content that should be vectorized when indexing the document. If not provided, this field will remain unchanged.
titlestring or nullOptional
The updated title of the document. If not provided, this field will remain unchanged.
urlstring or nullOptional
The updated url of the document. If not provided, this field will remain unchanged.
versionstring or nullOptional
The updated version of the document. If not provided, this field will remain unchanged.
productstring or nullOptional
The updated product of the document. If not provided, this field will remain unchanged.
keywordslist of strings or nullOptional
The updated keywords of the document. If not provided, this field will remain unchanged.
authedboolean or nullOptional
The updated authed status of the document. If not provided, this field will remain unchanged.

Response

Successful Response
documentobject
The updated document

Errors

422
Unprocessable Entity Error