> ## 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 Comment

> Creates a comment or reply as the school owner. The post and its category must be open.



## OpenAPI

````yaml post /community/posts/{post_id}/comments
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_id}/comments:
    post:
      tags:
        - Community
      summary: Create a Community Comment
      description: >-
        Creates a comment or reply as the school owner. The post and its
        category must be open.
      parameters:
        - name: post_id
          in: path
          required: true
          description: Post ID.
          schema:
            type: string
            minLength: 1
            maxLength: 255
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - body
              additionalProperties: false
              properties:
                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.
                parent_comment_id:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Optional top-level comment of this post. Omit to add a
                    top-level comment.
                mention_member_ids:
                  type: array
                  maxItems: 20
                  items:
                    type: string
                    minLength: 1
                    maxLength: 255
                  description: >-
                    IDs of up to 20 active members to mention. Duplicate IDs are
                    ignored. Notifications depend on each member's access and
                    preferences.
              example:
                body: Thanks for sharing!
                mention_member_ids:
                  - MEMBER_ID
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - body
              additionalProperties: false
              properties:
                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.
                parent_comment_id:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Optional top-level comment of this post. Omit to add a
                    top-level comment.
                mention_member_ids:
                  type: array
                  maxItems: 20
                  items:
                    type: string
                    minLength: 1
                    maxLength: 255
                  description: >-
                    IDs of up to 20 active members to mention. Duplicate IDs are
                    ignored. Notifications depend on each member's access and
                    preferences.
              example:
                body: Thanks for sharing!
                mention_member_ids:
                  - MEMBER_ID
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 255
                  post_id:
                    type: string
                    minLength: 1
                    maxLength: 255
                  parent_comment_id:
                    type: string
                    nullable: true
                  reply_count:
                    type: integer
                  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
                  body:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                    nullable: true
              example:
                id: 44444444-4444-4444-8444-444444444444
                post_id: 22222222-2222-4222-8222-222222222222
                parent_comment_id: null
                reply_count: 0
                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'
                body: <p>Thanks for sharing!</p>
                created_at: '2026-10-02T00:10:00Z'
        '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.