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

# Create customer

> Creates an individual (KYC) or a business (KYB), or imports either from a share token. The body decides which: send `userType: "BUSINESS"` with a `company` block for a business, a `shareToken` to import, and neither for an individual.

The whole payload is validated before anything is created. If any single field is wrong the request fails with 400 and nothing is written.



## OpenAPI

````yaml api-reference/endl-onboarding-api.json POST /api/v0/customer
openapi: 3.1.0
info:
  title: Endl Partner Onboarding API
  version: '0'
  description: >-
    Onboard end customers for identity verification — individuals (KYC) and
    businesses (KYB) — through one uniform REST surface.


    Authentication is API-key only: every request carries a single `API-KEY`
    header. Unlike the Partner API, responses are **flat** — a successful body
    is the data object itself, with no `{ data, code, message, status }`
    envelope.
servers:
  - url: https://qa-api.endl.xyz
    description: QA
security:
  - apiKey: []
tags:
  - name: Customers
    description: Create, read, update and delete onboarding customers.
  - name: Documents
    description: Upload identity, company and beneficial-owner documents.
paths:
  /api/v0/customer:
    post:
      tags:
        - Customers
      summary: Create customer
      description: >-
        Creates an individual (KYC) or a business (KYB), or imports either from
        a share token. The body decides which: send `userType: "BUSINESS"` with
        a `company` block for a business, a `shareToken` to import, and neither
        for an individual.


        The whole payload is validated before anything is created. If any single
        field is wrong the request fails with 400 and nothing is written.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CreateIndividual'
                - $ref: '#/components/schemas/CreateBusiness'
                - $ref: '#/components/schemas/ImportCustomer'
            example:
              email: jane.doe@example.com
              firstName: Jane
              lastName: Doe
              phone: '+971500000000'
              dateOfBirth: 01-01-1990
              country: ARE
              nationality: ARE
              gender: F
              externalReferenceId: partner-ref-001
              questionnaire:
                sections:
                  profileDetails:
                    items:
                      occupation:
                        value: 15-1132
                      annualSalary:
                        value: 50000_100000
                      accountPurpose:
                        value: payroll
                      expectedMonthlyVolume:
                        value: 0_10000
                  birthNationalityTaxI:
                    items:
                      countryOfBirth:
                        value: ARE
                      cityOfBirth:
                        value: Dubai
                      nationalities:
                        values:
                          - ARE
                      taxRegistrationsOuts:
                        value: 'no'
              customFields:
                nationalIdNumber: 784-1990-1234567-1
                whatsappNumber: '+971500000000'
                telegramId: '@janedoe'
      responses:
        '201':
          description: Customer created or imported.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CreatedIndividual'
                  - $ref: '#/components/schemas/CreatedBusiness'
              example:
                userId: 6c4ba9af-978a-45ff-953f-729c593f14af
                userType: INDIVIDUAL
                status: INITIATED
                sumsubApplicantId: 6a99986facbfab05e54c5719
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '415':
          description: Unsupported media type — use `application/json`.
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    CreateIndividual:
      type: object
      required:
        - email
        - firstName
        - lastName
        - dateOfBirth
        - country
        - questionnaire
        - customFields
      properties:
        email:
          type: string
          format: email
          description: Unique across the partner's customers.
        firstName:
          type: string
          maxLength: 100
        lastName:
          type: string
          maxLength: 100
        dateOfBirth:
          type: string
          description: >-
            `DD-MM-YYYY`. Must be a real past date, and the customer must be at
            least 18.
        country:
          type: string
          description: ISO 3166-1 alpha-3, e.g. `ARE`.
        phone:
          type: string
          maxLength: 50
        nationality:
          type: string
          description: ISO alpha-3. Defaults to `country`.
        gender:
          type: string
          enum:
            - M
            - F
        tin:
          type: string
        taxResidenceCountry:
          type: string
          description: ISO alpha-3.
        placeOfBirth:
          type: string
        addressLine1:
          type: string
        addressLine2:
          type: string
        city:
          type: string
        state:
          type: string
        postalCode:
          type: string
        externalReferenceId:
          type: string
          description: Your own reference. Echoed back, not stored.
        questionnaire:
          $ref: '#/components/schemas/Questionnaire'
        customFields:
          type: object
          required:
            - nationalIdNumber
            - whatsappNumber
          properties:
            nationalIdNumber:
              type: string
            whatsappNumber:
              type: string
              description: Include the country code.
            telegramId:
              type: string
    CreateBusiness:
      type: object
      required:
        - userType
        - company
        - beneficiaries
        - questionnaire
      properties:
        userType:
          type: string
          enum:
            - BUSINESS
        company:
          type: object
          required:
            - companyName
            - registrationNumber
            - country
            - email
          properties:
            companyName:
              type: string
            registrationNumber:
              type: string
            country:
              type: string
              description: ISO alpha-3.
            email:
              type: string
              format: email
            type:
              type: string
            website:
              type: string
            taxId:
              type: string
            incorporatedOn:
              type: string
              description: '`YYYY-MM-DD`.'
            phone:
              type: string
            address:
              $ref: '#/components/schemas/Address'
        beneficiaries:
          type: array
          minItems: 1
          description: One entry per owner or director. At least one is required.
          items:
            type: object
            required:
              - firstName
              - lastName
              - email
              - country
            properties:
              firstName:
                type: string
              lastName:
                type: string
              email:
                type: string
                format: email
              country:
                type: string
                description: ISO alpha-3.
              dob:
                type: string
                description: '`DD-MM-YYYY`.'
              shareSize:
                type: number
                minimum: 0
                maximum: 100
                description: The sum across beneficiaries must not exceed 100.
              types:
                type: array
                items:
                  type: string
                description: e.g. `["ubo"]`, `["director"]`. Defaults to `["ubo"]`.
              address:
                $ref: '#/components/schemas/Address'
        questionnaire:
          $ref: '#/components/schemas/Questionnaire'
    ImportCustomer:
      type: object
      required:
        - shareToken
        - email
      properties:
        shareToken:
          type: string
          description: >-
            A single-use `_act-…` share token. Identity comes from the token;
            other identity fields are ignored and reported in `warnings`.
        email:
          type: string
          format: email
        userType:
          type: string
          enum:
            - INDIVIDUAL
            - BUSINESS
        companyName:
          type: string
          description: Required when `userType` is `BUSINESS`.
        country:
          type: string
          description: ISO alpha-3. Validated if present.
    CreatedIndividual:
      type: object
      properties:
        userId:
          type: string
          format: uuid
        userType:
          type: string
          example: INDIVIDUAL
        status:
          type: string
          example: INITIATED
        sumsubApplicantId:
          type: string
        warnings:
          type: array
          items:
            type: string
          description: >-
            Present on an import: fields that were ignored because identity came
            from the share token.
    CreatedBusiness:
      type: object
      properties:
        userId:
          type: string
          format: uuid
        userType:
          type: string
          example: BUSINESS
        status:
          type: string
          example: INITIATED
        companyApplicantId:
          type: string
        beneficiaries:
          type: array
          items:
            type: object
            properties:
              applicantId:
                type: string
                description: The owner's `uboRef`, used for that owner's document uploads.
              email:
                type: string
              shareSize:
                type: number
              status:
                type: string
    Questionnaire:
      type: object
      description: >-
        Sections of items. A single-select item uses `{ "value": "..." }`; a
        multi-select uses `{ "values": [ ... ] }`. Every accepted code is listed
        on the questionnaire reference page.
      properties:
        sections:
          type: object
          additionalProperties: true
    Address:
      type: object
      properties:
        street:
          type: string
        town:
          type: string
        state:
          type: string
        postCode:
          type: string
        country:
          type: string
          description: ISO 3166-1 alpha-3.
    ErrorList:
      type: object
      description: >-
        Several problems at once. Returned by validation failures; nothing is
        created or changed.
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    Error:
      type: object
      description: >-
        A single problem. `code` is the HTTP status, `message` the specific
        reason, and `name` the operation that failed.
      properties:
        code:
          type: string
        message:
          type: string
        name:
          type: string
  responses:
    BadRequest:
      description: >-
        Validation failed. Nothing is written. One problem returns a flat
        object; several return an `errors` array.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorList'
          example:
            errors:
              - code: '400'
                message: firstName is required
                name: PartnerOnboardingCreate failed to process
              - code: '400'
                message: country must be an ISO 3166-1 alpha-3 code (e.g. ARE)
                name: PartnerOnboardingCreate failed to process
    Unauthorized:
      description: Missing or invalid `API-KEY`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: '401'
            message: Authentication Failed!
            name: PartnerOnboarding failed to process
    Forbidden:
      description: >-
        The key lacks the `onboarding` permission, the customer belongs to
        another partner, or onboarding is not permitted for that country.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: '403'
            message: Onboarding is not permitted for this country
            name: PartnerOnboardingCreate failed to process
    RateLimited:
      description: >-
        The per-partner rate limit was exceeded. This response keeps the older
        envelope shape and carries `X-RateLimit-Limit` and
        `X-RateLimit-Remaining`.
      content:
        application/json:
          example:
            data: null
            code: 429
            message: Rate limit exceeded, please retry later
            status: Error
            errors:
              - code: '429'
                message: Rate limit exceeded, please retry later
                field: Rate limit exceeded, please retry later
    Unavailable:
      description: >-
        A downstream service timed out. Retryable — on a create it is safe to
        retry the same body, as Endl reconciles rather than duplicating.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorList'
          example:
            errors:
              - code: '503'
                message: Service temporarily unavailable, please try again
                name: Downstream service error
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: API-KEY
      description: Your partner API key. The key must carry the `onboarding` permission.

````