Any user associated with a context with AUTHENTICATED scope can add a comment to the own post or to a post created by any user from the network by executing of the createPostComment mutation. The current API user will be set as an author. Mutation has a single required incoming argument - data that represents PostCommentCreationInput object:
ParameterTypeDescription
textStringRequired. The comment body text. Available HTML tags are: <a>, <p>, <br>. Any other tag will be trimmed.
parentPostIdIntRequired. ID of the post that should be commented.
Extra content (like a training or a certificate) cannot be shared in a comment. Also, you cannot add a comment to another comment (only posts can be commented).
  mutation createPostComment {
    createPostComment(data: {
      text: "This is a post comment.",
      parentPostId: 175,
    }) {
      response {
        id
        text
        created
        parentPost {
          id
        }
        authorUserContext {
          id
          uuid
        }
        cta {
          actionId
          title
          arguments {
            key
            value
          }
        }
      }
      errors
    }
  }
The mutation returns a Post object. Detailed description and the full list of available properties can be found here.