Skip to main content
POST
Preview. This endpoint is available to organisations in the Wordsmith MCP and files pilot. Other organisations receive 403 mcp_not_enabled. See the preview overview.
Stores text you send as a new file in your private space. The response’s id is the new file’s file_id. format picks the file type: Wordsmith adds the extension when file_name does not already end with it, ignoring case. "Summary" with docx is stored as Summary.docx. content is at most 1,000,000 bytes as UTF-8.

Authentication

Send an API key, or an OAuth access token with the files:write scope, as a bearer token in the Authorization header. A token without the scope gets 403 with "error": "insufficient_scope".

Body parameters

string
required
The file’s name. The extension for format is added when the name does not end with it. 1 to 255 characters.
string
required
The file’s text, at most 1,000,000 bytes as UTF-8.
string
required
txt stores plain text, md stores Markdown, and docx converts the content from Markdown to a Word document.

Response

Returns 201 with the new file.
string (uuid)
The file’s id: the file_id other endpoints take.
string | null
The stored name, with the extension added if it was missing.
string | null
The file’s MIME type.
integer | null
Size in bytes.
string | null
When the file was created. ISO 8601 UTC.

Errors

See Errors for the error format.