---
title: "Uploads a file under a representation"
method: POST
path: "/api/v2/files/upload"
tags: ["v2 files"]
---

# Uploads a file under a representation

`POST /api/v2/files/upload`

Creates a new file resource under a representation

## Query parameters

- `aip-id` string, required
- `representation-id` string, required
- `folder` string[]
- `details` string

## Request body

- object
  - `resource` string, binary, required — Multipart file

## Response `201`

File resource created

- IndexedFile
  - `uuid` string
  - `parentUUID` string
  - `aipId` string
  - `representationId` string
  - `representationUUID` string
  - `path` string[]
  - `ancestorsPath` string[]
  - `id` string
  - `referenceUUID` string
  - `referenceURL` string
  - `referenceManifest` string
  - `fileFormat` FileFormat
    - `formatDesignationName` string
    - `formatDesignationVersion` string
    - `formatDesignation` string
    - `mimeType` string
    - `pronom` string
    - `extension` string
    - `formatRegistries` object
  - `originalName` string
  - `size` integer
  - `creatingApplicationName` string
  - `creatingApplicationVersion` string
  - `dateCreatedByApplication` string
  - `hash` string[]
  - `storagePath` string
  - `ancestors` string[]
  - `otherProperties` object
  - `fields` object
  - `instanceId` string
  - `instanceName` string
  - `createdOn` string, date-time
  - `localInstance` boolean
  - `reference` boolean
  - `available` boolean
  - `directory` boolean

## Other responses

- `409` — Already exists

---

[API](https://skmtc.net/keeps/apis/roda-rest-api.md) · [All operations](https://skmtc.net/keeps/apis/roda-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keeps/roda-rest-api/versions/afc3c5bcc0d9/schema)
