---
title: "Create Run Attachment"
method: POST
path: "/v1/run-attachments"
tags: ["run-attachments"]
---

# Create Run Attachment

`POST /v1/run-attachments`

Create a new run attachment.

This endpoint is primarily for internal use. File uploads typically happen
through the run creation endpoint.

## Headers

- `Idempotency-Key` string

## Request body

- RunAttachmentCreate — Schema for creating a run attachment
  - `run_id` string, uuid, required
  - `filename` string, required
  - `content` string, required — Base64 encoded file content
  - `content_type` string, required
  - `attachment_type` 'input' | 'output', required
  - `target_path` string, nullable
  - `cleanup_imports_after_run` boolean
  - `expires_at` string, date-time, nullable

## Response `201`

Successful Response

- RunAttachmentResponse — Run attachment response schema
  - `filename` string, required
  - `content_type` string, required
  - `attachment_type` 'input' | 'output', required
  - `target_path` string, nullable
  - `cleanup_imports_after_run` boolean
  - `id` string, uuid, required
  - `user_id` string, uuid, nullable
  - `organization_id` string, nullable
  - `run_id` string, uuid, required
  - `size_bytes` integer, required
  - `storage_path` string, required
  - `expires_at` string, date-time, nullable
  - `created_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/cyberdesk-hq/apis/cyberdesk-cloud.md) · [All operations](https://skmtc.net/cyberdesk-hq/apis/cyberdesk-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cyberdesk-hq/cyberdesk-cloud/versions/830d2f48963d/schema)
