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

# List magic links

> Returns a paginated list of magic links for the authenticated partner. Filter by visibility (active/expired), status, referenceId, and date range.



## OpenAPI

````yaml /m2m/openapi.json get /partner/links
openapi: 3.0.0
info:
  title: M2M Partner API
  description: >
    REST API for M2M partner integrations. Create magic links to enable
    cross-border money transfers, manage end users, track transfer operations,
    handle CIP verification, and configure webhooks for real-time event
    notifications.


    ## Authentication


    All endpoints require an API key passed in the `X-API-Key` header. Use
    `m2m_test_*` keys for the sandbox environment.


    ## Environments


    | Environment | Base URL |

    |---|---|

    | Sandbox | `https://m2m-backend-qa.up.railway.app` |
  version: 0.5.3
  contact: {}
servers:
  - url: https://m2m-backend-qa.up.railway.app
    description: Sandbox
security: []
tags:
  - name: Partner - Magic Links
    description: Create, list, and manage magic links for money transfers
  - name: Partner - Users
    description: View and manage end users associated with your partner account
  - name: Partner - Operations
    description: Track money transfer operations and their statuses
  - name: Partner - CIP
    description: Customer Identification Program (CIP) verification management
  - name: Partner - Data Requests
    description: Fulfill data requests for additional user information
  - name: Partner - Settings
    description: Configure partner-level settings (redirect URLs, etc.)
  - name: Partner - Webhooks
    description: Configure webhook endpoints and inspect delivery history
paths:
  /partner/links:
    get:
      tags:
        - Partner - Magic Links
      summary: List magic links
      description: >-
        Returns a paginated list of magic links for the authenticated partner.
        Filter by visibility (active/expired), status, referenceId, and date
        range.
      operationId: LinksController_listLinks
      parameters:
        - name: page
          required: false
          in: query
          description: Page number (1-indexed)
          schema:
            minimum: 1
            default: 1
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            minimum: 1
            maximum: 100
            default: 20
            example: 20
            type: number
        - name: from
          required: false
          in: query
          description: Filter records created on or after this date (ISO 8601)
          schema:
            example: '2026-01-01T00:00:00.000Z'
            type: string
        - name: to
          required: false
          in: query
          description: Filter records created on or before this date (ISO 8601)
          schema:
            example: '2026-02-28T23:59:59.999Z'
            type: string
        - name: visibility
          required: false
          in: query
          description: >-
            Filter by link visibility. "active" returns links that have not
            expired and are not revoked. "expired" returns links whose expiresAt
            has passed but are not revoked. Omit to return all links regardless
            of expiration.
          schema:
            example: active
            enum:
              - active
              - expired
            type: string
        - name: status
          required: false
          in: query
          description: >-
            Filter by specific link status. Can be combined with the visibility
            filter. "created" = link not yet opened. "opened" = user has
            accessed the link. "revoked" = partner revoked the link.
          schema:
            example: opened
            enum:
              - created
              - opened
              - revoked
            type: string
        - name: referenceId
          required: false
          in: query
          description: Filter links by the partner reference ID of the associated user
          schema:
            example: user-12345
            type: string
      responses:
        '200':
          description: Paginated list of magic links
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListLinksResponseDto'
        '401':
          description: Unauthorized — invalid or missing API key / bearer token
      security:
        - bearer: []
        - api-key: []
components:
  schemas:
    ListLinksResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/ListLinksDataDto'
      required:
        - success
        - data
    ListLinksDataDto:
      type: object
      properties:
        items:
          description: Array of magic links
          type: array
          items:
            $ref: '#/components/schemas/LinkListItemDto'
        pagination:
          $ref: '#/components/schemas/PaginationMetaDto'
      required:
        - items
        - pagination
    LinkListItemDto:
      type: object
      properties:
        linkId:
          type: string
          description: Unique link identifier
          example: link_acme_a1b2c3d4e5f6
        referenceId:
          type: string
          description: Reference ID of the user in your system
          example: user-12345
        status:
          type: string
          description: Current link status
          example: created
          enum:
            - created
            - opened
            - revoked
        url:
          type: string
          description: Full widget URL
          example: >-
            https://widget.m2m.leapfinancial.com/link_acme_a1b2c3d4e5f6/m2m-basic
        expiresAt:
          type: string
          description: Link expiration timestamp (ISO 8601)
          example: '2026-02-11T12:00:00.000Z'
        createdAt:
          type: string
          description: Link creation timestamp (ISO 8601)
          example: '2026-02-10T12:00:00.000Z'
        openedAt:
          type: string
          description: When the link was first opened by the end user (ISO 8601)
          example: '2026-02-10T13:00:00.000Z'
        userId:
          type: string
          description: M2M user ID (assigned after link is opened)
          example: user_acme_x1y2z3
        operationId:
          type: string
          description: Operation ID if a transfer was initiated
          example: op_acme_abc123
        userData:
          description: Summary of pre-filled user data
          allOf:
            - $ref: '#/components/schemas/LinkUserDataSummaryDto'
      required:
        - linkId
        - referenceId
        - status
        - url
        - expiresAt
        - createdAt
    PaginationMetaDto:
      type: object
      properties:
        page:
          type: number
          description: Current page number
          example: 1
        limit:
          type: number
          description: Number of items per page
          example: 20
        total:
          type: number
          description: Total number of items matching the query
          example: 85
        totalPages:
          type: number
          description: Total number of pages
          example: 5
      required:
        - page
        - limit
        - total
        - totalPages
    LinkUserDataSummaryDto:
      type: object
      properties:
        name:
          type: object
          description: User name structure
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your partner API key. Use `m2m_test_*` keys for the sandbox environment.

````