---
title: "CreateFunctionFileBody"
description: "Request body for creating a FunctionFile."
section: "Reference"
group: "Types"
order: 104
---

## Definition

```ts
interface CreateFunctionFileBody {
  versionId: string;
  name: string;
  source: string;
}
```

## Fields

| Field       | Type     | Notes                                                                                                               |
| ----------- | -------- | ------------------------------------------------------------------------------------------------------------------- |
| `versionId` | `string` | `required` — Function version this file belongs to.                                                                 |
| `name`      | `string` | `required` — Logical file name (e.g. `index.ts`, `package.json`, `lib/util.ts`). Must be unique within the version. |
| `source`    | `string` | `required` — Raw file contents.                                                                                     |
