---
title: "Register an uploaded attachment after R2 verification"
method: POST
path: "/api/preview/attachments/confirm"
tags: ["attachment"]
---

# Register an uploaded attachment after R2 verification

`POST /api/preview/attachments/confirm`

## Request body

- object
  - `capsuleId` string, required — UUID v4 string
  - `fileName` string, required — Original file name; persisted on the row for display.
  - `objectKey` string, required — Canonical R2 object key returned from the presign endpoint. Server verifies the prefix matches `<userId>/<capsuleId>/` before insert.

## Response `201`

Successful response

- object
  - `available` boolean
  - `capsule_id` string, nullable
  - `created_at` string
  - `deleted_at` string, nullable
  - `expires_at` string, nullable
  - `file_name` string
  - `id` string
  - `mime_type` string
  - `object_key` string
  - `retention` object
    - `days` integer, nullable, required
    - `expires_at` string, nullable, required
    - `note` string, required
    - `policy` 'expires' | 'permanent', required
  - `size` integer
  - `unavailable_at` string, nullable
  - `unavailable_reason` string, nullable

## Changes

- **2026-08-29** `9ca3e15b9d44` — 1 info
  - added the optional property `retention` to the response with the `201` status

[Change history](https://skmtc.dev/symbol/apis/symbol-api/changes/api/preview/attachments/confirm/post.md)

---

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