Get Started
Portal api methods
Help

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

Description

Updates a topic in an existing thread changing the thread subject, making it sticky or closing it

Parameters
Name Description Type Example
topicid
sent in url
ID of topic to update number 1234
subject
sent in body
Subject string some text
sticky
sent in body
Is sticky Bool value true
closed
sent in body
Close topic Bool value true
Example
PUT api/2.0/community/forum/topic/1234
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "subject": "some text",
  "sticky": true,
  "closed": true
}
Returns

Updated topic

Example Response

application/json

{
  "status": 0,
  "response": {
    "id": 10,
    "title": "Sample topic",
    "created": "2019-08-17T20:39:00.0583132Z",
    "updated": "2019-08-17T20:39:00.0583132Z",
    "text": "This is sample post",
    "updatedBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "threadTitile": null,
    "status": 2,
    "type": 0,
    "posts": [
      {
        "id": 123,
        "subject": "Sample subject",
        "text": "Post text",
        "created": "2019-08-17T20:39:00.0583132Z",
        "updated": "2019-08-17T20:39:00.0583132Z",
        "createdBy": {
          "id": "00000000-0000-0000-0000-000000000000",
          "displayName": "Mike Zanyatski",
          "title": "Manager",
          "avatarSmall": "url to small avatar",
          "profileUrl": ""
        },
        "threadTitle": null,
        "attachments": [
          {
            "name": "picture.jpg",
            "contentType": "image\/jpeg",
            "created": "2019-08-17T20:39:00.0583132Z",
            "updated": "2019-08-17T20:39:00.0583132Z",
            "size": 122345,
            "path": "url to file"
          }
        ]
      }
    ],
    "tags": [
      "Tag1",
      "Tag2"
    ]
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <id>10</id>
    <title>Sample topic</title>
    <created>2019-08-17T20:39:00.0583132Z</created>
    <updated>2019-08-17T20:39:00.0583132Z</updated>
    <text>This is sample post</text>
    <updatedBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </updatedBy>
    <threadTitile />
    <status>2</status>
    <type>0</type>
    <posts>
      <id>123</id>
      <subject>Sample subject</subject>
      <text>Post text</text>
      <created>2019-08-17T20:39:00.0583132Z</created>
      <updated>2019-08-17T20:39:00.0583132Z</updated>
      <createdBy>
        <id>00000000-0000-0000-0000-000000000000</id>
        <displayName>Mike Zanyatski</displayName>
        <title>Manager</title>
        <avatarSmall>url to small avatar</avatarSmall>
        <profileUrl></profileUrl>
      </createdBy>
      <threadTitle />
      <attachments>
        <name>picture.jpg</name>
        <contentType>image/jpeg</contentType>
        <created>2019-08-17T20:39:00.0583132Z</created>
        <updated>2019-08-17T20:39:00.0583132Z</updated>
        <size>122345</size>
        <path>url to file</path>
      </attachments>
    </posts>
    <tags>Tag1</tags>
    <tags>Tag2</tags>
  </response>
</result>