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

# Create a magic link for agent download

> Create a magic link to download the agent installer in a report group. This feature is only available for the FXXOne product. Contact the Flexxible team for more information.



## OpenAPI

````yaml /en/api-reference/openapi.en-v1.json post /v1/organizations/{organization_id}/reporting-groups/{reporting_group_id}/magic-links
openapi: 3.0.3
info:
  title: Public Portal API
  version: 1.0.0
  description: Public REST API for portal
servers:
  - url: https://api.staging.flxwvdexternal.com
    description: Staging API server.
security:
  - bearerAuth: []
tags: []
paths:
  /v1/organizations/{organization_id}/reporting-groups/{reporting_group_id}/magic-links:
    post:
      tags:
        - Reporting Groups
      summary: Create a magic link for agent download
      description: >-
        Create a magic link to download the agent installer in a report group.
        This feature is only available for the FXXOne product. Contact the
        Flexxible team for more information.
      operationId: createReportingGroupMagicLink
      parameters:
        - name: organization id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: The unique identifier of the organization
          example: 507f1f77bcf86cd799439011
        - name: reporting_group_id
          in: path
          required: true
          schema:
            type: string
            maxLength: 24
            pattern: ^[0-9a-f]{24}$
          description: The unique identifier of the reporting group
          example: 507f1f77bcf86cd799439020
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateReportingGroupMagicLinkRequestV1'
            examples:
              default-installer:
                summary: Create a magic link using strict installer values
                value:
                  expires_at: '2026-03-15T12:00:00.000Z'
                  installer:
                    version: latest
                    platform: windows
                    arch: x64
                    type: fxxone
      responses:
        '201':
          description: Magic link created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateReportingGroupMagicLinkResponseV1'
              examples:
                created-magic-link:
                  summary: Magic link created response
                  value:
                    id: 507f1f77bcf86cd799439099
                    token: 2ab46558-3c40-4b72-8fce-08b7b596f624
                    link: >-
                      https://portal.example.com/magic-link?key=2ab46558-3c40-4b72-8fce-08b7b596f624
        '400':
          $ref: '#/components/responses/BadRequest'
          description: >-
            Invalid request: path parameters, request body or date-time format
            are invalid.
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: 'Unauthorized: authentication required'
        '404':
          $ref: '#/components/responses/NotFound'
          description: Report group not found
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
          description: >-
            Unprocessable entity: business validation failed (e.g., expiration
            outside the allowed range).
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    CreateReportingGroupMagicLinkRequestV1:
      type: object
      additionalProperties: false
      properties:
        expires_at:
          type: string
          format: date-time
          description: >-
            Expiration date and time in UTC (ISO 8601, e.g., with a Z suffix).
            It must be in the future and no more than 91 days ahead.
          example: '2026-03-15T12:00:00.000Z'
        installer:
          $ref: '#/components/schemas/ReportingGroupMagicLinkInstallerV1'
      required:
        - expires_at
        - installer
      description: Request body for creating a magic link of Reporting Group.
    CreateReportingGroupMagicLinkResponseV1:
      type: object
      additionalProperties: false
      properties:
        id:
          type: string
          description: Identifier of the magic link
          example: 507f1f77bcf86cd799439099
        token:
          type: string
          description: Token associated with the magic link.
          example: 2ab46558-3c40-4b72-8fce-08b7b596f624
        link:
          type: string
          description: Magic link URL.
          example: >-
            https://portal.example.com/magic-link?key=2ab46558-3c40-4b72-8fce-08b7b596f624
      required:
        - id
        - token
        - link
    ReportingGroupMagicLinkInstallerV1:
      type: object
      additionalProperties: false
      properties:
        version:
          type: string
          enum:
            - latest
          description: Installer version.
          example: latest
        platform:
          type: string
          enum:
            - windows
          description: Installer platform.
          example: windows
        arch:
          type: string
          enum:
            - x64
          description: Installer architecture.
          example: x64
        type:
          type: string
          enum:
            - fxxone
          description: Installer type.
          example: fxxone
      required:
        - version
        - platform
        - arch
        - type
      description: Installer selection for the magic link.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
            details:
              type: string
          required:
            - message
            - code
      required:
        - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    UnprocessableEntity:
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: Too Many Requests
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````