Get Started
API backend
API system
More information

POST api/2.0/files/{folderId}/text This function requires authentication

Description

Creates a text (.txt) file in the selected folder with the title and contents specified in the request.

Parameters
Name Description Type Example
folderId
sent in url
Folder ID `0
Title
sent in body
File title System.String
Content
sent in body
File contents System.String
Example
POST api/2.0/files/{folderid}/text
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "Title": "some text",
  "Content": "some text"
}
Returns

New file information

Example Response

application/json

{
  "status": 0,
  "response": {
    "FolderId": 1234,
    "Version": 1234,
    "VersionGroup": 1234,
    "ContentLength": "some text",
    "Mute": true,
    "ViewUrl": "some text",
    "WebUrl": "some text",
    "FileExst": "some text",
    "Comment": "some text",
    "ThumbnailUrl": "some text",
    "LockedBy": "some text",
    "DenyDownload": true,
    "DenySharing": true
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <FolderId>1234</FolderId>
    <Version>1234</Version>
    <VersionGroup>1234</VersionGroup>
    <ContentLength>some text</ContentLength>
    <Mute>True</Mute>
    <ViewUrl>some text</ViewUrl>
    <WebUrl>some text</WebUrl>
    <FileExst>some text</FileExst>
    <Comment>some text</Comment>
    <ThumbnailUrl>some text</ThumbnailUrl>
    <LockedBy>some text</LockedBy>
    <DenyDownload>True</DenyDownload>
    <DenySharing>True</DenySharing>
  </response>
</result>