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

# Revoke a magic link

> Revokes an active magic link, preventing the end user from completing the transfer. Only links in "created" or "opened" status can be revoked. Optionally provide a reason.



## OpenAPI

````yaml /m2m/openapi.json post /partner/links/{linkId}/revoke
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/{linkId}/revoke:
    post:
      tags:
        - Partner - Magic Links
      summary: Revoke a magic link
      description: >-
        Revokes an active magic link, preventing the end user from completing
        the transfer. Only links in "created" or "opened" status can be revoked.
        Optionally provide a reason.
      operationId: LinksController_revokeLink
      parameters:
        - name: linkId
          required: true
          in: path
          description: Unique magic link identifier
          schema:
            example: link_acme_a1b2c3d4e5f6
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeLinkDto'
      responses:
        '200':
          description: Magic link revoked successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevokeLinkResponseDto'
        '401':
          description: Unauthorized — invalid or missing API key / bearer token
        '404':
          description: Magic link not found
        '409':
          description: Link cannot be revoked in its current status
      security:
        - bearer: []
        - api-key: []
components:
  schemas:
    RevokeLinkDto:
      type: object
      properties:
        reason:
          type: string
          description: >-
            Human-readable reason for revoking the link. Stored for audit
            purposes.
          example: User requested cancellation
    RevokeLinkResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/RevokeLinkDataDto'
      required:
        - success
        - data
    RevokeLinkDataDto:
      type: object
      properties:
        linkId:
          type: string
          description: Link identifier
          example: link_acme_a1b2c3d4e5f6
        status:
          type: string
          description: New link status
          example: revoked
          enum:
            - revoked
        revokedAt:
          type: string
          description: When the link was revoked (ISO 8601)
          example: '2026-02-10T15:00:00.000Z'
      required:
        - linkId
        - status
        - revokedAt
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your partner API key. Use `m2m_test_*` keys for the sandbox environment.

````