> ## 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.

# Clone a magic link

> Mints a twin of an existing link (any status, including expired or revoked): same flow, referenceId, config, theme, language and metadata, with a new linkId/token and the source link's original TTL. Useful to reproduce a session while debugging. Fund-request twins get a new money request. Payout-claim links and cash-deposit operation-payment links cannot be cloned.



## OpenAPI

````yaml /raas-widgets/openapi.json post /partner/links/{linkId}/clone
openapi: 3.0.0
info:
  title: RaaS Widgets Partner API
  description: >
    REST API for RaaS Widgets partner integrations. Create magic links for
    embeddable flows, manage end users, track transfer operations, handle CIP
    verification, and configure webhooks for real-time event notifications.


    This specification covers the **Partner-accessible API** only (`X-API-Key`
    against `/partner/*`). Widget and Superadmin APIs are out of scope.


    ## Authentication


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


    ## Environments


    | Environment | Base URL |

    |---|---|

    | Sandbox | `https://api.sandbox.raas-widgets.leapfinancial.com` |
  version: 3.3.0
  contact: {}
servers:
  - url: https://api.sandbox.raas-widgets.leapfinancial.com
    description: Sandbox
security: []
tags:
  - name: Partner - Magic Links
    description: Create, list, and manage magic links for flows
  - name: Partner - Flows
    description: List enabled flows and the full flow catalog
  - 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 - Requests
    description: List and inspect money-request records
  - name: Partner - Deferred Payouts
    description: List, inspect, and cancel deferred payout remittances
  - 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, logo, etc.)
  - name: Partner - Webhooks
    description: Configure webhook endpoints and inspect delivery history
  - name: Partner - Pricing
    description: >-
      Indicative pre-quote summaries (best / worst / averages) for partner
      integrations
paths:
  /partner/links/{linkId}/clone:
    post:
      tags:
        - Partner - Magic Links
      summary: Clone a magic link
      description: >-
        Mints a twin of an existing link (any status, including expired or
        revoked): same flow, referenceId, config, theme, language and metadata,
        with a new linkId/token and the source link's original TTL. Useful to
        reproduce a session while debugging. Fund-request twins get a new money
        request. Payout-claim links and cash-deposit operation-payment links
        cannot be cloned.
      operationId: LinksController_cloneLink
      parameters:
        - name: linkId
          required: true
          in: path
          description: Link ID of the source link
          schema:
            example: link_acme_a1b2c3d4e5f6
            type: string
      responses:
        '201':
          description: Twin link created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloneLinkResponseDto'
        '401':
          description: Unauthorized — invalid or missing API key / bearer token
        '403':
          description: Forbidden — flow no longer enabled or user is blocked
        '404':
          description: Magic link not found
        '409':
          description: Link is bound to another entity and cannot be cloned
      security:
        - api-key: []
components:
  schemas:
    CloneLinkResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/CloneLinkDataDto'
      required:
        - success
        - data
    CloneLinkDataDto:
      type: object
      properties:
        linkId:
          type: string
          description: Unique link identifier
          example: link_acme_m2m_a1b2c3d4e5f6
        referenceId:
          type: string
          description: Reference ID of the user in your system
          example: user-12345
        externalId:
          type: string
          description: Partner tracing ID for this link/intent
          example: ORD-2026-001
        campaign:
          type: string
          description: >-
            Campaign slug this link belongs to. Opaque join key to your campaign
            catalog.
          example: feb-promo-gt
        status:
          type: string
          description: Current link status
          example: created
          enum:
            - created
        url:
          type: string
          description: >-
            Full shareable URL to send to the end user. Fund-request URLs serve
            partner-branded social metadata to preview crawlers and redirect
            browsers to the widget.
          example: >-
            https://flows.sandbox.raas-widgets.leapfinancial.com/link_acme_m2m_a1b2c3d4e5f6
        token:
          type: string
          description: Authentication token for the link (include in link delivery to user)
          example: 550e8400-e29b-41d4-a716-446655440000
        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'
        clonedFrom:
          type: string
          description: Link ID of the source link this twin was cloned from
          example: link_acme_m2m_a1b2c3d4e5f6
        requestId:
          type: string
          description: 'Fund-request only: the new money request minted for the twin'
          example: req_a1b2c3d4e5f6
      required:
        - linkId
        - referenceId
        - status
        - url
        - token
        - expiresAt
        - createdAt
        - clonedFrom
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your partner API key. Use `raas_sandbox_*` keys for the sandbox
        environment and `raas_live_*` keys for production.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.