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

# Create Product Items

> Issue product items to users by user ID or email. Users must be customers of the project. At least one of `users` or `emails` must be provided.



## OpenAPI

````yaml post /v1/products/{id}/items
openapi: 3.1.0
info:
  title: Wallet API
  version: 2.72.0
servers:
  - url: https://dev.api.mufi.app/
    description: Staging
security: []
paths:
  /v1/products/{id}/items:
    post:
      tags:
        - engagement
      summary: Create Product Items
      description: >-
        Issue product items to users by user ID or email. Users must be
        customers of the project. At least one of `users` or `emails` must be
        provided.
      parameters:
        - schema:
            type: string
            format: uuid
            description: The product ID.
          required: true
          description: The product ID.
          name: id
          in: path
      requestBody:
        description: Issue product items to users. Provide user IDs and/or emails.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProductItemRequest'
      responses:
        '201':
          description: Product items were successfully created and given to users.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductItemsResponse'
        '400':
          description: A bad request will contain a list of errors for invalid fields.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
        '401':
          description: >-
            Unauthorized. The API key is missing or has expired if you are using
            a key with an expiration date that you configured when creating the
            key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '403':
          description: >-
            Forbidden. The API key that you provided is not valid or does not
            exist.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '422':
          description: >-
            Validation error: Product not active, insufficient stock, exceeds
            max_items, exceeds max_per_account, or invalid users/emails.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
      security:
        - BearerAuth: []
components:
  schemas:
    CreateProductItemRequest:
      type: object
      properties:
        product_id:
          type: string
          format: uuid
          description: The ID of the product.
        users:
          type: array
          items:
            type: string
            format: uuid
          maxItems: 550
          description: >-
            The user IDs to give product items to. At least one of users or
            emails must be provided.
        emails:
          type: array
          items:
            type: string
            format: email
          maxItems: 550
          description: >-
            The user emails to give product items to. At least one of users or
            emails must be provided.
      required:
        - product_id
    ProductItemsResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ProductItemResponse'
      required:
        - items
    ProductItemResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The ID of the product item.
        created_at:
          type: string
          format: date-time
          description: The date and time the product item was created.
        updated_at:
          type: string
          format: date-time
          description: The date and time the product item was last updated.
        product_id:
          type: string
          format: uuid
          description: The ID of the product.
        item_id:
          type: integer
          description: >-
            The unique item ID as an integer of the product item. If NFT, this
            is the NFT ID too.
        redemption_count:
          type: integer
          description: How many times this item has been redeemed.
        redemption_quantity:
          type: integer
          description: How many times this item can be redeemed in total.
        is_fully_redeemed:
          type: boolean
          description: Whether this item has been fully redeemed.
        redeemed_at:
          type:
            - integer
            - 'null'
          description: >-
            The UNIX timestamp when the product item was fully redeemed. Null if
            not fully redeemed.
        user:
          $ref: '#/components/schemas/ProductItemUserSummary'
        product:
          $ref: '#/components/schemas/ProductItemProductSummary'
      required:
        - id
        - created_at
        - updated_at
        - product_id
        - item_id
        - redemption_count
        - redemption_quantity
        - is_fully_redeemed
        - user
        - product
    ProductItemUserSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The user ID.
        email:
          type:
            - string
            - 'null'
          format: email
          description: The user email.
        first_name:
          type:
            - string
            - 'null'
          description: The user first name.
        last_name:
          type:
            - string
            - 'null'
          description: The user last name.
      required:
        - id
        - email
        - first_name
        - last_name
      description: The current owner of the product item.
    ProductItemProductSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The product ID.
        name:
          type: string
          description: The product name.
        type:
          type: string
          enum:
            - admission
            - presale
            - perks
          description: The product type.
        redemption_quantity:
          type: integer
          description: How many times an item can be redeemed.
      required:
        - id
        - name
        - type
        - redemption_quantity
      description: The product this item belongs to.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: A JWT Access Token obtained from Google Cloud.

````