---
title: "Upload a file attachment (Developer API)"
method: POST
path: "/api/v1/uploadfile/{stackId}/{tableId}"
tags: ["File Upload"]
---

# Upload a file attachment (Developer API)

`POST /api/v1/uploadfile/{stackId}/{tableId}`

## Request

- Base URL: `https://stackby.com`
- URL: `https://stackby.com/api/v1/uploadfile/{stackId}/{tableId}`
- Auth: API key in header `X-API-Key`

Uploads a file attachment to a stack/table. The returned URL can then be set in an Attachment column when creating or updating a row via the rowcreate/rowupdate Developer API endpoints.

## Path parameters

- `stackId` string, required
- `tableId` string, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required

## Response `201`

File uploaded successfully

- object
  - `status` string
  - `data` object
    - `fileId` string
    - `filename` string
    - `mimeType` string
    - `size` integer
    - `url` string
    - `uploadedAt` string, date-time

## Other responses

- `400`: Missing file, or stack/table not found
- `401`: Invalid or missing API key

---

[API](https://skmtc.dev/stackby/apis/stackby-api-complete-documentation.md) - [All operations](https://skmtc.dev/stackby/apis/stackby-api-complete-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/stackby/apis/stackby-api-complete-documentation/revisions/c9909a003a56?raw)
