---
title: "Upload Bank Statement Endpoint"
method: POST
path: "/v2/bank-statements/upload"
tags: ["bank-statements"]
---

# Upload Bank Statement Endpoint

`POST /v2/bank-statements/upload`

## Request

- Base URL: `https://api.stuut.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stuut.ai/v2/bank-statements/upload`
- Auth: HTTP bearer

Upload a Bank Statement

Create a new bank statement and get a presigned URL for uploading the file.
After receiving the presigned URL, upload the file directly to S3.

## Request body

- UploadBankStatementRequest: Request schema for uploading a bank statement.
  - `account_id` string, nullable: Bank account ID to associate the statement with
  - `filename` string, required: Name of the file being uploaded
  - `mime_type` union, required: MIME type of the file
    - 'application/json' | 'application/pdf' | 'application/msword' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.oasis.opendocument.spreadsheet' | 'application/vnd.ms-excel.sheet.macroEnabled.12' | 'application/vnd.ms-excel.sheet.macroenabled.12' | 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' | 'application/vnd.ms-excel.sheet.binary.macroenabled.12' | 'application/vnd.ms-powerpoint' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'text/csv' | 'application/csv' | 'text/plain' | 'text/html' | 'application/xml' | 'message/rfc822' | 'application/vnd.ms-outlook' | 'application/rtf' | 'text/markdown' | 'text/md'
    - 'image/heic' | 'image/jpeg' | 'image/jpg' | 'image/png' | 'image/gif' | 'image/svg+xml' | 'image/x-eps' | 'image/tiff' | 'image/bmp' | 'image/webp' | 'image/avif'
    - 'audio/mp3' | 'audio/mp4' | 'audio/mpeg' | 'audio/wav' | 'audio/x-wav' | 'audio/webm'
    - 'video/MP2T' | 'video/quicktime' | 'video/mp4' | 'video/mpeg' | 'video/webm' | 'video/x-msvideo' | 'video/x-ms-wmv'
    - 'application/zip' | 'application/x-zip-compressed' | 'application/vnd.rar' | 'application/x-rar-compressed' | 'application/x-7z-compressed'
    - 'unknown'

## Response `200`

Successful Response

- UploadBankStatementResponse: Response schema for bank statement upload.
  - `presigned_url` PresignedUrl, required
    - `url` string, required
    - `fields` object, required
    - `method` 'POST' | 'PUT', required
    - `headers` object, required
    - `max_size` integer, required
  - `statement` BankStatementListItem, required: Response schema for bank statement list items (no transactions).
    - `created_at` string, date-time, required
    - `modified_at` string, date-time, nullable, required
    - `id` string, required
    - `status` 'submitted' | 'processing' | 'invalid' | 'pending_approval' | 'approved' | 'split' | 'synced', required
    - `period_start` string, date, nullable, required: The statement period's start date.
    - `period_end` string, date, nullable, required: The statement period's end date.
    - `account_id` string, nullable, required
    - `account_number` string, nullable, required: The account number that the statement relates to.
    - `attachment` BankStatementAttachment, required: Attachment information for a bank statement.
      - `id` string, required
      - `name` string, required
      - `src` string, nullable, required: Presigned URL to download the file
      - `mime_type` union, required: MIME type of the file
        - 'application/json' | 'application/pdf' | 'application/msword' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.ms-excel' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.oasis.opendocument.spreadsheet' | 'application/vnd.ms-excel.sheet.macroEnabled.12' | 'application/vnd.ms-excel.sheet.macroenabled.12' | 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' | 'application/vnd.ms-excel.sheet.binary.macroenabled.12' | 'application/vnd.ms-powerpoint' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'text/csv' | 'application/csv' | 'text/plain' | 'text/html' | 'application/xml' | 'message/rfc822' | 'application/vnd.ms-outlook' | 'application/rtf' | 'text/markdown' | 'text/md'
        - 'image/heic' | 'image/jpeg' | 'image/jpg' | 'image/png' | 'image/gif' | 'image/svg+xml' | 'image/x-eps' | 'image/tiff' | 'image/bmp' | 'image/webp' | 'image/avif'
        - 'audio/mp3' | 'audio/mp4' | 'audio/mpeg' | 'audio/wav' | 'audio/x-wav' | 'audio/webm'
        - 'video/MP2T' | 'video/quicktime' | 'video/mp4' | 'video/mpeg' | 'video/webm' | 'video/x-msvideo' | 'video/x-ms-wmv'
        - 'application/zip' | 'application/x-zip-compressed' | 'application/vnd.rar' | 'application/x-rar-compressed' | 'application/x-7z-compressed'
        - 'unknown'
      - `file_type` string, nullable, required: File type category (e.g., pdf, image)
    - `processing_error` ProcessingError, required: Processing error details.
      - `error_code` union, required
        - 'duplicate' | 'insufficient' | 'invalid_file_type' | 'irrelevant' | 'processing_error' | 'upload_missing'
        - 'no_matching_account' | 'missing_period_dates' | 'no_extraction_data' | 'invalid_transaction_data' | 'extend_workflow_failed'
      - `error_message` string, required: Human-readable error message
    - `transaction_count` integer, required: Number of transactions in this statement
    - `total_deposits` string, decimal, nullable, required: Sum of all deposit transactions in standard currency units (e.g. dollars)
    - `total_withdrawals` string, decimal, nullable, required: Sum of all withdrawal transactions in standard currency units (e.g. dollars)
    - `account_mask` string, nullable, required: Masked account number (last 4 digits) from linked BankAccount
    - `account_name` string, nullable, required: Name of the linked BankAccount
    - `currency` string, nullable, required: ISO-4217 currency code from linked BankAccount
    - `object` string, required: String representing the object's type. Objects of the same type share the same value.

## Other responses

- `422`: Validation Error

---

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