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

# Edit a community

Opigno Enterprise API provides the `editCommunity` mutation to update the community data.
The community can be edited only by the owner or a user associated wit the `ADMINISTRATOR` scope.

<Note>
  Community editing is implemented with a "patch" method. This means that only values that need to be updated should be sent.
</Note>

Mutation accepts the following arguments:

| Argument      | Type                 | Description                                                                       |
| :------------ | :------------------- | :-------------------------------------------------------------------------------- |
| `communityId` | `ID`                 | **Required**. ID of the community that should be updated.                         |
| `data`        | `EditCommunityInput` | **Required**. Contains the object with the community data that should be updated. |

## `EditCommunityInput` object

| Parameter                 | Type                                                                                 | Description                                                                                                                                                                                                                                                            | Default |
| :------------------------ | :----------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `title`                   | `String`                                                                             | The community title. Leave empty to keep it unchanged.                                                                                                                                                                                                                 | —       |
| `description`             | `String`                                                                             | The community description. Available HTML tags are: `<br>`, `<p>`, `<h2>`, `<h3>`, `<h4>`, `<h5>`, `<h6>`, `<strong>`, `<em>`, `<u>`, `<s>`, `<sub>`, `<sup>`, `<a href>`, `<ul>`, `<ol start>`, `<li>`. Any other tag will trimmed. Leave empty to keep it unchanged. | —       |
| `visibility`              | `CommunityVisibility`                                                                | The community [visibility](/OpignoEnterpriseAPI/Community/GetCommunity#community-visibility). Leave empty to keep it unchanged.                                                                                                                                        | —       |
| `postNotificationEnabled` | `Boolean`                                                                            | A flag that indicates that a notification about a new post is enabled. Leave empty to keep it unchanged.                                                                                                                                                               | —       |
| `imageBase64`             | [`UploadedFileInput`](/OpignoEnterpriseAPI/Post/CreatePost#uploadedfileinput-object) | The community image formatted as base64 string. Leave empty to keep it unchanged.                                                                                                                                                                                      | —       |
| `removeImage`             | `Boolean`                                                                            | Since `image` is the only optional property in Community object, it can be removed. To remove the image, set the value to `true`.                                                                                                                                      | `false` |

<CodeGroup>
  ```filename GraphQL theme={null}
    mutation editCommunity {
      editCommuntiy(
        communityId: 2,
        data: {
          title: "The updated community title",
          description: "<p>The updated community description.</p>",
          visibility: PRIVATE
        }
      ) {
        errors
        response {
          id
          title
          visibility
          description
          created
          image {
            url
          }
          lastPostTime
          membersNumber
          postNotificationEnabled
        }
      }
    }
  ```

  ```File Query result [expandable] theme={null}
  {
    "data": {
      "editCommunity": {
        "errors": [],
        "response": {
          "id": "2",
          "title": "The updated community title",
          "visibility": "PRIVATE",
          "description": "<p>The updated community description.</p>\n",
          "created": 1757139550,
          "image": {
            "url": "http://opigno-enterprise.docksal.site/sites/default/files/2025-09/Opigno_logo.png"
          },
          "lastPostTime": null,
          "membersNumber": 0,
          "postNotificationEnabled": false
        }
      }
    }
  }
  ```
</CodeGroup>

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