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
Event title string some text
content
sent in body
Event content string some text
type
sent in body
Event type None, News, Order, Advert, AllNews, Poll, All None
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

Newly created event

Example Response

application/json

{
  "status": 0,
  "response": {
    "Id": 10,
    "Title": "Manager",
    "Created": "2020-12-07T13:56:02.2729203Z",
    "Updated": "2020-12-07T13:56:02.2729203Z",
    "Type": 1,
    "CreatedBy": {
      "Id": "00000000-0000-0000-0000-000000000000",
      "DisplayName": "Mike Zanyatski",
      "Title": "Manager",
      "AvatarSmall": "url to small avatar",
      "ProfileUrl": "\\/Products\\/People\\/Profile.aspx?user=administrator"
    },
    "Text": "Text of feed",
    "Poll": {
      "PollType": 0,
      "EndDate": "2020-12-07T13:56:02.2859248Z",
      "StartDate": "2020-12-07T13:56:02.2859248Z",
      "Votes": [
        {
          "Id": 133,
          "Name": "Variant 1",
          "Votes": 100
        }
      ],
      "Voted": false
    }
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <Id>10</Id>
    <Title>Manager</Title>
    <Created>2020-12-07T13:56:02.2729203Z</Created>
    <Updated>2020-12-07T13:56:02.2729203Z</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>\/Products\/People\/Profile.aspx?user=administrator</ProfileUrl>
    </CreatedBy>
    <Text>Text of feed</Text>
    <Poll>
      <PollType>0</PollType>
      <EndDate>2020-12-07T13:56:02.2859248Z</EndDate>
      <StartDate>2020-12-07T13:56:02.2859248Z</StartDate>
      <Votes>
        <Id>133</Id>
        <Name>Variant 1</Name>
        <Votes>100</Votes>
      </Votes>
      <Voted>False</Voted>
    </Poll>
  </response>
</result>