---
title: "File Uploaded"
method: POST
path: "/api/v2/retool/admin/platform-files/file-uploaded"
tags: ["v2", "Platform Files", "Platform Files"]
---

# File Uploaded

`POST /api/v2/retool/admin/platform-files/file-uploaded`

File Uploaded

After file has been successfully uploaded, this route will update the db.
If file has already been entered into the database (checked via file key)
    return existing row information

existing_file_reference_id: if this is a new version of an existing file, provide the existing file reference id to add while preserving old

## Request body

- FileUploadedPostRequest
  - `bucket` 'public' | 'private', required
  - `key` string, required
  - `org_owner` string, nullable
  - `user_owner` string, nullable
  - `existing_file_reference_id` string, uuid, nullable
  - `file_description` string, nullable
  - `updated_by` string, nullable

## Response `200`

Successful Response

- ApiResponseJSON — Standardised JSON Api Response To conforms to Aus Gov recommended format [api.gov.au](https://api.gov.au/sections/api-response.html#response-payload) Which is a modification of [JSON:API]( https://jsonapi.org/format/#introduction) data meta: meta object that contains non-standard meta-information messages: container for informational and warning messages related to the transaction. Not Implemented (not currently required): Links: [HATEOS Links](https://api.gov.au/sections/api-response.html#response-payload)
  - `data` unknown[] — List of items returned in the response following given criteria
    - unknown
  - `meta` ApiResponseMeta — Standardised Api Response Meta Not always required (except for example; with paginated results) Future: Could provide base that includes org information, copy-write etc
    - `processing_time_ms` integer, nullable
    - `total_records` integer, nullable
    - `page` integer, nullable
    - `limit` integer, nullable
    - `count` integer, nullable
    - `cursor` unknown
    - `cursor_last` unknown
    - `more_data_available` boolean, nullable
  - `messages` ApiResponseMessage[], nullable — Response Messages
    - `message_type` 'debug' | 'info' | 'warning' | 'error', required
    - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/caresquare/apis/fastapi.md) · [All operations](https://skmtc.dev/caresquare/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/caresquare/fastapi/revisions/c9df874d8d59/schema)
