# Upload

`POST /workspaces/:workspace/artifacts/:artifact_id/versions/:version_id/content/upload/:path`

Upload file to artifact version

**Required Scopes:** `ARTIFACT_WRITE`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The Artifact ID */
  artifact_id: string; // Example: "x5169jL2"
  /** The Version ID */
  version_id: string; // Example: "a9f84k2L"
  /** Path where the file should be created */
  path: string; // Example: "src/main.js"
}
```

## Response Body

```typescript
interface ResponseBody {
  /** Type of the content item */
  type?: "FILE" | "DIR";
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** File or directory name */
  name?: string;
  /** Full path to the file or directory */
  path?: string;
  /** Size in bytes. Only present when type=FILE. */
  size?: number;
}
```

## Response Example

**Status:** `201 Created`

```json
{
  "url": "https://api.buddy.works/workspaces/ttests/artifacts/x5169jL2/versions/a9f84k2L/content/src/app.js",
  "html_url": "https://app.buddy.works/ttests/-/artifacts/x5169jL2/versions/a9f84k2L/content/src/app.js",
  "type": "FILE",
  "name": "app.js",
  "path": "src/app.js",
  "size": 2048576
}
```

---
Original source: https://buddy.works/docs/api/artifacts/versions/content/upload