TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

POST api/2.0/community/forum/topic/{topicid} This function requires authentication

Description

Adds a post to the selected topic with a post subject and content specified in the request.

Parameters
Name Description Type Example
topicid
sent in url
Topic ID number 1234
parentPostId
sent in body
Parent post ID number 1234
subject
sent in body
Post subject (required) string some text
content
sent in body
Post text string some text
Example
POST api/2.0/community/forum/topic/1234
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "parentPostId": 1234,
  "subject": "some text",
  "content": "some text"
}
Returns

New post

Example Response

application/json

{
  "status": 0,
  "response": {
    "Id": 123,
    "Subject": "Sample subject",
    "Text": "Post text",
    "Created": "2020-12-07T13:56:02.3269198Z",
    "Updated": "2020-12-07T13:56:02.3269198Z",
    "CreatedBy": {
      "Id": "00000000-0000-0000-0000-000000000000",
      "DisplayName": "Mike Zanyatski",
      "Title": "Manager",
      "AvatarSmall": "url to small avatar",
      "ProfileUrl": "\\/Products\\/People\\/Profile.aspx?user=administrator"
    },
    "ThreadTitle": "Title",
    "Attachments": {
      "Name": "picture.jpg",
      "ContentType": "image/jpeg",
      "Created": "2020-12-07T13:56:02.3269198Z",
      "Updated": "2020-12-07T13:56:02.3269198Z",
      "Size": 122345,
      "Path": "url to file"
    }
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <Id>123</Id>
    <Subject>Sample subject</Subject>
    <Text>Post text</Text>
    <Created>2020-12-07T13:56:02.3269198Z</Created>
    <Updated>2020-12-07T13:56:02.3269198Z</Updated>
    <CreatedBy>
      <Id>00000000-0000-0000-0000-000000000000</Id>
      <DisplayName>Mike Zanyatski</DisplayName>
      <Title>Manager</Title>
      <AvatarSmall>url to small avatar</AvatarSmall>
      <ProfileUrl>\/Products\/People\/Profile.aspx?user=administrator</ProfileUrl>
    </CreatedBy>
    <ThreadTitle>Title</ThreadTitle>
    <Attachments>
      <Name>picture.jpg</Name>
      <ContentType>image/jpeg</ContentType>
      <Created>2020-12-07T13:56:02.3269198Z</Created>
      <Updated>2020-12-07T13:56:02.3269198Z</Updated>
      <Size>122345</Size>
      <Path>url to file</Path>
    </Attachments>
  </response>
</result>