---
title: "Create Backoffice Attachment Upload"
method: POST
path: "/backoffice/files/attachments/uploads"
tags: ["Backoffice"]
---

# Create Backoffice Attachment Upload

`POST /backoffice/files/attachments/uploads`

## Request

- Base URL: `https://api.toolhouse.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.toolhouse.ai/backoffice/files/attachments/uploads`
- Auth: HTTP bearer

Create a direct-to-R2 attachment upload without proxying file bytes.

## Request body

- BackofficeAttachmentUploadCreateRequest: Create a direct-to-storage upload for a service-provided attachment.
  - `user_id` string, required
  - `filename` string, required
  - `mime_type` string, required
  - `size_bytes` integer, required
  - `agent_id` string, uuid, nullable
  - `run_id` string, uuid, nullable
  - `metadata` object, nullable

## Response `201`

Successful Response

- BackofficeAttachmentUploadCreateResponse: A file row and signed target for a direct attachment upload.
  - `data` FileModel, required: Stored file metadata.
    - `id` string, uuid, required
    - `user_id` string, required
    - `filename` string, required
    - `mime_type` string, required
    - `size_bytes` integer, required
    - `storage_provider` string, required
    - `bucket` string, required
    - `object_key` string, required
    - `public_url` string, nullable
    - `etag` string, nullable
    - `checksum_sha256` string, nullable
    - `run_id` string, uuid, nullable
    - `tags` string[], required
    - `status` 'uploading' | 'ready' | 'failed' | 'deleted', required
    - `metadata` object, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
    - `deleted_at` string, date-time, nullable
  - `upload_url` string, required
  - `headers` object, required
  - `expires_in_seconds` integer, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-06** `05df66628f74`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/toolhouse/apis/toolhouse-api/changes/backoffice/files/attachments/uploads/post.md)

---

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