Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

1.1 KB
Raw Blame
---
title: UploadFile
description: >-
  Upload an existing file to Macro from base64-encoded bytes, up to 25 MiB
  decoded.
---

# UploadFile

Upload an existing file to Macro from base64-encoded bytes, up to 25 MiB decoded. Use for PDFs, images, Office files, and other files; use CreateDocument for generated text or native Macro spreadsheets. Encode actual file bytes programmatically; never invent or transcribe binary content. Returns a document ID after the bytes are uploaded; preview and indexing may finish asynchronously. Does not read local paths or fetch URLs.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `fileName` | string | Yes | Filename including its extension, for example report.pdf. Do not include a directory path. |
| `contentBase64` | string | Yes | Standard padded base64 of the exact file bytes (maximum 25 MiB decoded). No data URL prefix or whitespace. Prefer constructing this argument programmatically from the file. |
| `projectId` | string | No | Optional destination project (folder) ID. Requires edit access. Omit to upload to the user's top-level files. |