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

# Patch Setup



## OpenAPI

````yaml /openapi/fluide-auth.json patch /api/v1/onboarding/setup
openapi: 3.0.0
info:
  title: Fluide Auth API
  description: >-
    Developer credentials, session management, and identity for the Fluide
    Suite. In the API playground, click Authorize and provide Bearer JWT,
    X-Fluide-Api-Key, and X-Fluide-Client-Id (fluide-developer). For partner /
    ISV integrations acting on a merchant, also set optional X-Workspace-Id and
    X-Acting-Company-Id on each request (see Multi-tenancy).
  version: '1.0'
  contact: {}
servers:
  - url: https://test.api.fluidehr.com
    description: API
security:
  - bearer: []
    fluideApiKey: []
    fluideClientId: []
tags:
  - name: auth
    description: ''
  - name: App
    description: Service root and build metadata. Use for quick connectivity checks.
    x-group: Operations
  - name: Auth Context
  - name: Health
    description: >-
      Liveness and readiness probes. Returns dependency status (database, Redis,
      etc.) for orchestrators and uptime monitors.
    x-group: Operations
  - name: auth-v1
  - name: BetterAuthOAuthBridge
  - name: Auth
  - name: Authorize
    description: >-
      Exchange API key and secret for a machine JWT, read developer metadata,
      rotate secrets, and manage API billing.
  - name: Organizations
  - name: Company
  - name: Onboarding
  - name: organigram
  - name: org master data
  - name: org rbac
  - name: engagement
  - name: marketplace-admin
  - name: virtual manager
  - name: compliance-expert
  - name: Partner Marketplace
  - name: delegation audit
  - name: workspace
  - name: client-onboarding
  - name: partner-hub
  - name: cohort
  - name: investor portfolio
  - name: investor-portfolio
  - name: workflow
  - name: inter company
