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

# Create



## OpenAPI

````yaml /openapi/fluide-auth.json post /api/v1/companies
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/companies:
    post:
      tags:
        - Company
      summary: Create
      operationId: CompanyController_create_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCompanyDto'
      responses:
        '201':
          description: Create — created
          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'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -sS -X POST "$FLUIDE_BASE_URL/api/v1/companies" \
              -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/companies`, {
              method: 'POST',
              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.post(
                f"{base_url}/api/v1/companies",
                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/companies"))
                .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")
                .POST(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/companies");

            curl_setopt_array($ch, [
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_CUSTOMREQUEST => 'POST',
                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:
    CreateCompanyDto:
      type: object
      properties:
        name:
          type: string
          description: Legal or display company name.
          example: Fluide SARL
        countryCode:
          type: string
          description: ISO 3166-1 alpha-2 country code.
          example: CM
        currency:
          type: string
          description: Primary company currency using ISO 4217 code.
          example: XAF
        registrationNumber:
          type: string
          minLength: 1
          description: Official company registration number.
          example: RC-123456
        taxId:
          type: string
          description: Tax identifier (e.g. NIU).
          example: NIU-7890
        address:
          type: string
          minLength: 1
          description: Registered business address.
          example: Bonanjo, Douala
        city:
          type: string
          description: Business city.
          example: Douala
        logo:
          type: string
          minLength: 1
          description: Public URL for company logo.
          example: https://cdn.fluide.com/company/logo.png
        industryCategory:
          type: string
          minLength: 1
          description: Industry category.
          example: Technology
        businessCreatedAt:
          type: string
          description: Business legal creation/incorporation date.
          example: '2021-04-12'
        businessSize:
          type: string
          minLength: 1
          description: Business size bucket.
          example: 11-50
        organizationStructure:
          description: Organization structure details.
          allOf:
            - $ref: '#/components/schemas/OrganizationStructureDto'
        paydays:
          description: Configured payday(s).
          allOf:
            - $ref: '#/components/schemas/PaydaysDto'
        bankConnection:
          description: Bank account details used for payroll funding.
          allOf:
            - $ref: '#/components/schemas/BankConnectionDto'
        mobileMoneyWallet:
          description: Mobile money wallet details.
          allOf:
            - $ref: '#/components/schemas/MobileMoneyWalletDto'
        signatures:
          description: Signature assets for approvals and generated documents.
          allOf:
            - $ref: '#/components/schemas/SignatureBlockDto'
        payrollSetup:
          description: Payroll setup details including groups, allowances and deductions.
          allOf:
            - $ref: '#/components/schemas/PayrollSetupDto'
        employeeNumberFormat:
          description: Employee number generation format.
          allOf:
            - $ref: '#/components/schemas/EmployeeNumberFormatDto'
        notificationSettings:
          description: Notification channel preferences.
          allOf:
            - $ref: '#/components/schemas/NotificationSettingsDto'
      required:
        - name
        - countryCode
        - currency
        - businessCreatedAt
        - businessSize
    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
    OrganizationStructureDto:
      type: object
      properties:
        departments:
          minItems: 1
          description: Department tree for the organization.
          type: array
          items:
            $ref: '#/components/schemas/OrganizationDepartmentDto'
        roles:
          minItems: 1
          description: Organization role names used in company setup.
          example:
            - CEO
            - HR Manager
            - Finance Officer
          type: array
          items:
            type: string
      required:
        - departments
        - roles
    PaydaysDto:
      type: object
      properties:
        frequency:
          type: string
          enum:
            - monthly
            - bi-weekly
            - weekly
          description: Payroll frequency used as default for company employees.
          example: monthly
        days:
          minItems: 1
          description: Payday(s) in month/week depending on frequency.
          example:
            - 25
          type: array
          items:
            type: number
            maximum: 31
            minimum: 1
      required:
        - frequency
        - days
    BankConnectionDto:
      type: object
      properties:
        bankName:
          type: string
          minLength: 1
          description: Bank name used for payroll source account.
          example: Afriland
        branch:
          type: string
          description: Branch name/code when method is manual.
          example: Douala Main
        accountNumber:
          type: string
          minLength: 4
          description: Bank account number used as payroll source account.
          example: '0011223344'
        connected:
          type: boolean
          description: Whether bank connection is currently verified/connected.
          example: true
      required:
        - bankName
        - accountNumber
    MobileMoneyWalletDto:
      type: object
      properties:
        provider:
          type: string
          minLength: 1
          description: Mobile money provider name.
          example: MTN MoMo
        walletNumber:
          type: string
          minLength: 6
          description: Wallet number used for payroll fallback payouts.
          example: '+237670000000'
        accountName:
          type: string
          description: Wallet account holder name.
          example: Fluide SARL
        connected:
          type: boolean
          description: Whether wallet is verified/connected.
          example: true
      required:
        - provider
        - walletNumber
    SignatureBlockDto:
      type: object
      properties:
        ceo:
          type: string
          minLength: 1
          description: CEO signature identifier or URL.
          example: https://cdn.fluide.com/signatures/ceo.png
        hr:
          type: string
          minLength: 1
          description: HR signature identifier or URL.
          example: https://cdn.fluide.com/signatures/hr.png
        financeOfficer:
          type: string
          minLength: 1
          description: Finance Officer signature identifier or URL.
          example: https://cdn.fluide.com/signatures/finance.png
      required:
        - ceo
        - hr
        - financeOfficer
    PayrollSetupDto:
      type: object
      properties:
        groups:
          minItems: 1
          description: Configured payroll groups.
          type: array
          items:
            $ref: '#/components/schemas/PayrollGroupDto'
        grossPayMode:
          type: string
          enum:
            - base-plus-allowances
            - custom
          description: How gross pay should be interpreted.
          example: base-plus-allowances
      required:
        - groups
    EmployeeNumberFormatDto:
      type: object
      properties:
        prefix:
          type: string
          minLength: 1
          description: Prefix for generated employee numbers.
          example: FLD
        pattern:
          type: string
          minLength: 1
          description: Format/pattern used for generated employee numbers.
          example: '{PREFIX}-{YYYY}-{SEQ4}'
        nextSequence:
          type: number
          minimum: 1
          description: Next sequence value to use.
          example: 1
      required:
        - prefix
        - pattern
    NotificationSettingsDto:
      type: object
      properties:
        email:
          type: boolean
          description: Enable email notifications.
          example: true
        sms:
          type: boolean
          description: Enable SMS notifications.
          example: true
        whatsapp:
          type: boolean
          description: Enable WhatsApp notifications.
          example: false
        push:
          type: boolean
          description: Enable push notifications.
          example: true
      required:
        - email
        - sms
        - whatsapp
        - push
    OrganizationDepartmentDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Department name.
          example: Engineering
        sections:
          description: Sections under this department.
          example:
            - Backend
            - Frontend
          type: array
          items:
            type: string
        subSections:
          description: Sub-sections under this department.
          example:
            - Platform
          type: array
          items:
            type: string
      required:
        - name
    PayrollGroupDto:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Payroll group name.
          example: Default Staff
        allowances:
          description: Allowance codes/names for this payroll group.
          example:
            - transport_allowance
            - housing_allowance
          type: array
          items:
            type: string
        deductions:
          description: >-
            Deduction codes/names (e.g. CRTV, CNPS, NHS, PAYE) for this payroll
            group.
          example:
            - CRTV
            - CNPS
            - NHS
            - PAYE
          type: array
          items:
            type: string
      required:
        - name
        - allowances
        - deductions
  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

````