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

# Block a user

> Blocks a user, preventing them from receiving new magic links or completing transfers. Optionally provide a reason for the block. Blocked users can be unblocked later.



## OpenAPI

````yaml /raas-widgets/openapi.json post /partner/users/{userId}/block
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://raas-widgets-backend-sandbox.up.railway.app` |
  version: 1.18.0
  contact: {}
servers:
  - url: https://raas-widgets-backend-sandbox.up.railway.app
    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/users/{userId}/block:
    post:
      tags:
        - Partner - Users
      summary: Block a user
      description: >-
        Blocks a user, preventing them from receiving new magic links or
        completing transfers. Optionally provide a reason for the block. Blocked
        users can be unblocked later.
      operationId: UsersController_blockUser
      parameters:
        - name: userId
          required: true
          in: path
          description: M2M user identifier
          schema:
            example: user_acme_x1y2z3
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlockUserDto'
      responses:
        '201':
          description: User blocked successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlockUserResponseDto'
        '401':
          description: Unauthorized — invalid or missing API key / bearer token
        '404':
          description: User not found
        '409':
          description: User is already blocked
      security:
        - api-key: []
components:
  schemas:
    BlockUserDto:
      type: object
      properties:
        reason:
          type: string
          description: >-
            Human-readable reason for blocking the user. Stored for audit
            purposes and returned in user detail responses. Max 500 characters.
          example: Suspicious activity detected on multiple transactions
    BlockUserResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/BlockUserResponseDataDto'
      required:
        - success
        - data
    BlockUserResponseDataDto:
      type: object
      properties:
        userId:
          type: string
          description: M2M user ID
          example: user_acme_x1y2z3
        blocked:
          type: boolean
          description: Blocked status
          example: true
        blockedAt:
          type: string
          description: When the user was blocked (ISO 8601)
          example: '2026-02-10T15:00:00.000Z'
        blockedReason:
          type: string
          description: Reason for blocking
          example: Suspicious activity detected
      required:
        - userId
        - blocked
        - blockedAt
  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.

````