---
title: "POST /api/databases/{database_pk}/assets/"
method: POST
path: "/api/databases/{database_pk}/assets/"
tags: ["databases"]
---

# POST /api/databases/{database_pk}/assets/

`POST /api/databases/{database_pk}/assets/`

Register a new file asset on a database and return a presigned URL the client uses to upload the file directly to cloud storage.

## Path parameters

- `database_pk` string, required

## Request body

- AssetPreUpload
  - `asset` object, required
    - `id` string, uuid
    - `download_url` string, uri
    - `filename` string — The original filename. Note this is different than the cloud storage filename.
    - `is_uploaded` boolean — True if the file is uploaded to cloud storage
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `upload_url` string, uri, required
  - `fields` object, required

## Response `201`

---

[API](https://skmtc.dev/pixiebrix/apis/pixiebrix-api.md) · [All operations](https://skmtc.dev/pixiebrix/apis/pixiebrix-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pixiebrix/pixiebrix-api/revisions/941ab9eb01d6/schema)
