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

# Create an invite link



## OpenAPI

````yaml /openapi.en.json post /api/v2/shops/{shopId}/team/invite-links
openapi: 3.0.0
info:
  title: ItemShop v2 API
  description: >-
    REST API platformy ItemShop v2 (NestJS + Fastify). Wszystkie ścieżki mają
    prefiks /api/v2.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.itemshop.dev
    description: Production
  - url: http://localhost:3000
    description: Local
security: []
tags: []
paths:
  /api/v2/shops/{shopId}/team/invite-links:
    post:
      tags:
        - Shops
      summary: Create an invite link
      operationId: ShopController_createInviteLink
      parameters:
        - name: shopId
          required: true
          in: path
          schema:
            type: string
          description: Shop ID (ObjectId)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInviteLinkDto'
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                  message:
                    type: string
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    CreateInviteLinkDto:
      type: object
      properties:
        expiresInHours:
          type: number
          minimum: 0
          maximum: 8760
          description: Validity in hours (0 = never expires)
          example: 168
        maxUses:
          type: number
          minimum: 0
          maximum: 10000
          description: Max uses (0 = unlimited)
          example: 10
        roles:
          maxItems: 10
          description: >-
            Roles with permission presets: owner, admin, manager, support,
            viewer (and legacy view/edit/full).
          example:
            - support
          type: array
          items:
            type: string
        customPermissions:
          maxItems: 64
          description: >-
            Extra single permissions resource:action (e.g. 'products:write'),
            wildcards 'orders:*' / '*'. Granted ON TOP of roles.
          example:
            - orders:read
          type: array
          items:
            type: string
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: integer
          example: 400
        error:
          type: string
          example: Error message
        timestamp:
          type: string
          format: date-time
        path:
          type: string
          example: /api/v2/...
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    bearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http

````