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

# Admin Create Hub

> Create a new hub for the team.



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/teams/{team_id}/hubs/
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/hubs/:
    post:
      tags:
        - hubs-admin
      summary: Admin Create Hub
      description: Create a new hub for the team.
      operationId: hubs_admin.post_hubs_admin_post_teams_by_team_id_hubs
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/HubCreateEnvelope'
        required: true
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HubResponse'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    HubCreateEnvelope:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/HubCreateResource'
      required:
        - data
      title: HubCreateEnvelope
      type: object
    HubResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/HubResource'
      required:
        - data
      title: HubResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    HubCreateResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/HubCreateAttributes'
        type:
          const: hubs
          title: Type
          type: string
      required:
        - type
        - attributes
      title: HubCreateResource
      type: object
    HubResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/HubAttributes'
        id:
          title: Id
          type: string
        type:
          const: hubs
          default: hubs
          title: Type
          type: string
      required:
        - id
        - attributes
      title: HubResource
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    HubCreateAttributes:
      additionalProperties: false
      properties:
        branding:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Branding
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        discussions_default_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Discussions Default Description
        discussions_default_title:
          anyOf:
            - maxLength: 255
              type: string
            - type: 'null'
          title: Discussions Default Title
        is_private:
          default: true
          title: Is Private
          type: boolean
        legacy_hash:
          anyOf:
            - maxLength: 64
              type: string
            - type: 'null'
          title: Legacy Hash
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        navigation:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Navigation
        settings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Settings
        slug:
          maxLength: 100
          minLength: 1
          pattern: ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$
          title: Slug
          type: string
        title:
          maxLength: 255
          minLength: 1
          title: Title
          type: string
      required:
        - title
        - slug
      title: HubCreateAttributes
      type: object
    HubAttributes:
      additionalProperties: false
      properties:
        branding:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Branding
        created_at:
          format: date-time
          title: Created At
          type: string
        deleted_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Deleted At
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        discussions_default_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Discussions Default Description
        discussions_default_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Discussions Default Title
        homepage:
          anyOf:
            - discriminator:
                mapping:
                  custom:
                    $ref: '#/components/schemas/HomepageCustom'
                  discussions_index:
                    $ref: '#/components/schemas/HomepageDiscussionsIndex'
                propertyName: kind
              oneOf:
                - $ref: '#/components/schemas/HomepageCustom'
                - $ref: '#/components/schemas/HomepageDiscussionsIndex'
            - type: 'null'
          title: Homepage
        is_free:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Free
        is_private:
          title: Is Private
          type: boolean
        legacy_hash:
          anyOf:
            - type: string
            - type: 'null'
          title: Legacy Hash
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        navigation:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Navigation
        policies_enabled:
          default: false
          title: Policies Enabled
          type: boolean
        settings:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Settings
        slug:
          title: Slug
          type: string
        team_id:
          title: Team Id
          type: string
        title:
          title: Title
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - team_id
        - title
        - slug
        - legacy_hash
        - description
        - discussions_default_title
        - discussions_default_description
        - is_private
        - branding
        - navigation
        - settings
        - meta
        - created_at
        - updated_at
        - deleted_at
      title: HubAttributes
      type: object
    HomepageCustom:
      additionalProperties: false
      properties:
        kind:
          const: custom
          default: custom
          title: Kind
          type: string
        page_id:
          title: Page Id
          type: string
      required:
        - page_id
      title: HomepageCustom
      type: object
    HomepageDiscussionsIndex:
      additionalProperties: false
      properties:
        kind:
          const: discussions_index
          default: discussions_index
          title: Kind
          type: string
      title: HomepageDiscussionsIndex
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````