API – News¶
Paths are under https://api.innovanet.com. Header Authorization: Bearer inv_mcp_…. The innovanet() helper is in API.
A news item shows on the dashboard. Title and text are per language. Adding news needs the dashboard write permission.
GET /api/news¶
| Parameter | Type | Required | Description |
|---|---|---|---|
limit |
integer | no | default 20 |
offset |
integer | no | default 0 |
$res = innovanet('GET', '/api/news?limit=10');
Response 200
{
"success": true,
"data": [
{
"id": 3,
"name": { "sk": "Firemný deň", "cs": "Firemní den", "en": "Company day" },
"content": { "sk": "V piatok je kancelária zatvorená." },
"likesCount": 2,
"createDate": "2026-11-05 08:00:00",
"author": { "id": 15, "firstName": "Jana", "lastName": "Nováková" }
}
]
}
Detail: GET /api/news/3.
POST /api/news¶
| Field | Type | Required | Description |
|---|---|---|---|
name |
object | yes | title, sk, cs, en |
content |
object | yes | text in the same languages |
photo |
string | no |
Request
{
"name": { "sk": "Firemný deň", "cs": "Firemní den", "en": "Company day" },
"content": { "sk": "V piatok je kancelária zatvorená.", "cs": "V pátek je kancelář zavřená.", "en": "The office is closed on Friday." }
}
PHP
$res = innovanet('POST', '/api/news', [
'name' => ['sk' => 'Firemný deň', 'cs' => 'Firemní den', 'en' => 'Company day'],
'content' => ['sk' => 'V piatok je kancelária zatvorená.'],
]);
Response 200
{ "success": true, "data": { "id": 3 } }
Like: POST /api/news/3/like. Comment: POST /api/news/3/comments with the field comment (text).
Other paths¶
Each path below belongs to this module. Field names are the ones the API reads. A downloaded file is not JSON.
POST /api/news/{id}/unlike¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
DELETE /api/news/{newsId}/comments/{commentId}¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
Want to try this feature? Start your innovanet trial →