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

# Extra post/comment operations

Depending on the access level, the current user can perform the following additional operations:

1. Hide the post
2. Pin/unpin the post
3. Delete the post/comment

Every corresponding mutation for these actions has a single required incoming argument - `postId`.

## Hide the post

The current API user can hide any available post created by other users from the network.
In this case the post will not be returned in the queries and will not be accessible for the current user,
though it will remain visible for others. This can be done by executing the `hidePost` mutation.

<Note>
  A comment cannot be hidden, only a post. Also, own posts also cannot be hidden.
</Note>

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

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

If the mutation executed without any errors, a boolean value will be returned as a response indicating the execution status.

## Pin the post

Any available post can be pinned for the current API user. In the future it will
affect the sorting order of the posts that are returned by `getPostsFeed` query.

<Note>
  A comment cannot be pinned, only a post.
</Note>

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

  ```File Query result [expandable] theme={null}
  {
    "data": {
      "pinPost": {
        "response": {
          "isPinned": true
        },
        "errors": []
      }
    }
  }
  ```
</CodeGroup>

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

## Unpin the post

Similar to the pin action, the user can unpin previously pinned post. To perform the action, execute `unpinPost` mutation:

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

  ```File Query result [expandable] theme={null}
  {
    "data": {
      "unpinPost": {
        "response": {
          "isPinned": false
        },
        "errors": []
      }
    }
  }
  ```
</CodeGroup>

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

## Delete the post/comment

Any user can delete their own post or comment. Also, users associated with the context with `ADMINISTRATOR` scope can delete any post/comment.

After the mutation execution the post will be physically deleted and will not be available for any other user on the platform.

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

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

If the mutation executed without any errors, a boolean value will be returned as a response, indicating the execution status.
