News
Create
Changed onYou 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 URLhttps://<base_url>
- AuthHTTP bearer
Headers
Acceptstring
e.g. application/json
Request body
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
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/jsonfor the response with the status
- breaking
- info
the endpoint scheme security
oauth2was removed from the API
- info