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

# createComment

> Create a comment on a post

**Required scopes:** `write:comments`, `host:write:network_posts` (any one)



**mutation** `createComment(input: CreateCommentInput!): CreateCommentPayload`

## Arguments

**`input`**: `CreateCommentInput!` (required)

Parameters for CreateComment

## Returns

`CreateCommentPayload`

**`clientMutationId`**: `String`

A unique identifier for the client performing the mutation.

---

**`comment`**: `Comment`

---

**`errors`**: `[String!]!`

## Examples

```graphql Mutation
mutation CreateComment($input: CreateCommentInput!) {
  createComment(input: $input) {
    clientMutationId
    comment {
      assets {
        aspectRatio
        assetStyle
        contentType
        fileSize
        id
        imageUrl
      }
      author {
        ambassadorLevel
        ambassadorLevelId
        avatarUrl
        badges {
          __typename
        }
        communityRole
        conversations {
          __typename
        }
      }
      bodyHtml
      bodyText
      cheerCount
      createdAt
    }
    errors
  }
}
```

```json Variables
{
  "input": {
    "body": "string",
    "postId": "id"
  }
}
```

```json Response
{
  "data": {
    "createComment": {
      "clientMutationId": "string",
      "comment": {
        "assets": [
          {
            "aspectRatio": 1.5,
            "assetStyle": "string",
            "contentType": "string",
            "fileSize": "string",
            "id": "id",
            "imageUrl": "string"
          }
        ],
        "author": {
          "ambassadorLevel": "string",
          "ambassadorLevelId": 1,
          "avatarUrl": "string",
          "badges": [
            {
              "__typename": "Badge"
            }
          ],
          "communityRole": "CONTRIBUTOR",
          "conversations": {
            "__typename": "PublicConversationConnection"
          }
        },
        "bodyHtml": "string",
        "bodyText": "string",
        "cheerCount": 1,
        "createdAt": "value"
      },
      "errors": [
        "string"
      ]
    }
  }
}
```


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