# create

URL: /business/nouns/file/create · Id: `verb:File.create` · Call: `await $.File.create({ … })` (SDK) or the `do` tool at `https://api.sb/mcp`. Inputs says what to pass, Outputs what returns, When it waits who approves.

> Creates a File.

Create makes a new [File](/business/nouns/file) from the inputs below. It is inherited: every [Noun](/business/nouns/noun) has `get`, `list`, `create`, `update` and `delete`.

## Inputs
| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `contentType` | `string` | Yes | The media type, such as `application/pdf`. |
| `size` | `integer` | Yes | The size in bytes. |
| `name` | `string` | No | The file name it was uploaded with. |
| `visibility` | `string` | No | Who may read it: `Owner`, `Customer`, or `Public`. The default is `Owner`. |
| `document` | [Document](/business/nouns/document) | No | Each rendering of a Document to a format, such as PDF, is stored as a File. |

## Outputs
| Output | Type | Required | Description |
| --- | --- | --- | --- |
| `file` | [File](/business/nouns/file) | Yes | The File. |

## Effects
- Emits `File.created`.
- Two-way: `try`, `send`, `do`.

## Refuses when
| Check | Error | Fix | Then call |
| --- | --- | --- | --- |
| The key is valid, but its scopes do not allow this operation. | [`forbidden`](/code/api/errors/forbidden) | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | [File.create](/business/nouns/file/create) |

## When it waits
| Gate | Default |
| --- | --- |
| Decision class | Low: two-way, nothing at stake |
| [Delay window](/systems/trust-and-governance/controls/one-way-windows) | None: it runs once review passes. |
| Limit | The call [Limit](/business/nouns/limit) of the [Permission](/business/nouns/permission) it runs under. |
| Over the Limit | It waits `pending` for an [Approval](/business/nouns/approval) from the [Founder](/agents/founding/founder). Approved, it runs; refused, it ends `refused` with [`limit-exceeded`](/code/api/errors/limit-exceeded); unanswered by its deadline, it ends `canceled`. |

## Example

**Ask**

```text
Add a file to QuietCopy.
```

**API**

```bash
curl -X POST https://api.sb/quietcopy.com/files \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contentType":"Example content type","size":1}'
```

```json
{
  "api": "https://api.sb/quietcopy.com",
  "file": {
    "$id": "https://api.sb/quietcopy.com/files/file_1",
    "$type": "File",
    "contentType": "Example content type",
    "size": 1
  },
  "action": {
    "$id": "https://api.sb/quietcopy.com/actions/action_1",
    "operation": "File.create",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/quietcopy.com/actions/action_1"
  }
}
```

**SDK**

```ts
import { $ } from 'startup-builder'

const file = await $.File.create({ contentType: 'Example content type', size: 1 })
```

**CLI**

```bash
npx startup-builder do File.create --json '{"contentType":"Example content type","size":1}'
```

**MCP**

```json
{
  "name": "do",
  "arguments": {
    "code": "return await $.File.create({ contentType: 'Example content type', size: 1 })"
  }
}
```