paths:
  /api/v1/onboarding/setup:
    patch:
      tags:
        - Onboarding
      summary: Patch Setup
      operationId: OnboardingController_patchSetup_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchOnboardingSetupDto'
      responses:
        '200':
          description: Patch Setup
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ApiResponseDto'
                  - properties:
                      data:
                        description: Endpoint-specific payload
        '400':
          description: Validation failed or invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
        '401':
          description: Missing or invalid JWT / API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
        '403':
          description: Token valid but insufficient permission for this operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
        '404':
          description: Resource not found or outside caller scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponseDto'
      security:
        - bearer: []
          fluideApiKey: []
          fluideClientId: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -sS -X PATCH "$FLUIDE_BASE_URL/api/v1/onboarding/setup" \
              -H "Authorization: Bearer $FLUIDE_ACCESS_TOKEN" \
              -H "X-Fluide-Api-Key: $FLUIDE_API_KEY" \
              -H "X-Fluide-Client-Id: fluide-developer" \
              -H "Content-Type: application/json" \
              -d '{}'
        - lang: node
          label: Node.js
          source: >-
            const baseUrl = process.env.FLUIDE_BASE_URL;


            const response = await fetch(`${baseUrl}/api/v1/onboarding/setup`, {
              method: 'PATCH',
              headers: {
                Authorization: `Bearer ${process.env.FLUIDE_ACCESS_TOKEN}`,
                'X-Fluide-Api-Key': process.env.FLUIDE_API_KEY,
                'X-Fluide-Client-Id': 'fluide-developer',
                'Content-Type': 'application/json',
              },
              body: JSON.stringify({}),
            });


            if (!response.ok) throw new Error(`HTTP ${response.status}: ${await
            response.text()}`);

            console.log(await response.json());
        - lang: python
          label: Python
          source: |-
            import os
            import requests

            base_url = os.environ["FLUIDE_BASE_URL"]
            headers = {
                    "Authorization": f"Bearer {os.environ['FLUIDE_ACCESS_TOKEN']}",
                    "X-Fluide-Api-Key": os.environ["FLUIDE_API_KEY"],
                    "X-Fluide-Client-Id": "fluide-developer",
            }

            response = requests.patch(
                f"{base_url}/api/v1/onboarding/setup",
                headers=headers,
                json={},
                timeout=30,
            )
            response.raise_for_status()
            print(response.json())
        - lang: java
          label: Java
          source: >-
            import java.net.URI;

            import java.net.http.HttpClient;

            import java.net.http.HttpRequest;

            import java.net.http.HttpResponse;


            String baseUrl = System.getenv("FLUIDE_BASE_URL");

            HttpClient client = HttpClient.newHttpClient();

            HttpRequest.Builder builder = HttpRequest.newBuilder()
                .uri(URI.create(baseUrl + "/api/v1/onboarding/setup"))
                .header("Authorization", "Bearer " + System.getenv("FLUIDE_ACCESS_TOKEN"))
                .header("X-Fluide-Api-Key", System.getenv("FLUIDE_API_KEY"))
                .header("X-Fluide-Client-Id", "fluide-developer")
                .header("Content-Type", "application/json")
                .PATCH(HttpRequest.BodyPublishers.ofString("{}"))
                .build();
            HttpResponse<String> response = client.send(builder.build(),
            HttpResponse.BodyHandlers.ofString());

            if (response.statusCode() >= 400) throw new RuntimeException("HTTP "
            + response.statusCode() + ": " + response.body());

            System.out.println(response.body());
        - lang: php
          label: PHP
          source: >-
            <?php

            $baseUrl = getenv("FLUIDE_BASE_URL");

            $ch = curl_init($baseUrl . "/api/v1/onboarding/setup");

            curl_setopt_array($ch, [
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_CUSTOMREQUEST => 'PATCH',
                CURLOPT_HTTPHEADER => [
                    'Authorization: Bearer ' . getenv('FLUIDE_ACCESS_TOKEN'),
                    'X-Fluide-Api-Key: ' . getenv('FLUIDE_API_KEY'),
                    'X-Fluide-Client-Id: fluide-developer',
                    'Content-Type: application/json',
                ],
                CURLOPT_POSTFIELDS => "{}",
            ]);

            $response = curl_exec($ch);

            if ($response === false) throw new
            RuntimeException(curl_error($ch));

            $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);

            if ($status >= 400) throw new RuntimeException("HTTP $status:
            $response");

            echo $response;
components:
  schemas:
    PatchOnboardingSetupDto:
      type: object
      properties:
        onboardingPersona:
          type: string
          enum:
            - business_owner
            - partner
            - service_partner
            - virtual_manager
            - compliance_expert
            - eso
            - capital_allocator
        businessType:
          type: string
          enum:
            - SME
            - STARTUP
            - NGO
            - MFI
            - CORPORATE
            - COOPERATIVE
        partner:
          $ref: '#/components/schemas/PartnerOnboardingDto'
        eso:
          $ref: '#/components/schemas/EsoOnboardingDto'
        capitalAllocator:
          $ref: '#/components/schemas/CapitalAllocatorOnboardingDto'
        firmVerification:
          $ref: '#/components/schemas/FirmVerificationDto'
        businessRegistration:
          $ref: '#/components/schemas/BusinessRegistrationDto'
        partnerCompliance:
          $ref: '#/components/schemas/PartnerComplianceDto'
        legal:
          $ref: '#/components/schemas/LegalDto'
        regionWorkspace:
          $ref: '#/components/schemas/RegionWorkspaceDto'
        billing:
          $ref: '#/components/schemas/BillingDto'
        invites:
          $ref: '#/components/schemas/InvitesDto'
        personalInfo:
          $ref: '#/components/schemas/PersonalInfoDto'
        organizationStructure:
          description: >-
            Organization-wide department names and role labels (merged into
            setupData).
          allOf:
            - $ref: '#/components/schemas/OrganizationStructureSetupPatchDto'
        wizardStepCursor:
          type: number
          minimum: 0
          maximum: 15
          description: Optional UI cursor for resume across wizard steps.
        employmentOnboardingMode:
          type: string
          enum:
            - HR_FIRST
            - INVITE_FIRST
          description: >-
            HR_FIRST: create HR employee then optional invite. INVITE_FIRST:
            store HR draft then invite; HR row created when user accepts.
        ecosystemPath:
          type: string
          enum:
            - run_organization
            - raise_capital
            - deploy_capital
            - support_organizations
            - build_solutions
            - grow_partnership
        operationalPriorities:
          type: array
          items:
            type: string
        currentTools:
          type: array
          items:
            type: string
        readinessScore:
          type: object
          properties:
            score:
              type: number
            missingRequirements:
              type: array
              items:
                type: string
          required:
            - score
        partnershipApplication:
          type: object
        developerProfile:
          type: object
        profileSetup:
          type: object
        productIntent:
          $ref: '#/components/schemas/ProductIntentDto'
        activatedProducts:
          type: array
          enum:
            - fluide-pay
            - fluide-admin
            - fluide-capital-admin
            - fluide-developer
          description: >-
            Hub product tiles enabled for this org. Overrides ecosystem path
            defaults when set.
          items:
            type: string
            enum:
              - fluide-pay
              - fluide-admin
              - fluide-capital-admin
              - fluide-developer
        checkoutWorkflow:
          $ref: '#/components/schemas/CheckoutWorkflowDto'
    ApiResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Whether the request succeeded
        message:
          type: string
          example: Operation completed successfully
          description: Human-readable outcome message (localized when i18n is configured)
        data:
          type: object
          description: Response payload when success is true
      required:
        - success
        - message
    ApiErrorResponseDto:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
          example: Validation failed
          description: Human-readable error message (localized when i18n is configured)
        code:
          type: string
          example: VALIDATION_FAILED
          description: Stable machine-readable error code for client handling and support
        errors:
          type: object
          description: Field-level validation errors keyed by property name
          example:
            from:
              - from must be a valid date
        statusCode:
          type: number
          example: 400
        timestamp:
          type: string
          example: '2026-06-03T12:00:00.000Z'
      required:
        - success
        - message
        - code
        - statusCode
        - timestamp
    PartnerOnboardingDto:
      type: object
      properties:
        subtype:
          type: string
          enum:
            - SERVICE_PARTNER
            - VIRTUAL_MANAGER
            - COMPLIANCE_EXPERT
        legal:
          $ref: '#/components/schemas/PartnerLegalDto'
        logoUrl:
          type: string
          maxLength: 2048
        currentCountry:
          type: string
        worksAcrossRegions:
          type: boolean
        certifications:
          maxItems: 20
          type: array
          items:
            $ref: '#/components/schemas/CertificationDto'
        shortBio:
          type: string
          maxLength: 1000
        kycDocuments:
          maxItems: 20
          type: array
          items:
            $ref: '#/components/schemas/KycDocumentDto'
        kycSubmitted:
          type: boolean
    EsoOnboardingDto:
      type: object
      properties:
        subtype:
          type: string
          enum:
            - INNOVATION_HUB
            - VENTURE_STUDIO
            - INCUBATOR
            - ACCELERATOR
        sectorsOfFocus:
          maxItems: 40
          description: Sectors of focus tags
          type: array
          items:
            type: string
        geographicFocus:
          maxItems: 50
          description: ISO 3166-1 alpha-2 country codes
          type: array
          items:
            type: string
        programModel:
          type: string
          maxLength: 64
        cohortCapacity:
          type: number
          minimum: 1
          maximum: 10000
        websiteUrl:
          type: string
          maxLength: 2048
        logoUrl:
          type: string
          maxLength: 2048
        initialCohort:
          $ref: '#/components/schemas/EsoInitialCohortDto'
    CapitalAllocatorOnboardingDto:
      type: object
      properties:
        subtype:
          type: string
          enum:
            - VC
            - ANGEL
            - LENDER
            - MFI
            - BANK
            - FAMILY_OFFICE
            - IMPACT_FUND
        firmType:
          type: string
          maxLength: 160
        aumRange:
          type: string
          maxLength: 64
        ticketSizeMin:
          type: number
          minimum: 0
        ticketSizeMax:
          type: number
          minimum: 0
        ticketSizeCurrency:
          type: string
          minLength: 3
          maxLength: 3
        instrumentTypes:
          type: array
          enum:
            - EQUITY
            - DEBT
            - SAFE
            - CONVERTIBLE
            - GRANT
            - REVENUE_BASED
          maxItems: 8
          items:
            type: string
            enum:
              - EQUITY
              - DEBT
              - SAFE
              - CONVERTIBLE
              - GRANT
              - REVENUE_BASED
        sectorThesis:
          maxItems: 40
          type: array
          items:
            type: string
        geographyFocus:
          maxItems: 50
          type: array
          items:
            type: string
        regulatoryLicenses:
          maxItems: 20
          type: array
          items:
            $ref: '#/components/schemas/CapitalAllocatorRegulatoryLicenseDto'
        websiteUrl:
          type: string
          maxLength: 2048
        logoUrl:
          type: string
          maxLength: 2048
        kybSubmitted:
          type: boolean
          description: >-
            True once the wizard has dispatched the KYB submission to the review
            queue.
        initialPortfolio:
          $ref: '#/components/schemas/CapitalAllocatorInitialPortfolioDto'
    FirmVerificationDto:
      type: object
      properties:
        operatingName:
          type: string
          maxLength: 256
        website:
          type: string
          maxLength: 512
        yearsInOperation:
          type: number
          minimum: 0
          maximum: 200
    BusinessRegistrationDto:
      type: object
      properties:
        stepCompleted:
          type: boolean
          description: User finished the business registration onboarding step.
        deferredDocumentUpload:
          type: boolean
          description: User will upload KYB documents from the dashboard instead of now.
    PartnerComplianceDto:
      type: object
      properties:
        workspaceRecords:
          type: boolean
        clientDataProtection:
          type: boolean
        noMisuseSensitiveData:
          type: boolean
    LegalDto:
      type: object
      properties:
        businessRegistered:
          type: boolean
        employeesInsured:
          type: boolean
        hasBusinessBankAccount:
          type: boolean
        crossBorderOperations:
          type: boolean
        skipped:
          type: boolean
          description: User chose “skip for now” on legal & compliance step.
    RegionWorkspaceDto:
      type: object
      properties:
        initialBranchName:
          type: string
          minLength: 1
          example: Douala Central Hub
        macroRegion:
          type: string
          enum:
            - CEMAC
            - ECOWAS
            - EAST_AFRICA
    BillingDto:
      type: object
      properties:
        selectedPlan:
          type: string
          minLength: 1
          description: >-
            Plan slug stored on organization.plan (e.g. flex, starter, business,
            growth, enterprise).
          example: business
        skipped:
          type: boolean
          description: User chose “skip for later” on billing step.
        referralPartnerOrganizationId:
          type: string
          format: uuid
          description: >-
            Referring partner organization id (stored on organization.metadata
            for commission accrual).
        partnerProgramSlug:
          type: string
          minLength: 1
          description: Partner program slug (default referral_partner).
          example: referral_partner
    InvitesDto:
      type: object
      properties:
        completed:
          type: boolean
        skipped:
          type: boolean
    PersonalInfoDto:
      type: object
      properties:
        firstName:
          type: string
          minLength: 1
          maxLength: 120
        lastName:
          type: string
          minLength: 1
          maxLength: 120
        name:
          type: string
          minLength: 1
          maxLength: 240
        jobTitle:
          type: string
          minLength: 1
          maxLength: 120
        phoneNumber:
          type: string
          maxLength: 40
        image:
          type: string
          description: HTTPS URL or `fluide-file:<uuid>` — persisted to `user.image`.
          maxLength: 2048
    OrganizationStructureSetupPatchDto:
      type: object
      properties:
        departments:
          type: array
          items:
            $ref: '#/components/schemas/OrganizationDepartmentSetupPatchDto'
        roles:
          example:
            - CEO
            - HR Manager
          type: array
          items:
            type: string
    ProductIntentDto:
      type: object
      properties:
        primary:
          type: string
          enum:
            - fluide-pay
            - fluide-admin
            - fluide-capital-admin
            - fluide-developer
        selectedAt:
          type: string
    CheckoutWorkflowDto:
      type: object
      properties:
        vertical:
          type: string
          minLength: 1
          maxLength: 64
          example: school
        templateId:
          type: string
          minLength: 1
          maxLength: 64
          example: school_tuition
        displayName:
          type: string
          maxLength: 120
        fields:
          maxItems: 40
          type: array
          items:
            $ref: '#/components/schemas/CheckoutWorkflowFieldDto'
        defaultMethods:
          type: array
          enum:
            - card
            - mobile_money
            - bank_transfer
          maxItems: 4
          items:
            type: string
            enum:
              - card
              - mobile_money
              - bank_transfer
        branding:
          $ref: '#/components/schemas/CheckoutWorkflowBrandingDto'
    PartnerLegalDto:
      type: object
      properties:
        isGovernmentRegistered:
          type: boolean
        registrationCountry:
          type: string
        registrationNumber:
          type: string
          maxLength: 64
        taxNumber:
          type: string
          maxLength: 64
        legalAddress:
          type: string
          maxLength: 256
        registeredAt:
          type: string
    CertificationDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 128
        issuer:
          type: string
          maxLength: 128
        issuedAt:
          type: string
        expiresAt:
          type: string
        referenceNumber:
          type: string
          maxLength: 128
        documentUrl:
          type: string
          maxLength: 2048
        documentFileId:
          type: string
          format: uuid
    KycDocumentDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 128
        url:
          type: string
          minLength: 1
          maxLength: 2048
        fileId:
          type: string
          format: uuid
        issuedAt:
          type: string
        expiresAt:
          type: string
        issuer:
          type: string
          maxLength: 128
    EsoInitialCohortDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 120
        programYear:
          type: string
          maxLength: 32
          example: '2026'
        visibility:
          type: string
          enum:
            - public
            - private
    CapitalAllocatorRegulatoryLicenseDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 160
        issuer:
          type: string
          maxLength: 160
        referenceNumber:
          type: string
          maxLength: 128
        issuedAt:
          type: string
        expiresAt:
          type: string
        documentUrl:
          type: string
          maxLength: 2048
        documentFileId:
          type: string
          format: uuid
        jurisdiction:
          type: string
    CapitalAllocatorInitialPortfolioDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 120
        thesis:
          type: string
          maxLength: 2000
        defaultInstrumentType:
          type: string
          enum:
            - EQUITY
            - DEBT
            - SAFE
            - CONVERTIBLE
            - GRANT
            - REVENUE_BASED
        visibility:
          type: string
          enum:
            - public
            - private
    OrganizationDepartmentSetupPatchDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          example: Finance
        sections:
          example:
            - Payroll
          type: array
          items:
            type: string
        subSections:
          type: array
          items:
            type: string
    CheckoutWorkflowFieldDto:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 64
        label:
          type: string
          minLength: 1
          maxLength: 120
        type:
          type: string
          enum:
            - text
            - select
            - number
            - date
            - email
            - phone
        required:
          type: boolean
        options:
          maxItems: 50
          type: array
          items:
            type: string
        placeholder:
          type: string
          maxLength: 200
    CheckoutWorkflowBrandingDto:
      type: object
      properties:
        displayName:
          type: string
          maxLength: 120
        primaryColor:
          type: string
          maxLength: 32
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Access token JWT. Use as Authorization: Bearer <token>. In the API
        playground, paste the JWT only.
    fluideApiKey:
      type: apiKey
      in: header
      name: X-Fluide-Api-Key
      description: >-
        Developer API key (fl_dev_...). Required on every API call with a
        machine access token.
      x-default: fl_dev_your_key
    fluideClientId:
      type: apiKey
      in: header
      name: X-Fluide-Client-Id
      description: >-
        First-party client audience. Must match the fluide_client_id claim on
        the JWT. Use fluide-developer for Connect.
      x-default: fluide-developer

````