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

# Like the post

Opigno Enterprise API provides possibility to add or remove "like" reactions to posts and comments, this can be done by executing `togglePostLike` mutation.

The mutation changes the state of the "like" flag for the given user: if the post is already liked, the flag will be removed;
otherwise, if the post was not liked by the current user before, the flag will be added.

The mutation has only one required incoming argument - `postID`.

<CodeGroup>
  ```filename GraphQL theme={null}
    mutation togglePostLike {
      togglePostLike(postId: 169) {
        response {
          isLiked
        }
        errors
      }
    }
  ```

  ```File Query result [expandable] theme={null}
    {
      "data": {
        "togglePostLike": {
          "response" {
            "isLiked": true
          }
        }
      }
    }
  ```
</CodeGroup>

When the same mutation executed the second time, `isLiked` parameter in the response will be changed to `false`.

The mutation returns a `Post` object. Detailed description and the full list of available properties can be found [here](/OpignoEnterpriseAPI/Post/GetPost).
