> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. # Get Code Records GET https://fai.buildwithfern.com/code/{domain} Reference: https://buildwithfern.com/learn/docs/ai-features/ask-fern/api-reference/code/get-code-records ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Servers - `https://fai.buildwithfern.com` (Production, default) - `https://fai-dev.buildwithfern.com` (Development) - `http://localhost:8080` (Local) ## Request ### Path parameters - `domain` (string, required) ### Query parameters - `page` (integer, optional, nullable) — The page number for pagination - `limit` (integer, optional, nullable) — The number of code entries per page ## Response ### 200 Successful Response - `documents` (list of object, required) — List of code entries for the domain - `code_id` (string, required) - `domain` (string, required) - `chunk` (string, required) - `document` (string, required) - `created_at` (datetime, required) - `updated_at` (datetime, required) - `title` (string, optional, nullable) - `url` (string, optional, nullable) - `version` (string, optional, nullable) - `product` (string, optional, nullable) - `keywords` (list of string, optional, nullable) - `authed` (boolean, optional, nullable) - `pagination` (object, required) — Pagination information for the code list - `total` (integer, required) - `page` (integer, required) - `limit` (integer, required) ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of object, optional) - `loc` (list of string or integer, required) - `msg` (string, required) - `type` (string, required) ## Examples **Request** ```json {} ``` **Response** ```json { "documents": [ { "code_id": "cde12345-6789-4abc-def0-1234567890ab", "domain": "finance", "chunk": "function calculateInterest(principal, rate, time) { return principal * rate * time / 100; }", "document": "Interest calculation module for financial applications", "created_at": "2024-01-15T09:30:00Z", "updated_at": "2024-01-15T09:30:00Z", "title": "Interest Calculator", "url": "https://finance.example.com/docs/interest-calculator", "version": "1.2.3", "product": "FinanceAPI", "keywords": [ "interest", "finance", "calculation" ], "authed": true } ], "pagination": { "total": 1, "page": 1, "limit": 1 } } ```