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

# Bulk-create Payouts

> Creates one Payout per row through the single-payout write-path, tagged via { channel: 'csv', uploadId }. Row failures (bad shape, gate rejections) are reported per row and never abort the file. Idempotent by construction: each row's key derives from `${uploadId}:${index}`, so a byte-identical re-upload replays every row instead of duplicating.



## OpenAPI

````yaml POST /v1/payouts/bulk
openapi: 3.0.0
info:
  title: Cleff API
  description: >-
    Payout orchestration platform. All endpoints under /v1/ require an API key
    in the Authorization header (Bearer ck_<env>_<id>_<secret>).
  version: 0.0.1
  contact: {}
servers: []
security: []
tags: []
paths:
  /v1/payouts/bulk:
    post:
      tags:
        - Payouts
      summary: Bulk-create Payout Intents from CSV rows
      description: >-
        Creates one Payout per row through the single-payout write-path, tagged
        via { channel: 'csv', uploadId }. Row failures (bad shape, gate
        rejections) are reported per row and never abort the file. Idempotent by
        construction: each row's key derives from `${uploadId}:${index}`, so a
        byte-identical re-upload replays every row instead of duplicating.
      operationId: PayoutsController_bulkCreate
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkPayoutDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkPayoutResponseDto'
        '401':
          description: Missing or invalid credentials
      security:
        - api_key: []
components:
  schemas:
    BulkPayoutDto:
      type: object
      properties:
        uploadId:
          type: string
          description: >-
            Content hash of the uploaded file, computed client-side. Tags every
            Payout's `via` and seeds each row's idempotency key so a
            byte-identical re-upload replays instead of duplicating.
        rows:
          description: >-
            Parsed CSV rows (1..1000). Each row is validated individually
            server-side; a bad row fails only itself.
          type: array
          items:
            $ref: '#/components/schemas/BulkPayoutRowDto'
      required:
        - uploadId
        - rows
    BulkPayoutResponseDto:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/BulkPayoutRowResultDto'
      required:
        - results
    BulkPayoutRowDto:
      type: object
      properties:
        beneficiary_id:
          type: string
          format: uuid
        bank_account_id:
          type: string
          format: uuid
        amount_minor:
          type: number
        currency:
          type: string
          description: ISO 4217 currency code
        purpose_of_payment:
          type: string
          enum:
            - advertising
            - advisor_fees
            - charity
            - education
            - family_support
            - investment
            - loan_repayment
            - medical
            - other
            - payroll
            - purchase_of_goods
            - purchase_of_services
            - real_estate
            - royalties
            - taxes
            - treasury
            - travel
        external_ref:
          type: string
          description: Business-supplied reference (e.g. tradeId/jobId).
        idempotency_key:
          type: string
          description: Overrides the derived `${uploadId}:${index}` key for this row.
      required:
        - beneficiary_id
        - bank_account_id
        - amount_minor
        - currency
        - purpose_of_payment
    BulkPayoutRowResultDto:
      type: object
      properties:
        index:
          type: number
          description: Zero-based position of the row in the request.
        status:
          type: string
          enum:
            - created
            - replayed
            - failed
        payout_id:
          type: object
          nullable: true
          description: Set for created/replayed.
        error:
          type: object
          nullable: true
          description: Field-level reason a failed row was rejected.
      required:
        - index
        - status
  securitySchemes:
    api_key:
      scheme: bearer
      bearerFormat: ck_<env>_<id>_<secret>
      type: http
      description: >-
        Cleff API key issued to a Business that self-registers via POST
        /v1/registration

````