> 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 Record By Id

GET https://fai.buildwithfern.com/code/{domain}/{code_id}

Reference: https://fern.docs.buildwithfern.com/learn/docs/ai-features/ask-fern/api-reference/code/get-code-record-by-id

## Authentication

- `Authorization` header (bearer token, required)

## Servers

- `https://fai.buildwithfern.com` (Production, default)
- `https://fai-dev.buildwithfern.com` (Development)
- `http://localhost:8080` (Local)

## Request

### Path parameters

- `domain` (string, required)
- `code_id` (string, required)

## Response

### 200

Successful Response

- `document` (object, required) — The requested code
  - `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)

## Examples

**Response**

```json
{
  "document": {
    "code_id": "string",
    "domain": "string",
    "chunk": "string",
    "document": "string",
    "created_at": "2024-01-15T09:30:00Z",
    "updated_at": "2024-01-15T09:30:00Z",
    "title": "string",
    "url": "string",
    "version": "string",
    "product": "string",
    "keywords": [
      "string"
    ],
    "authed": true
  }
}
```