---
title: "Upload files and return UUIDs for each"
method: POST
path: "/api/v1beta/me/files"
tags: ["files"]
---

# Upload files and return UUIDs for each

`POST /api/v1beta/me/files`

## Request

- The document declares no server URL.
- Auth: none declared

This endpoint accepts a multipart form with one or more files and returns UUIDs for each.
If chat_id is provided, files are associated with that chat. If not provided, files are created
as standalone uploads that can be linked to assistants later.
An optional `outlook_provenance` text part carries version 1 OutlookFileProvenance JSON
(maximum 64 KiB). It must occur exactly once before any files and applies to every file
in the request. Upload files with different origins in separate requests. The original
EWS ID query parameter remains independent; a containing email's ID never replaces it.

## Query parameters

- `chat_id` string
- `external_id_ews_id` string

## Request body `multipart/form-data`

- MultipartFormFile[]
  - `file` string, binary, required
  - `name` string, required
  - `outlook_provenance` string: Optional version 1 OutlookFileProvenance JSON text (maximum 64 KiB). Send exactly once, before all file parts; applies to every file in this request. Files with different origins must be uploaded in separate requests.

## Response `200`

- FileUploadResponse: Response for file upload
  - `files` FileUploadItem[], required: The list of uploaded files with their IDs and filenames
    - `audio_synthesis` AudioSynthesisMetadata
      - `channels` integer, required
      - `encoding` string, required
      - `input_text` string, required
      - `model` string, required
      - `provider_id` string, required
      - `sample_rate` integer, required
      - `segments` string[], required
      - `voice` string, required
    - `audio_transcription` AudioTranscriptionMetadata: Optional audio transcription metadata for supported audio uploads.
      - `chunks` AudioTranscriptionChunk[], nullable: Per-chunk progress and state for future timeline alignment.
        - `attempts` integer: Number of attempts made for this chunk.
        - `byte_end` integer, nullable: Optional byte range end in the stored canonical audio object.
        - `byte_start` integer, nullable: Optional byte range start in the stored canonical audio object.
        - `end_ms` integer, nullable: Optional end offset in milliseconds for the chunk.
        - `error` string, nullable: Optional sanitized error for this chunk.
        - `index` integer: Stable zero-based chunk index.
        - `start_ms` integer, nullable: Optional start offset in milliseconds for the chunk.
        - `status` string: Per-chunk transcription status.
        - `transcript` string, nullable: Per-chunk transcript text.
      - `error` string, nullable: Optional error message if status indicates failure.
      - `progress` number, double, nullable: Optional aggregate progress value in `[0, 1]`.
      - `status` string: Current transcription state.
      - `transcript` string, nullable: Optional transcript text once transcription completes.
      - `transcript_segments` AudioTranscriptSegment[], nullable: Transcript segments derived from completed chunks for timeline-aware UI surfaces.
        - `chunk_index` integer: Zero-based chunk index for this segment.
        - `end_ms` integer: Segment end offset in milliseconds.
        - `start_ms` integer: Segment start offset in milliseconds.
        - `text` string: Transcribed text for this segment.
    - `download_url` string, required: Pre-signed URL for downloading the file directly from storage
    - `external_id_ews_id` string: External Exchange Web Services ID for deep linking to the original item.
    - `file_capability` FileCapability, required: The file capability that was evaluated for this file
      - `extensions` string[], required: File extensions this capability applies to (e.g., ["docx", "doc"]) Special value "*" indicates all extensions
      - `id` string, required: Stable identifier (e.g., 'word', 'pdf', 'image', 'other')
      - `mime_types` string[], required: MIME types this capability applies to (e.g., ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"]) May contain wildcards like "image/*" or "*/*"
      - `operations` FileOperation[], required: Operations that can be performed on matching files
      - `upload_allowed` boolean: Whether this file type may be uploaded under the active deployment policy.
    - `file_contents_unavailable_missing_permissions` boolean, required: Indicates that file contents are unavailable for the current user due to missing permissions.
    - `filename` string, required: The original filename of the uploaded file
    - `id` string, required: The unique ID of the uploaded file
    - `is_sharepoint_file` boolean, required: Indicates the file is stored in Sharepoint
    - `outlook_provenance` OutlookFileProvenance: Outlook source references for reopening the original email.
      - `origins` OutlookFileOrigin[], required: All distinct origins, including multiple containing emails for identical bytes.
        - `document` OutlookMessageReference: The uploaded email's own identity; a thread export identifies only its anchor.
          - `documentId` string: Local catalog UUID, scoped to its originating sidecar installation.
          - `external_ids` OutlookExternalId[], required
            - `key` string, required
            - `value` string, required
          - `mailbox` OutlookMailboxReference
            - `emailAddress` string: SMTP address of the owning mailbox, including shared mailboxes.
            - `mailboxId` string: Local mailbox ID, never a Graph mailbox identifier.
            - `profileName` string
        - `topLevelParent` OutlookMessageReference: The outermost containing mailbox message, separate from the document's identity.
          - `documentId` string: Local catalog UUID, scoped to its originating sidecar installation.
          - `external_ids` OutlookExternalId[], required
            - `key` string, required
            - `value` string, required
          - `mailbox` OutlookMailboxReference
            - `emailAddress` string: SMTP address of the owning mailbox, including shared mailboxes.
            - `mailboxId` string: Local mailbox ID, never a Graph mailbox identifier.
            - `profileName` string
      - `version` integer, required: Contract version. Only version 1 is supported.
    - `preview_url` string, nullable: Proxied URL for inline preview without forcing download when available
  - `rejected_files` string[]: Filenames skipped by the configured operation policy.

## Other responses

- `400`: Invalid file upload
- `413`: Uploaded file exceeds size or file-count limit
- `500`: Server error

## Changes

- **2026-10-28** `4597e796834c`: 1 info
  - added the optional property `files/items/audio_synthesis` to the response with the `200` status
- **2026-10-28** `0b3f046222fd`: 1 warning
  - removed the optional property `files/items/audio_synthesis` from the response with the `200` status
- **2026-10-28** `7b14e607c106`: 1 info
  - added the optional property `files/items/audio_synthesis` to the response with the `200` status
- **2026-10-01** `da255ff2b71a`: 2 info
  - added the optional property `files/items/file_capability/upload_allowed` to the response with the `200` status
  - added the optional property `rejected_files` to the response with the `200` status
- **2026-09-22** `14aa9d12afa0`: 2 info
  - added the new optional request property `items/outlook_provenance`
  - added the optional property `files/items/outlook_provenance` to the response with the `200` status

[Operation history](https://skmtc.dev/eratolab/apis/erato-labs-generated-api/changes/api/v1beta/me/files/post.md)

---

[API](https://skmtc.dev/eratolab/apis/erato-labs-generated-api.md) - [All operations](https://skmtc.dev/eratolab/apis/erato-labs-generated-api/llms.txt) - [OpenAPI document](https://skmtc.dev/eratolab/apis/erato-labs-generated-api/revisions/a34e0038f4c3?raw)
