> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ziik.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a post

> Creates a new post and returns the created resource.



## OpenAPI

````yaml /openapi.yaml post /content
openapi: 3.0.0
info:
  title: Ziik API
  version: '1.0'
servers: []
security: []
tags:
  - name: Auth
    description: Auth
  - name: Posts
    description: Posts
  - name: Counters
    description: Counters
  - name: Groups
    description: Groups
  - name: Languages
    description: Languages
  - name: Timezones
    description: Timezones
  - name: Units
    description: Units
  - name: User unit memberships
    description: User unit memberships
  - name: Users
    description: Users
  - name: User types
    description: User types
  - name: Conversations
    description: Conversations
paths:
  /content:
    post:
      tags:
        - Posts
      summary: Create a post
      description: Creates a new post and returns the created resource.
      operationId: 828bde5e4a71b981f07ac34c504be379
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                title:
                  type: string
                  maxLength: 255
                  nullable: true
                body:
                  type: string
                  nullable: true
                group:
                  description: Group ID to post in
                  type: integer
                  nullable: true
                owner_unit:
                  description: Owner unit ID when not posting in a group
                  type: integer
                  nullable: true
                visibility:
                  properties:
                    all_units:
                      type: boolean
                      nullable: true
                    units:
                      type: array
                      items:
                        type: integer
                    units_falldown:
                      type: array
                      items:
                        type: integer
                    userTypes:
                      type: array
                      items:
                        type: integer
                  type: object
                sharing:
                  properties:
                    shares:
                      type: array
                      items:
                        type: integer
                      nullable: true
                  type: object
                comments:
                  properties:
                    enabled:
                      type: boolean
                  type: object
                confirm:
                  properties:
                    enabled:
                      description: Require read confirmation
                      type: boolean
                  type: object
                show_in_feed:
                  description: Show post in feed
                  type: boolean
                publish:
                  properties:
                    status:
                      type: boolean
                      nullable: true
                    publish_on:
                      description: Unix timestamp for when to publish
                      type: integer
                      nullable: true
                    unpublish_on:
                      description: Unix timestamp for when to unpublish
                      type: integer
                      nullable: true
                  type: object
                important:
                  description: Mark post as important
                  type: boolean
                poll:
                  properties:
                    question:
                      type: string
                      maxLength: 512
                    type:
                      description: Poll type
                      type: string
                    close_at:
                      description: Unix timestamp for when the poll closes
                      type: integer
                      nullable: true
                    allow_user_choices:
                      type: boolean
                    anonymous:
                      type: boolean
                    mandatory:
                      type: boolean
                    choices:
                      type: array
                      items:
                        properties:
                          title:
                            type: string
                            maxLength: 255
                        type: object
                  type: object
                  nullable: true
                pinned:
                  properties:
                    show_in_main_feed:
                      type: boolean
                    until:
                      description: Unix timestamp for when pinning ends
                      type: integer
                  type: object
                  nullable: true
                event:
                  properties:
                    location:
                      type: string
                      nullable: true
                    link:
                      type: string
                      nullable: true
                    all_day:
                      type: boolean
                    datetime_start:
                      description: Start datetime in ISO 8601
                      type: string
                      nullable: true
                    datetime_end:
                      description: End datetime in ISO 8601
                      type: string
                      nullable: true
                    participation:
                      properties:
                        enabled:
                          type: boolean
                      type: object
                      nullable: true
                    recurrence:
                      properties:
                        freq:
                          type: string
                        until:
                          type: string
                          format: date-time
                          nullable: true
                        count:
                          type: integer
                          nullable: true
                        interval:
                          type: integer
                        bymonthday:
                          type: integer
                          nullable: true
                        bymonth:
                          type: integer
                          nullable: true
                        bysetpos:
                          type: integer
                          nullable: true
                      type: object
                      nullable: true
                    repeat_rules:
                      type: string
                      nullable: true
                    end_date:
                      type: string
                      format: date
                      nullable: true
                    timezone:
                      type: string
                  type: object
                  nullable: true
              type: object
      responses:
        '201':
          description: Post created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
components:
  schemas:
    Content:
      properties:
        id:
          type: integer
          example: 1
        content_type:
          description: Type of content
          type: string
          enum:
            - news
            - debate
            - event
          example: news
        title:
          type: string
          example: Important update
        body:
          type: string
          example: Post body text
        show_in_feed:
          type: boolean
          example: true
        important:
          type: boolean
          example: false
        actively_requires_action:
          type: boolean
          example: false
        mute_rule:
          description: ID of mute rule/blacklist for current user or null
          type: integer
          nullable: true
        seen_by_user:
          description: Whether the current user has seen this content
          type: boolean
        has_unseen_mention:
          description: Whether the current user has unseen mentions in this content
          type: boolean
        pinned:
          description: Pin information when content is pinned in feeds
          type: object
          nullable: true
        confirm:
          description: Read confirmation settings and totals
          type: object
        publish:
          description: Publish metadata including status and timestamps
          type: object
        event:
          description: Event-specific metadata when content is an event
          type: object
          nullable: true
        interaction:
          description: User-specific interaction flags (seen, liked, read, bookmarked)
          type: object
        stats:
          description: Aggregated statistics such as comments, likes, reads
          type: object
        sharing:
          description: Sharing information, including whether and how the content is shared
          type: object
        visibility:
          description: Visibility information (owner unit, units, user types)
          type: object
        uploading_files:
          description: Number of files currently uploading for this content
          type: integer
        files:
          description: Attached files for this content
          type: array
          items:
            type: object
        permissions:
          description: Edit/delete permission flags for the current user
          type: object
        comments:
          description: Comment settings and counts
          type: object
        mentions:
          description: Mentioned users when loaded
          type: array
          items:
            type: object
        group:
          description: Group information when content belongs to a group
          type: object
          nullable: true
        author:
          description: Author information for the content
          type: object
        poll:
          description: Poll configuration when content includes a poll
          type: object
          nullable: true
        participation:
          description: >-
            Event participation data (deprecated, mirrored from
            event.participation)
          type: object
          nullable: true
        translations:
          description: Automatic translation metadata and translated fields
          type: object
          nullable: true
      type: object

````