News

You may create a new single or multiple news using this action. When creating a single news object the body contains a json object, when creating multiple news objects the body contains an array of objects.
Warning: a maximum of 1000 items can be sent in a single request.

post/public/api/news

Request

  • Base URL
    https://<base_url>
  • Auth
    HTTP bearer

Headers

Acceptstring

e.g. application/json

Request body

user_idstring
titlestring
descriptionstring
authorised_viewersnumber
imagesstring[]
group_idsstring[]
tagsstring[]

Example request

{
  "user_id": "54ab03c6546847ee0d30072b",
  "title": "Rocket ltd exciting news",
  "description": "News content",
  "authorised_viewers": 100,
  "images": [
    "www.rocketltd.com/file/RocketsFile1.jpg"
  ],
  "group_ids": [
    "rockets_hq",
    "rockets_pr",
    "rockets_employees"
  ],
  "tags": [
    "rockets_stars",
    "rockets_fans"
  ]
}

Response

OK

news_idstring required
updated_datestring required
created_datestring required
user_idstring required
titlestring required
descriptionstring required
authorised_viewersnumber required
imagesstring[] required
group_idsstring[] required
tagsstring[] required

Example response

[
  {
    "news_id": "54ab03c6546847ee0d30081a",
    "updated_date": "2020-09-14T04:51:40.862Z",
    "created_date": "2020-09-14T04:51:40.862Z",
    "user_id": "54ab03c6546847ee0d30072b",
    "title": "Rocket ltd exciting news",
    "description": "News content",
    "authorised_viewers": 100,
    "images": [
      "www.rocketltd.com/file/RocketsFile1.jpg"
    ],
    "group_ids": [
      "rockets_hq",
      "rockets_pr",
      "rockets_employees"
    ],
    "tags": [
      "rockets_stars",
      "rockets_fans"
    ]
  },
  {
    "news_id": "54ab03c6546847ee0d30081b",
    "updated_date": "2020-09-14T04:51:40.862Z",
    "created_date": "2020-09-14T04:51:40.862Z",
    "user_id": "54ab03c6546847ee0d30072c",
    "title": "Rocket ltd great news",
    "description": "News content",
    "authorised_viewers": 120,
    "images": [
      "www.rocketltd.com/file/RocketsFile1.jpg"
    ],
    "group_ids": [
      "rockets_hq",
      "rockets_pr"
    ],
    "tags": [
      "rockets_stars"
    ]
  }
]

Changes

    • breaking

      removed the media type */* for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      the endpoint scheme security oauth2 was removed from the API