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

# Create a Community Post

> Creates a community post as the school owner. The selected category must be open.



## OpenAPI

````yaml post /community/posts
openapi: 3.0.1
info:
  title: SchoolMaker API V1
  description: API for managing your SchoolMaker school
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://schoolmaker.co/api/v1
    description: Production API
security:
  - bearerAuth: []
paths:
  /community/posts:
    post:
      tags:
        - Community
      summary: Create a Community Post
      description: >-
        Creates a community post as the school owner. The selected category must
        be open.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - category_id
                - title
                - body
              additionalProperties: false
              properties:
                category_id:
                  type: string
                  minLength: 1
                  maxLength: 255
                title:
                  type: string
                  maxLength: 10000
                  description: Required nonblank title.
                body:
                  type: string
                  maxLength: 200000
                  description: >-
                    Required comment or post content. Embedded attachments and
                    scripts are not supported.
                body_format:
                  type: string
                  enum:
                    - html
                    - markdown
                  default: html
                  description: >-
                    HTML or Markdown input, returned as HTML. For blockquotes,
                    use HTML markup.
              example:
                category_id: CATEGORY_ID
                title: Welcome
                body: '**Hello everyone**'
                body_format: markdown
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - category_id
                - title
                - body
              additionalProperties: false
              properties:
                category_id:
                  type: string
                  minLength: 1
                  maxLength: 255
                title:
                  type: string
                  maxLength: 10000
                  description: Required nonblank title.
                body:
                  type: string
                  maxLength: 200000
                  description: >-
                    Required comment or post content. Embedded attachments and
                    scripts are not supported.
                body_format:
                  type: string
                  enum:
                    - html
                    - markdown
                  default: html
                  description: >-
                    HTML or Markdown input, returned as HTML. For blockquotes,
                    use HTML markup.
              example:
                category_id: CATEGORY_ID
                title: Welcome
                body: '**Hello everyone**'
                body_format: markdown
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 255
                  title:
                    type: string
                  category_id:
                    type: string
                    minLength: 1
                    maxLength: 255
                  author:
                    type: object
                    nullable: true
                    properties:
                      id:
                        type: string
                        minLength: 1
                        maxLength: 255
                      type:
                        type: string
                      name:
                        type: string
                      email:
                        type: string
                      first_name:
                        type: string
                      last_name:
                        type: string
                      profile_picture_url:
                        type: string
                        nullable: true
                      last_seen_at:
                        type: string
                        format: date-time
                        nullable: true
                      created_at:
                        type: string
                        format: date-time
                        nullable: true
                      updated_at:
                        type: string
                        format: date-time
                        nullable: true
                  is_closed:
                    type: boolean
                  selected_solution_comment_id:
                    type: string
                    nullable: true
                  comment_count:
                    type: integer
                    description: Number of comments and replies, excluding the post body.
                  last_activity_at:
                    type: string
                    format: date-time
                    nullable: true
                  body:
                    type: string
                    nullable: true
                    description: Rendered HTML.
                  url:
                    type: string
                    description: Relative path on the school website.
              example:
                id: 22222222-2222-4222-8222-222222222222
                title: Welcome
                category_id: 33333333-3333-4333-8333-333333333333
                author:
                  id: 11111111-1111-4111-8111-111111111111
                  type: User
                  name: Jamie Example
                  email: jamie@example.com
                  first_name: Jamie
                  last_name: Example
                  profile_picture_url: null
                  last_seen_at: null
                  created_at: '2026-10-02T00:00:00Z'
                  updated_at: '2026-10-02T00:00:00Z'
                is_closed: false
                selected_solution_comment_id: null
                comment_count: 0
                last_activity_at: '2026-10-02T00:10:00Z'
                body: <p><strong>Hello everyone</strong></p>
                url: /community/22222222-2222-4222-8222-222222222222
        '401':
          description: Missing or invalid API credentials, or unavailable school account.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: Access denied
        '403':
          description: Community access is unavailable or the post or category is closed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: You do not have permission to perform this action
        '404':
          description: Record not found in your school or published categories.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: Record not found
        '422':
          description: Invalid parameters. No changes were saved.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: Invalid arguments
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.