> ## 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 Attach Product To Hub

> Attach a product to a hub, creating hub_product_display plus default
hub_price_display rows for every active price on the product.



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/teams/{team_id}/hubs/{hub_id}/products/
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/{hub_id}/products/:
    post:
      tags:
        - products-admin
      summary: Admin Attach Product To Hub
      description: |-
        Attach a product to a hub, creating hub_product_display plus default
        hub_price_display rows for every active price on the product.
      operationId: >-
        products_admin.post_products_admin_post_teams_by_team_id_hubs_by_hub_id_products
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/HubProductDisplayCreateEnvelope'
        required: true
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HubProductDisplayResponse'
          description: Successful Response
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Authentication required.
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Forbidden — caller is not the team owner.
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Resource not found.
        '409':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Conflict — duplicate or already-attached resource.
        '415':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: >-
            Unsupported Media Type — write routes require `Content-Type:
            application/vnd.api+json`.
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Validation error or invalid query parameter.
        '429':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Too many requests — rate limit exceeded.
      security:
        - HTTPBearer: []
components:
  schemas:
    HubProductDisplayCreateEnvelope:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/HubProductDisplayCreateResource'
      required:
        - data
      title: HubProductDisplayCreateEnvelope
      type: object
    HubProductDisplayResponse:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/HubProductDisplayResource'
      required:
        - data
      title: HubProductDisplayResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    HubProductDisplayCreateResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/HubProductDisplayCreateAttributes'
        type:
          const: hub_product_displays
          title: Type
          type: string
      required:
        - type
        - attributes
      title: HubProductDisplayCreateResource
      type: object
    HubProductDisplayResource:
      additionalProperties: false
      properties:
        attributes:
          $ref: '#/components/schemas/HubProductDisplayAttributes'
        id:
          title: Id
          type: string
        type:
          const: hub_product_displays
          default: hub_product_displays
          title: Type
          type: string
      required:
        - id
        - attributes
      title: HubProductDisplayResource
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    HubProductDisplayCreateAttributes:
      additionalProperties: false
      properties:
        is_free_tier:
          default: false
          title: Is Free Tier
          type: boolean
        position:
          default: 0
          maximum: 2147483647
          minimum: 0
          title: Position
          type: integer
        product_id:
          title: Product Id
          type: string
        visible:
          default: true
          title: Visible
          type: boolean
      required:
        - product_id
      title: HubProductDisplayCreateAttributes
      type: object
    HubProductDisplayAttributes:
      additionalProperties: false
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        hub_id:
          title: Hub Id
          type: string
        is_free_tier:
          title: Is Free Tier
          type: boolean
        position:
          title: Position
          type: integer
        product_id:
          title: Product Id
          type: string
        updated_at:
          format: date-time
          title: Updated At
          type: string
        visible:
          title: Visible
          type: boolean
      required:
        - hub_id
        - product_id
        - position
        - visible
        - is_free_tier
        - created_at
        - updated_at
      title: HubProductDisplayAttributes
      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

````