Beta

Create Text File

Last updated Nov 19, 2026View as MarkdownAgent setup / MCP
POST
/v1/files/text

Creates a text File (Markdown by default; or plain text, CSV, TSV or JSON) from up to 1 MiB of UTF-8 text. It's ready to read right away. Optionally add it to a Room or a Business. Needs edit access, as uploading does.

Authorization

headerAuthorizationBearer <token>

A signed-in SMB user's access token. Workspace-scoped operations also require SMB-Workspace-Id.

Header Parameters

SMB-Workspace-Id*string

Workspace where this operation runs. Required for user tokens and Workspace API keys.

Formatuuid
Idempotency-Key*string
Length8 <= length <= 200

Request Body

application/json
  1. body
name*string
Length1 <= length <= 300
content*string

Up to 1 MiB of UTF-8 text. Tabs and line breaks are fine; other control characters aren't.

Length1 <= length <= 1048576
content_type?string
Default"text/markdown"
Value in"text/markdown""text/plain""text/csv""text/tab-separated-values""application/json"
description?|
Lengthlength <= 4000
classification?|
Value in"financial""legal""operational""marketing""other"null
tags?array<>
Itemsitems <= 32
business_id?SmbV0OperationsGetBusinessComparablesRequestBusinessId

Stable SMB Business ID.

Match^biz_[0-7][0-9A-HJKMNP-TV-Z]{25}$
room_id?string

Stable Room ID.

Match^rom_[0-7][0-9A-HJKMNP-TV-Z]{25}$
access_mode?string

Who in the Room can open it; only with room_id.

Value in"inherit_room""restricted""private"
folder_id?|

Room folder to put it in.

Match^rfd_[0-7][0-9A-HJKMNP-TV-Z]{25}$
summary?Summary2

Optional: what changed, in a few words. Shown with the version and in Room activity.

Length1 <= length <= 500

Response Body

The existing resource or idempotent replay was returned.

application/json
  1. response
file*
new_version*
action_receipt*
idempotent_replay*smb_v0_operations_create_list_request.__local.properties.body.__schema16
request_id*string
room_file*|

The File in the Room, when room_id was given.

curl -X POST 'https://example.com/v1/files/text' \  -H 'SMB-Workspace-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'Idempotency-Key: stringst' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "content": "string"}'
{  "file": {    "file_id": "string",    "business_id": "string",    "name": "string",    "description": "string",    "classification": "financial",    "tags": [      "string"    ],    "origin": "upload",    "lifecycle": "active",    "current_version": {      "file_version_id": "string",      "version_number": 1,      "content_type": "string",      "size_bytes": 1,      "sha256": "string",      "processing_status": "pending_upload",      "processing_error": "string",      "summary": "string",      "created_by": {        "type": "person",        "user_id": "string",        "name": "string",        "via": null      },      "created_at": "2019-08-24T14:15:22Z",      "ready_at": "2019-08-24T14:15:22Z",      "protection": {},      "redacted_from": "string",      "redacted_copy": "string"    },    "revision": 1,    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "archived_at": "2019-08-24T14:15:22Z",    "access_level": "view"  },  "new_version": {    "file_version_id": "string",    "version_number": 1,    "content_type": "string",    "size_bytes": 1,    "sha256": "string",    "processing_status": "pending_upload",    "processing_error": "string",    "summary": "string",    "created_by": {      "type": "person",      "user_id": "string",      "name": "string",      "via": null    },    "created_at": "2019-08-24T14:15:22Z",    "ready_at": "2019-08-24T14:15:22Z",    "protection": {},    "redacted_from": "string",    "redacted_copy": "string"  },  "action_receipt": {    "receipt_id": "64d0a161-468e-472a-b00e-a06ee9ab7de7",    "command_id": "7d510d78-7444-4252-aeac-9e473949661e",    "operation": "string",    "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9"  },  "idempotent_replay": true,  "request_id": "string",  "room_file": {    "room_file_id": "string",    "room_id": "string",    "file": {      "file_id": "string",      "business_id": "string",      "name": "string",      "description": "string",      "classification": "financial",      "tags": [        "string"      ],      "origin": "upload",      "lifecycle": "active",      "current_version": {        "file_version_id": "string",        "version_number": 1,        "content_type": "string",        "size_bytes": 1,        "sha256": "string",        "processing_status": "pending_upload",        "processing_error": "string",        "summary": "string",        "created_by": {          "type": "person",          "user_id": "string",          "name": "string",          "via": null        },        "created_at": "2019-08-24T14:15:22Z",        "ready_at": "2019-08-24T14:15:22Z",        "protection": {},        "redacted_from": "string",        "redacted_copy": "string"      },      "revision": 1,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "archived_at": "2019-08-24T14:15:22Z",      "access_level": "view"    },    "file_version_id": "string",    "access_mode": "inherit_room",    "status": "pending",    "revision": 1,    "attached_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "archived_at": "2019-08-24T14:15:22Z",    "access_level": "view",    "folder_id": "string",    "original_name": "string",    "read_state": "pending",    "suggestion": {      "suggestion_id": "string",      "state": "suggested",      "confidence": 0,      "needs_pick": true,      "folder_id": "string",      "parent_folder_id": "string",      "new_folder_path": [        "string"      ],      "path": [        "string"      ],      "reason": "string",      "drop_batch_id": "string"    }  }}