Get Started
Portal api methods
Help

POST api/2.0/community/event This function requires authentication

Description

Creates a new event with the parameters (title, content, type) specified in the request

Parameters
Name Description Type Example
title
sent in body
Title string some text
content
sent in body
Content string some text
type
sent in body
Type. One of (News|Order|Advert|Poll) None, News, Order, Advert, AllNews, Poll, All
Example
POST api/2.0/community/event
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "title": "some text",
  "content": "some text",
  "type": "None"
}
Returns

New created event

Example Response

application/json

{
  "status": 0,
  "response": {
    "id": 10,
    "title": "Sample news",
    "created": "2019-06-17T17:27:53.0041471Z",
    "updated": "2019-06-17T17:27:53.0041471Z",
    "type": 1,
    "createdBy": {
      "id": "00000000-0000-0000-0000-000000000000",
      "displayName": "Mike Zanyatski",
      "title": "Manager",
      "avatarSmall": "url to small avatar",
      "profileUrl": ""
    },
    "text": "Text of feed",
    "poll": {
      "pollType": 0,
      "endDate": "2019-06-17T17:27:53.0041471Z",
      "startDate": "2019-06-17T17:27:53.0041471Z",
      "voted": false,
      "votes": [
        {
          "id": 133,
          "name": "Variant 1",
          "votes": 100
        }
      ]
    }
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <id>10</id>
    <title>Sample news</title>
    <created>2019-06-17T17:27:53.0041471Z</created>
    <updated>2019-06-17T17:27:53.0041471Z</updated>
    <type>1</type>
    <createdBy>
      <id>00000000-0000-0000-0000-000000000000</id>
      <displayName>Mike Zanyatski</displayName>
      <title>Manager</title>
      <avatarSmall>url to small avatar</avatarSmall>
      <profileUrl></profileUrl>
    </createdBy>
    <text>Text of feed</text>
    <poll>
      <pollType>0</pollType>
      <endDate>2019-06-17T17:27:53.0041471Z</endDate>
      <startDate>2019-06-17T17:27:53.0041471Z</startDate>
      <voted>false</voted>
      <votes>
        <id>133</id>
        <name>Variant 1</name>
        <votes>100</votes>
      </votes>
    </poll>
  </response>
</result>