---
title: "Upload a File"
method: POST
path: "/v1/files"
tags: ["files"]
---

# Upload a File

`POST /v1/files`

## Request

- Base URL: `https://sandboxapi.givechariot.com`
- URL: `https://sandboxapi.givechariot.com/v1/files`
- Auth: HTTP bearer

Upload a file with a given purpose to Chariot as `multipart/form-data`.

## Headers

- `Idempotency-Key` string

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The file's bytes. At most 100 MiB.
  - `purpose` 'manual_upload' | 'grant_letter' | 'integration_download' | 'inbound_mail_item' | 'inbound_mail_item_thumbnail' | 'inbound_email' | 'inbound_email_attachment' | 'bank_check_image_front' | 'bank_check_image_back' | 'check_attachment' | 'bank_statement' | 'bank_account_verification_letter' | 'automation_output' | 'export' | 'other', required: The file's purpose. Note that entries may be added to this list without notice.
  - `description` string: A description of the file.

## Response `200`

The `Idempotency-Key` had already stored this file, so the existing File is
returned and nothing was uploaded again.

- File: Files are objects that represent a file hosted on Chariot's servers. If you need to download a File, create a File Link.
  - `id` string: The unique identifier for the file.
  - `file_name` string: The name of the file.
  - `description` string, nullable: The description of the file.
  - `purpose` 'manual_upload' | 'grant_letter' | 'integration_download' | 'inbound_mail_item' | 'inbound_mail_item_thumbnail' | 'inbound_email' | 'inbound_email_attachment' | 'bank_check_image_front' | 'bank_check_image_back' | 'check_attachment' | 'bank_statement' | 'bank_account_verification_letter' | 'automation_output' | 'export' | 'other': The file's purpose. Note that entries may be added to this list without notice.
  - `content_type` string: The MIME type of the file.
  - `size_bytes` integer: The size of the file in bytes.
  - `created_at` string, date-time: The date and time when the file was created.
  - `updated_at` string, date-time: The date and time when the file was last updated.

## Other responses

- `201`: The file was stored.
- `400`: The request is invalid or contains invalid parameters
- `401`: Unauthorized. The request is missing the security (OAuth2 Bearer token) requirements and the server is unable to verify the identify of the caller.
- `403`: Access denied
- `409`: Resource Conflicts
- `500`: Internal Server Error

---

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