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

# Create a new community

> Create a new community.



## OpenAPI

````yaml /openapi/admin.json post /communities
openapi: 3.1.0
info:
  title: Nudj Admin API
  version: 1.0.0
servers:
  - url: https://{subdomain}.nudj.cx/api/v2/admin
    description: Organization API Server
    variables:
      subdomain:
        description: Your organization's subdomain (required)
        default: your-org
security:
  - ApiToken: []
paths:
  /communities:
    post:
      tags:
        - Community
      summary: Create a new community
      description: Create a new community.
      operationId: createCommunity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the community
                slug:
                  type: string
                  description: >-
                    The slug of the community in format of only letters and
                    hyphens
                descriptionConfig:
                  type:
                    - object
                    - 'null'
                  properties:
                    content:
                      type:
                        - string
                        - 'null'
                      description: The description content (HTML/text)
                    disableLineClamp:
                      type:
                        - boolean
                        - 'null'
                      description: >-
                        When true, shows the full description without line
                        clamping
                    maxLines:
                      type:
                        - number
                        - 'null'
                      minimum: 1
                      maximum: 10
                      description: Maximum number of lines to show before clamping (1-10)
                  description: >-
                    The description configuration including content and display
                    settings
                links:
                  oneOf:
                    - $ref: '#/components/schemas/CommunityLinks'
                    - type: 'null'
                  description: The links of the community
                startsAt:
                  type:
                    - string
                    - 'null'
                  description: The date the community is set to be available publicly
                expiresAt:
                  type:
                    - string
                    - 'null'
                  description: The date the community is set to be unavailable publicly
                logo:
                  type: string
                  format: uri
                  description: The url of the community logo image
                banner:
                  type: string
                  format: uri
                  description: The url of the community banner image
                status:
                  type: string
                  enum:
                    - archived
                    - draft
                    - expired
                    - live
                    - scheduled
                  description: >-
                    Set the community status, by default will be set to draft if
                    not provided
                tags:
                  type: array
                  items:
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                  description: An array of objectId tagIds referencing the tags collection
                campaigns:
                  type: array
                  items:
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                  description: >-
                    An array of objectId campaignIds referencing the campaigns
                    collection
                password:
                  type:
                    - string
                    - 'null'
                  description: >-
                    A password to access the community. If set then the
                    community will require a password to join.
                termsAndConditionsUrl:
                  type:
                    - string
                    - 'null'
                  format: uri
                  description: The terms and conditions url of the community
                privacyPolicyUrl:
                  type:
                    - string
                    - 'null'
                  format: uri
                  description: The privacy policy url of the community
                additionalInformation:
                  type:
                    - array
                    - 'null'
                  items:
                    $ref: '#/components/schemas/VariableConfigReference'
                  description: >-
                    Configurable form fields to collect additional user
                    information when joining the community. Each field (e.g.,
                    email, phone, address) is defined by a variable config that
                    specifies its type, validation rules, and display order.
                customTabs:
                  type: array
                  items:
                    $ref: '#/components/schemas/CustomTab'
                  maxItems: 2
                  description: Array of custom navigation tabs (maximum 2)
                isGlobalTemplate:
                  type:
                    - boolean
                    - 'null'
                  description: Whether the community is a global template
                availableAsTemplateForOrganisations:
                  type:
                    - array
                    - 'null'
                  items:
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                  description: >-
                    The organisations that the community is available as a
                    template for
                featured:
                  type:
                    - boolean
                    - 'null'
                rules:
                  oneOf:
                    - $ref: '#/components/schemas/CommunityRules'
                    - type: 'null'
                communityBackgroundImage:
                  type:
                    - string
                    - 'null'
                  format: uri
                  description: >-
                    Background image URL for the community. Recommended size:
                    1920x1080px (laptop screen size) or larger for optimal
                    display across devices
              required:
                - name
                - slug
                - logo
                - banner
              description: The input required to create a community
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Community'
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
components:
  schemas:
    CommunityLinks:
      type: object
      properties:
        website:
          type:
            - string
            - 'null'
          format: uri
          description: The website url of the community
        discord:
          type:
            - string
            - 'null'
          format: uri
          description: The Discord url of the community
        douyin:
          type:
            - string
            - 'null'
          format: uri
          description: The Douyin url of the community
        facebook:
          type:
            - string
            - 'null'
          format: uri
          description: The Facebook url of the community
        instagram:
          type:
            - string
            - 'null'
          format: uri
          description: The Instagram url of the community
        kuaishou:
          type:
            - string
            - 'null'
          format: uri
          description: The Kuaishou url of the community
        linkedin:
          type:
            - string
            - 'null'
          format: uri
          description: The LinkedIn url of the community
        messenger:
          type:
            - string
            - 'null'
          format: uri
          description: The Messenger url of the community
        pinterest:
          type:
            - string
            - 'null'
          format: uri
          description: The Pinterest url of the community
        qq:
          type:
            - string
            - 'null'
          format: uri
          description: The QQ url of the community
        qzone:
          type:
            - string
            - 'null'
          format: uri
          description: The Qzone url of the community
        quora:
          type:
            - string
            - 'null'
          format: uri
          description: The Quora url of the community
        reddit:
          type:
            - string
            - 'null'
          format: uri
          description: The Reddit url of the community
        snapchat:
          type:
            - string
            - 'null'
          format: uri
          description: The Snapchat url of the community
        telegram:
          type:
            - string
            - 'null'
          format: uri
          description: The Telegram url of the community
        tiktok:
          type:
            - string
            - 'null'
          format: uri
          description: The TikTok url of the community
        twitter:
          type:
            - string
            - 'null'
          format: uri
          description: The Twitter url of the community
        wechat:
          type:
            - string
            - 'null'
          format: uri
          description: The WeChat url of the community
        weibo:
          type:
            - string
            - 'null'
          format: uri
          description: The Weibo url of the community
        whatsapp:
          type:
            - string
            - 'null'
          format: uri
          description: The WhatsApp url of the community
        youtube:
          type:
            - string
            - 'null'
          format: uri
          description: The YouTube url of the community
      title: Community Links
      description: The links of the community
    VariableConfigReference:
      type: object
      properties:
        variableConfigId:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: >-
            The ID of the variable config that defines the data type, validation
            rules, and UI rendering
        required:
          type: boolean
          description: >-
            Whether this variable must be filled out by the user before
            proceeding
        position:
          type: number
          minimum: 1
          description: The display order position of this variable in the form or UI
      required:
        - variableConfigId
        - required
        - position
      title: Variable Config Reference
      description: >-
        A reference to a variable configuration that defines a form field or
        data collection point, including its display order, requirement status,
        and validation rules. Used to specify what information to collect from
        users in forms, communities, and other data collection contexts.
    CustomTab:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          description: The display title for the tab
        url:
          type: string
          format: uri
          description: The URL the tab navigates to (HTTPS only)
        opensInNewTab:
          type: boolean
          description: Whether the link opens in a new tab
        position:
          type: integer
          minimum: 1
          description: >-
            The order in which the tab appears in the main navigation menu
            (1-based)
      required:
        - title
        - url
        - opensInNewTab
        - position
      title: Custom Tab
      description: A custom navigation tab with external link
    CommunityRules:
      type: object
      properties:
        text:
          type:
            - string
            - 'null'
          description: The text content of the community rules
        agreements:
          type:
            - array
            - 'null'
          items:
            type: string
          description: Array of agreement statements that users must accept
      title: Community Rules
      description: Community rules with text content and agreement statements
    Community:
      type: object
      properties:
        id:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: The id of the community
        organisationId:
          type: string
          pattern: ^[0-9a-fA-F]{24}$
          description: The organisation that the community belongs to
        name:
          type: string
          description: The name of the community
        slug:
          type: string
          description: The slug of the community in format of only letters and hyphens
        descriptionConfig:
          type:
            - object
            - 'null'
          properties:
            content:
              type:
                - string
                - 'null'
              description: The description content (HTML/text)
            disableLineClamp:
              type:
                - boolean
                - 'null'
              description: When true, shows the full description without line clamping
            maxLines:
              type:
                - number
                - 'null'
              minimum: 1
              maximum: 10
              description: Maximum number of lines to show before clamping (1-10)
          description: The description configuration including content and display settings
        communityType:
          type: string
          enum:
            - Artist
            - Brand
            - Business
            - Cause
            - Community
            - Entertainment
            - Organisation
            - Place
            - Product
          description: The type of the community
        access:
          type: string
          enum:
            - open
            - request
          description: The access level of the community
        status:
          type: string
          enum:
            - archived
            - draft
            - expired
            - live
            - scheduled
          description: The status of the community
        links:
          oneOf:
            - $ref: '#/components/schemas/CommunityLinks'
            - type: 'null'
          description: The links of the community
        style:
          type:
            - object
            - 'null'
          properties:
            lightMode:
              type:
                - object
                - 'null'
              properties:
                navbarLogo:
                  type:
                    - string
                    - 'null'
                logo:
                  type:
                    - string
                    - 'null'
                banner:
                  type:
                    - string
                    - 'null'
                theme:
                  type:
                    - object
                    - 'null'
                  additionalProperties: {}
                customCSS:
                  type:
                    - string
                    - 'null'
                favicon:
                  type:
                    - string
                    - 'null'
            darkMode:
              type:
                - object
                - 'null'
              properties:
                navbarLogo:
                  type:
                    - string
                    - 'null'
                logo:
                  type:
                    - string
                    - 'null'
                banner:
                  type:
                    - string
                    - 'null'
                theme:
                  type:
                    - object
                    - 'null'
                  additionalProperties: {}
                customCSS:
                  type:
                    - string
                    - 'null'
                favicon:
                  type:
                    - string
                    - 'null'
            general:
              type:
                - object
                - 'null'
              properties:
                primaryLanguage:
                  type:
                    - string
                    - 'null'
                  enum:
                    - english
                    - portuguese
          description: The style of the community
        usersWaiting:
          type:
            - array
            - 'null'
          items:
            type: string
          description: The users waiting for approval
        verified:
          type:
            - boolean
            - 'null'
          description: Whether the community is verified
        termsAndConditionsUrl:
          type:
            - string
            - 'null'
          format: uri
          description: The terms and conditions url of the community
        privacyPolicyUrl:
          type:
            - string
            - 'null'
          format: uri
          description: The privacy policy url of the community
        additionalInformation:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/VariableConfigReference'
          description: >-
            Configurable form fields to collect additional user information when
            joining the community. Each field (e.g., email, phone, address) is
            defined by a variable config that specifies its type, validation
            rules, and display order.
        bannerTitle:
          type:
            - string
            - 'null'
        bannerDescription:
          type:
            - string
            - 'null'
        bannerButtonText:
          type:
            - string
            - 'null'
        bannerHref:
          type:
            - string
            - 'null'
          format: uri
        rules:
          oneOf:
            - $ref: '#/components/schemas/CommunityRules'
            - type: 'null'
        requireMemberRole:
          type:
            - boolean
            - 'null'
        featured:
          type:
            - boolean
            - 'null'
        memberRequirements:
          type:
            - array
            - 'null'
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    const: age-member-requirement
                  minimumAge:
                    type: number
                  parentManaged:
                    type: boolean
                required:
                  - type
                  - minimumAge
                  - parentManaged
              - $ref: '#/components/schemas/CodeMemberRequirement'
              - type: object
                properties:
                  type:
                    type: string
                    const: variable-member-requirement
                  variableConfigId:
                    type: string
                  onlyRequiredIf:
                    type:
                      - array
                      - 'null'
                    items:
                      type: string
                      enum:
                        - minimum-age-not-met
                        - minimum-age-met
                required:
                  - type
                  - variableConfigId
        tags:
          type: array
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          description: An array of objectId tagIds referencing the tags collection
        campaigns:
          type: array
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          description: >-
            An array of objectId campaignIds referencing the campaigns
            collection
        customTabs:
          type: array
          items:
            $ref: '#/components/schemas/CustomTab'
          maxItems: 2
          description: Array of custom navigation tabs (maximum 2)
        availableAsTemplateForOrganisations:
          type:
            - array
            - 'null'
          items:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
          description: The organisations that the community is available as a template for
        isGlobalTemplate:
          type:
            - boolean
            - 'null'
          description: Whether the community is a global template
        referralUrlOverride:
          type:
            - string
            - 'null'
          format: uri
          description: The referral url override of the community
        startsAt:
          type:
            - string
            - 'null'
          description: The date the community is set to be available publicly
        expiresAt:
          type:
            - string
            - 'null'
          description: The date the community is set to be unavailable publicly
        createdAt:
          type:
            - string
            - 'null'
          description: The date the community was created
        updatedAt:
          type:
            - string
            - 'null'
          description: The date the community was last updated
        communityBackgroundImage:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            Background image URL for the community. Recommended size:
            1920x1080px (laptop screen size) or larger for optimal display
            across devices
        password:
          type:
            - string
            - 'null'
          description: >-
            A password to access the community. If set then the community will
            require a password to join.
      required:
        - id
        - organisationId
        - name
        - slug
        - communityType
        - access
        - status
        - tags
        - campaigns
        - customTabs
      title: Community
      description: A community
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []
    CodeMemberRequirement:
      type: object
      properties:
        type:
          type: string
          const: code-member-requirement
        accessCodes:
          type: array
          items:
            type: string
        usedCodes:
          type: array
          items:
            type: string
      required:
        - type
        - accessCodes
        - usedCodes
      title: CodeMemberRequirement
      description: A code member requirement
  securitySchemes:
    ApiToken:
      type: apiKey
      in: header
      name: x-api-token

````