Skip to main content
Communities are a part of social features functionality provided by Opigno Enterprise. They allow to group users by interests and discuss different topics by sharing posts inside a community. A community can be created by any user associated with a context with AUTHENTICATED scope. The current API user will be set as a community owner and will not be considered as a member. To create a community, createCommunity mutation should be executed. Mutation has a single required incoming argument - data that represents CommunityInput object:
ParameterTypeDescriptionDefault
titleStringRequired. Represents the community title.
descriptionStringRequired. A 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.
visibilityCommunityVisibilityRequired. A community visibility.
postNotificationEnabledBooleanA flag that indicates that a notification about a new post is enabled.true
imageBase64UploadedFileInputThe community image formatted as base64 string.
  mutation createCommunity {
    createCommunity(data: {
      title: "Example community",
      description: "<p>This is an example of the communtiy creation with the Opigno Enterprise API.</p>",
      visibility: PUBLIC,
      postNotificationEnabled: false,
      imageBase64: {
        filename: "Opigno_logo.png",
        contentBase64: "iVBORw0KGgoAAAANSUhEUgAAAfQAAAB0CAYAAABzEcD[...]ggYAoaAIdBEBP4PcmKcThyYmiAAAAAASUVORK5CYII="
      }
    }) {
      errors
      response {
        id
        created
        description
        membersNumber
        postNotificationEnabled
        title
        visibility
        ownerUserContext {
          displayName
          id
          uuid
        }
        lastPostTime
        image {
          url
        }
        cta {
          actionId
          title
          arguments {
            key
            value
          }
        }
      }
    }
  }
The mutation returns a Community object. Detailed description and the full list of available properties can be found here.