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

# createReaction

> Add an emoji reaction to a post or comment. On the public API, reacting to a
post requires the `write:posts` or `host:write:network_posts` OAuth scope;
reacting to a comment requires `write:comments` or `host:write:network_posts`.



**mutation** `createReaction(input: CreateReactionInput!): CreateReactionPayload`

## Arguments

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

Parameters for CreateReaction

## Returns

`CreateReactionPayload`

**`clientMutationId`**: `String`

A unique identifier for the client performing the mutation.

---

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

---

**`reaction`**: `Reaction`

## Examples

```graphql Mutation
mutation CreateReaction($input: CreateReactionInput!) {
  createReaction(input: $input) {
    clientMutationId
    errors
    reaction {
      baseEmoji
      comment {
        assets {
          __typename
        }
        author {
          __typename
        }
        bodyHtml
        bodyText
        cheerCount
        createdAt
      }
      createdAt
      emoji
      id
      member {
        ambassadorLevel
        ambassadorLevelId
        avatarUrl
        badges {
          __typename
        }
        communityRole
        conversations {
          __typename
        }
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "emoji": "string",
    "targetId": "id"
  }
}
```

```json Response
{
  "data": {
    "createReaction": {
      "clientMutationId": "string",
      "errors": [
        "string"
      ],
      "reaction": {
        "baseEmoji": "string",
        "comment": {
          "assets": [
            {
              "__typename": "Asset"
            }
          ],
          "author": {
            "__typename": "User"
          },
          "bodyHtml": "string",
          "bodyText": "string",
          "cheerCount": 1,
          "createdAt": "value"
        },
        "createdAt": "value",
        "emoji": "string",
        "id": "id",
        "member": {
          "ambassadorLevel": "string",
          "ambassadorLevelId": 1,
          "avatarUrl": "string",
          "badges": [
            {
              "__typename": "Badge"
            }
          ],
          "communityRole": "CONTRIBUTOR",
          "conversations": {
            "__typename": "PublicConversationConnection"
          }
        }
      }
    }
  }
}
```


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