---
title: "Upload a document"
method: POST
path: "/cases/{case_id}/documents"
tags: ["Documents"]
---

# Upload a document

`POST /cases/{case_id}/documents`

## Request

- Base URL: `https://api.example.com/v1`
- URL: `https://api.example.com/v1/cases/{case_id}/documents`
- Auth: none declared

Upload a document file to a case.

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The document file.
  - `type` 'death_certificate' | 'probate_document' | 'bank_document' | 'credit_report' | 'birth_certificate' | 'deceased_id' | 'executor_id' | 'property_report' | 'will' | 'trust_documents' | 'other', required

## Response `201`

Document uploaded.

- object
  - `data` Document
    - `id` string
    - `type` 'death_certificate' | 'probate_document' | 'bank_document' | 'credit_report' | 'birth_certificate' | 'deceased_id' | 'executor_id' | 'property_report' | 'will' | 'trust_documents' | 'other'
    - `file_name` string
    - `file_size_bytes` integer
    - `mime_type` string
    - `status` 'uploaded' | 'skipped' | 'pending' | 'rejected'
    - `uploaded_at` string, date-time
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `404`: Resource not found.
- `422`: Request validation failed.

---

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