Skip to main content
POST
/
content
Create a post
curl --request POST \
  --url https://api.example.com/content \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "body": "<string>",
  "group": 123,
  "owner_unit": 123,
  "visibility": {
    "all_units": true,
    "units": [
      123
    ],
    "units_falldown": [
      123
    ],
    "userTypes": [
      123
    ]
  },
  "sharing": {
    "shares": [
      123
    ]
  },
  "comments": {
    "enabled": true
  },
  "confirm": {
    "enabled": true
  },
  "show_in_feed": true,
  "publish": {
    "status": true,
    "publish_on": 123,
    "unpublish_on": 123
  },
  "important": true,
  "poll": {
    "question": "<string>",
    "type": "<string>",
    "close_at": 123,
    "allow_user_choices": true,
    "anonymous": true,
    "mandatory": true,
    "choices": [
      {
        "title": "<string>"
      }
    ]
  },
  "pinned": {
    "show_in_main_feed": true,
    "until": 123
  },
  "event": {
    "location": "<string>",
    "link": "<string>",
    "all_day": true,
    "datetime_start": "<string>",
    "datetime_end": "<string>",
    "participation": {
      "enabled": true
    },
    "recurrence": {
      "freq": "<string>",
      "until": "2023-11-07T05:31:56Z",
      "count": 123,
      "interval": 123,
      "bymonthday": 123,
      "bymonth": 123,
      "bysetpos": 123
    },
    "repeat_rules": "<string>",
    "end_date": "2023-12-25",
    "timezone": "<string>"
  }
}
'
{
  "id": 1,
  "content_type": "news",
  "title": "Important update",
  "body": "Post body text",
  "show_in_feed": true,
  "important": false,
  "actively_requires_action": false,
  "mute_rule": 123,
  "seen_by_user": true,
  "has_unseen_mention": true,
  "pinned": {},
  "confirm": {},
  "publish": {},
  "event": {},
  "interaction": {},
  "stats": {},
  "sharing": {},
  "visibility": {},
  "uploading_files": 123,
  "files": [
    {}
  ],
  "permissions": {},
  "comments": {},
  "mentions": [
    {}
  ],
  "group": {},
  "author": {},
  "poll": {},
  "participation": {},
  "translations": {}
}

Body

application/json
title
string | null
Maximum string length: 255
body
string | null
group
integer | null

Group ID to post in

owner_unit
integer | null

Owner unit ID when not posting in a group

visibility
object
sharing
object
comments
object
confirm
object
show_in_feed
boolean

Show post in feed

publish
object
important
boolean

Mark post as important

poll
object
pinned
object
event
object

Response

201 - application/json

Post created

id
integer
Example:

1

content_type
enum<string>

Type of content

Available options:
news,
debate,
event
Example:

"news"

title
string
Example:

"Important update"

body
string
Example:

"Post body text"

show_in_feed
boolean
Example:

true

important
boolean
Example:

false

actively_requires_action
boolean
Example:

false

mute_rule
integer | null

ID of mute rule/blacklist for current user or null

seen_by_user
boolean

Whether the current user has seen this content

has_unseen_mention
boolean

Whether the current user has unseen mentions in this content

pinned
object

Pin information when content is pinned in feeds

confirm
object

Read confirmation settings and totals

publish
object

Publish metadata including status and timestamps

event
object

Event-specific metadata when content is an event

interaction
object

User-specific interaction flags (seen, liked, read, bookmarked)

stats
object

Aggregated statistics such as comments, likes, reads

sharing
object

Sharing information, including whether and how the content is shared

visibility
object

Visibility information (owner unit, units, user types)

uploading_files
integer

Number of files currently uploading for this content

files
object[]

Attached files for this content

permissions
object

Edit/delete permission flags for the current user

comments
object

Comment settings and counts

mentions
object[]

Mentioned users when loaded

group
object

Group information when content belongs to a group

author
object

Author information for the content

poll
object

Poll configuration when content includes a poll

participation
object

Event participation data (deprecated, mirrored from event.participation)

translations
object

Automatic translation metadata and translated fields