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

# Create a comment



## OpenAPI

````yaml post /api/public/comments
openapi: 3.0.0
info:
  title: WodUp Public API
  version: '0.1'
servers:
  - description: Development / testing server
    url: https://api.wodup.dev
    variables: {}
security:
  - authorization: []
tags: []
paths:
  /api/public/comments:
    post:
      tags: []
      summary: Create a comment
      operationId: WodUpWeb.PublicApi.CommentController.create
      parameters:
        - description: |
            **Only used by platform integrations**  
            ID of gym to execute on behalf of
          example: gym_123abc
          in: header
          name: wodup-gym
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCommentRequest'
        description: Create comment params
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCommentResponse'
          description: Create comment response
      callbacks: {}
components:
  schemas:
    CreateCommentRequest:
      description: POST body for creating a comment
      example:
        author_id: ath_123abc
        commentable:
          id: r_123abc
          type: result
        text: Great job!
      properties:
        author_id:
          description: ID of comment author. Must be a staff member at your gym.
          type: string
        commentable:
          properties:
            date:
              description: If commentable is a Water Cooler, the date to comment on.
              format: date
              type: string
            id:
              description: ID of commentable entity
              type: string
            type:
              description: Type of commentable entity
              enum:
                - result
                - post
                - training_session
                - water_cooler
              type: string
          required:
            - type
            - id
          type: object
        parent_id:
          description: >-
            If you are replying to another comment, the ID of the comment you
            are replying to.
          type: string
        text:
          description: Content of comment
          type: string
      required:
        - commentable
        - text
        - author_id
      title: CreateCommentRequest
      type: object
    CreateCommentResponse:
      allOf:
        - $ref: '#/components/schemas/Comment'
      example:
        author:
          id: ath_123abc
          name: Jane Doe
        can_modify: true
        created_at: '2000-01-01T00:00:00Z'
        id: c_123abc
        replies: []
        text: Great job!
      title: CreateCommentResponse
      type: object
    Comment:
      example:
        author:
          id: ath_123abc
          name: Jane Doe
        can_modify: true
        created_at: '2000-01-01T00:00:00Z'
        id: c_123abc
        replies: []
        text: Great job!
      properties:
        author:
          description: Can be null if comment has been deleted
          example:
            id: ath_123abc
            name: Jane Doe
          properties:
            id:
              description: >-
                ID of author. Can be null if author is not associated with your
                gym.
              type: string
            name:
              description: Author name
              type: string
          required:
            - name
          title: CommentAuthor
          type: object
        can_modify:
          description: Whether the comment can be edited or deleted by your API key.
          type: boolean
        created_at:
          description: Date comment created. ISO8601 timestamp in UTC
          format: timestamptz
          type: string
        id:
          description: Comment ID
          type: string
        text:
          description: Comment text
          type: string
      required:
        - id
        - created_at
        - replies
        - can_modify
      title: Comment
      type: object
  securitySchemes:
    authorization:
      scheme: basic
      type: http

````