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 Code Record
          • POSTBatch Create Code Records
          • GETGet Code Record By Id
          • GETGet Code Records
          • DELDelete Code Record By Id
          • DELDelete All Code Records
  • 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 referenceCode

Get Code Records

||View as Markdown|
GET
/code/:domain
GET
/code/:domain
$curl https://fai.buildwithfern.com/code/domain \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "documents": [
3 {
4 "code_id": "cde12345-6789-4abc-def0-1234567890ab",
5 "domain": "finance",
6 "chunk": "function calculateInterest(principal, rate, time) { return principal * rate * time / 100; }",
7 "document": "Interest calculation module for financial applications",
8 "created_at": "2024-01-15T09:30:00Z",
9 "updated_at": "2024-01-15T09:30:00Z",
10 "title": "Interest Calculator",
11 "url": "https://finance.example.com/docs/interest-calculator",
12 "version": "1.2.3",
13 "product": "FinanceAPI",
14 "keywords": [
15 "interest",
16 "finance",
17 "calculation"
18 ],
19 "authed": true
20 }
21 ],
22 "pagination": {
23 "total": 1,
24 "page": 1,
25 "limit": 1
26 }
27}
Was this page helpful?
Previous

Get Code Record By Id

Next

Delete Code Record By Id

Authentication

AuthorizationBearer

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

Path parameters

domainstringRequired

Query parameters

pageinteger or nullOptional
The page number for pagination
limitinteger or nullOptional
The number of code entries per page

Response

Successful Response
documentslist of objects
List of code entries for the domain
paginationobject
Pagination information for the code list

Errors

422
Unprocessable Entity Error