## Create `client.vals.files.create(stringvalId, FileCreateParamsparams, RequestOptionsoptions?): FileCreateResponse` **post** `/v2/vals/{val_id}/files` Create a new file, project val or directory ### Parameters - **valId:** `string` - **FileCreateParams:** `Variant0 | Variant1` - `FileCreateParamsBase` - `Variant0 extends FileCreateParamsBase` - `Variant1 extends FileCreateParamsBase` ### Returns - `FileCreateResponse` A File or Directory's Metadata - **id:** `string` The id of the resource - **links:** `Links` - **html:** `string` The URL of this resource on Val Town - **module:** `string` The URL of this resource's source code as a module - **self:** `string` The URL of this resource on this API - **endpoint:** `string` This resource's web endpoint, where it serves a website or API - **name:** `string` - **path:** `string` - **type:** `"directory" | "file" | "interval" | 3 more` - `"directory"` - `"file"` - `"interval"` - `"http"` - `"email"` - `"script"` - **updatedAt:** `string` - **version:** `number` ### Example ```node import ValTown from '@valtown/sdk'; const client = new ValTown(); const file = await client.vals.files.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { path: 'path', type: 'directory', }); console.log(file.id); ```