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

# Create a child customer account

> Creates a child customer account in the context of the calling account as the parent. Optionally configures default workflows for the child customer and provisions an initial set of users who will be invited via the supplied email addresses.



## OpenAPI

````yaml /specs/fc-core-bundled_generated.yaml post /v2/customers
openapi: 3.0.3
info:
  title: Core V2 API
  version: 2.0.0
  description: >-
    This is the APIs for V2 Core. It allows you to do common operations, such as
    read audit entries or get workflow lists.
  contact:
    name: FrankieOne
    url: https://www.frankieone.com/
    email: help@frankieone.com
servers:
  - url: https://api.uat.frankie.one
    description: UAT Environment API Base URL
  - url: https://api.frankie.one
    description: Production API Base URL
security:
  - Api-Key: []
tags:
  - name: Audit
    description: Manage audit entries
  - name: Customers
    description: Manage customer accounts
  - name: Request
    description: Retrieve background request results
  - name: Reports
    description: Generate and manage reports
  - name: Workflow Definitions
    description: Create and update workflow definitions
  - name: Status
    description: All valid customers will get a successful response.
  - name: Workflows
    description: Manage Workflows and Workflow Definitions
  - name: Tags
    description: Query tags and tag mappings on objects
paths:
  /v2/customers:
    post:
      tags:
        - Customers
      summary: Create a child customer account
      description: >-
        Creates a child customer account in the context of the calling account
        as the parent. Optionally configures default workflows for the child
        customer and provisions an initial set of users who will be invited via
        the supplied email addresses.
      operationId: createCustomer
      parameters:
        - $ref: '#/components/parameters/Api-Key'
        - $ref: '#/components/parameters/X-Frankie-CustomerID'
        - $ref: '#/components/parameters/X-Frankie-Channel'
        - $ref: '#/components/parameters/X-Frankie-Username'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Create-Customer-Request'
      responses:
        '201':
          description: Child customer account successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Create-Customer-Result'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Invalid EntityId:
                  value:
                    errorCode: API-0400,
                    errorMsg: 'Multiple Errors: See Issues list'
                    details:
                      - issue: 'entityId in path must be of type uuid: "test"'
                        issueLocation: VALIDATE-entityId
                    requestId: 01HM5XJ7VASZ3EJMB1VQGTBFJ4
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Invalid authentication:
                  value:
                    errorCode: AUTH-0002,
                    errorMsg: Unauthorized
                    details:
                      - issue: Invalid Authentication provided. Access denied.
                        issueLocation: request
                    requestId: 00000000S6MNG7624K2TDXT1E3
                No Api-Key:
                  value:
                    errorCode: AUTH-0401
                    errorMsg: Unauthorized
                    details:
                      - issue: No api key provided. Access denied.
                        issueLocation: request
                    requestId: 00000001S6MNG7624K2TDXT1E3
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Service Unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - Api-Key: []
        - jwt:
            - kyc:api
components:
  parameters:
    Api-Key:
      name: api_key
      in: header
      schema:
        type: string
        example: 245c765b124a098d09ef8765....
      description: Your API key provided by FrankieOne
      required: true
    X-Frankie-CustomerID:
      name: X-Frankie-CustomerID
      in: header
      required: true
      schema:
        type: string
        example: 12345678-1234-1234-1234-123456789012
      description: Your Customer ID provided by FrankieOne
    X-Frankie-Channel:
      name: X-Frankie-Channel
      in: header
      required: false
      schema:
        type: string
      description: >-
        Open string that can be used to define the "channel" the request comes
        in from. It can potentially be used in routing and risk calculations
        upon request. Default values that can be used are:  api portal smartui
        Any alphanumeric string is supported though. Anything over 64 characters
        will be truncated.
    X-Frankie-Username:
      name: X-Frankie-Username
      in: header
      description: Username provided by API caller
      required: false
      schema:
        type: string
        example: fred.flintstone@frankieone.com
  schemas:
    Create-Customer-Request:
      type: object
      description: >-
        Request to create a child customer account in the context of the calling
        account as the parent.
      required:
        - customer
      properties:
        customer:
          $ref: '#/components/schemas/Customer'
        defaultWorkflows:
          type: array
          description: Workflows that will be configured for the child customer by default.
          items:
            $ref: '#/components/schemas/Default-Workflow'
        initialUsers:
          type: array
          description: >-
            Optional list of users to provision in the newly created child
            customer account. Each user will be invited via the supplied email
            address.
          items:
            $ref: '#/components/schemas/Initial-User'
        additionalConfigurations:
          type: object
          description: >-
            Optional map of additional configurations to apply to the child
            customer, keyed by namespace (e.g. `white_label_portal`). The number
            of entries is variable - callers may supply zero, one, or many
            namespaces. Each value is the raw configuration payload for that
            namespace and is stored as-is.
          additionalProperties:
            type: object
            additionalProperties: true
          example:
            white_label_portal:
              brandName: Acme
              primaryColor: '#FF6600'
        externalReferences:
          type: array
          description: >-
            Optional list of external references to associate with the child
            customer.
          items:
            $ref: '#/components/schemas/External-Reference-Information'
    Create-Customer-Result:
      type: object
      description: Response object for creating a child customer account.
      properties:
        requestId:
          $ref: '#/components/schemas/Request-ID'
        customer:
          $ref: '#/components/schemas/Customer'
        defaultWorkflows:
          type: array
          description: The workflows that have been configured for the child customer.
          items:
            $ref: '#/components/schemas/Default-Workflow'
        initialUsers:
          type: array
          description: >-
            The users that have been provisioned in the newly created child
            customer account.
          items:
            $ref: '#/components/schemas/Initial-User'
        additionalConfigurations:
          type: object
          description: >-
            The additional configurations that have been applied to the child
            customer, keyed by namespace (e.g. `white_label_portal`). The number
            of entries returned reflects what was supplied on create.
          additionalProperties:
            type: object
            additionalProperties: true
          example:
            white_label_portal:
              brandName: Acme
              primaryColor: '#FF6600'
        externalReferences:
          type: array
          description: >-
            The external references that have been associated with the child
            customer.
          items:
            $ref: '#/components/schemas/External-Reference-Information'
    Error:
      type: object
      x-examples:
        '400':
          requestId: 0123456789ABCDEFGHIJKLMNOP
          errorCode: API-0400
          errorMsg: Parsing credentials from "<invalid>" failed, because invalid.
          httpStatusCode: 400
        '401':
          requestId: 0123456789ABCDEFGHIJKLMNOP
          errorCode: API-0401
          errorMsg: Unauthenticated due to invalid credentials.
          httpStatusCode: 401
        '409':
          requestId: 0123456789ABCDEFGHIJKLMNOP
          errorCode: API-0409
          errorMsg: Conflict.
          httpStatusCode: 409
      allOf:
        - $ref: '#/components/schemas/Error-Base'
        - type: object
          properties:
            requestId:
              $ref: '#/components/schemas/Request-ID'
    Customer:
      type: object
      description: >-
        A child customer account in the context of the calling account as the
        parent.
      required:
        - name
      properties:
        customerChildId:
          $ref: '#/components/schemas/Customer-Child-ID'
        name:
          type: string
          description: The display name of the child customer account.
          example: Example Child Account
        createdAt:
          type: string
          format: date-time
          readOnly: true
          description: The date and time the child customer account was created.
        updatedAt:
          type: string
          format: date-time
          readOnly: true
          description: The date and time the child customer account was last updated.
    Default-Workflow:
      type: object
      description: >-
        A reference to a workflow that will be configured for the child customer
        by default.
      required:
        - workflowDefinitionId
        - workflowName
      properties:
        workflowDefinitionId:
          type: string
          description: >-
            Id reference of the workflow definition to associate with the child
            customer.
          example: customer-verification-workflow
        workflowName:
          type: string
          description: Name of the workflow.
        workflowDisplayName:
          type: string
          description: >-
            The display name for the workflow. This field is optional, when the
            value exists workflow name displayed in portal will be the value of
            this field.
        workflowDefinitionVersion:
          type: string
          description: Reference version id used in our workflow builder.
          example: '0'
        lifecyclePhase:
          $ref: '#/components/schemas/Workflow-LifecyclePhaseEnum'
        monitoringType:
          $ref: '#/components/schemas/Monitoring-Type'
    Initial-User:
      type: object
      description: >-
        A user to be provisioned in the newly created child customer account at
        the time of creation.
      required:
        - name
        - email
      properties:
        name:
          type: string
          description: The full name of the user.
          example: Jane Doe
        email:
          type: string
          format: email
          description: >-
            The user's email address. The user will receive an invitation to
            access the child customer account at this address.
          example: user@example.com
        roles:
          type: array
          description: >-
            An optional list of role IDs to assign to the user. If omitted, the
            account default role will be applied.
          items:
            type: integer
          example:
            - 1
    External-Reference-Information:
      type: object
      description: >-
        Used to store references and identifying information about an entity
        that is external to FrankieOne. If you wish to filter or search on
        customer information relevant to your business, that information should
        be added as an external reference.
      required:
        - name
        - value
      properties:
        name:
          type: string
          description: The name of the external reference.
          example: CUSTOMER-REFERENCE
        value:
          type: string
          description: The value of the external reference.
          example: CUST-00001342
        description:
          type: string
          description: >-
            A summary of what this external reference is and what it is used
            for.
          example: This is the customer ID in the core banking system.
        type:
          type: string
          enum:
            - SYSTEM
            - CUSTOMER
            - ACCOUNT
            - OTHER
          default: CUSTOMER
          description: The type of external reference.
        metadata:
          type: object
          description: >-
            Key-value pairs for storing additional metadata about the external
            reference.
          additionalProperties:
            type: string
    Request-ID:
      type: string
      example: 01HN9XHZN6MGXM9JXG50K59Q85
      description: The unique request identifier for the API call made.
    Error-Base:
      type: object
      properties:
        errorCode:
          type: string
        errorMsg:
          type: string
        details:
          type: array
          items:
            $ref: '#/components/schemas/Issue'
    Customer-Child-ID:
      type: string
      description: >-
        All child customers are assigned an auto-generated UUID to ensure global
        uniqueness, represented as customerChildId.
      example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
      readOnly: true
    Workflow-LifecyclePhaseEnum:
      type: string
      description: >
        Specifies the lifecycle phase of the customer in which this workflow is
        executed:
          - ONBOARDING: Workflow is in the onboarding stage.
          - MONITORING: Workflow is in the monitoring stage.
          - REFRESH: Workflow is in the refresh stage.
          - OTHER: Workflow is in another stage.
      enum:
        - ONBOARDING
        - MONITORING
        - REFRESH
        - OTHER
      default: OTHER
    Monitoring-Type:
      type: string
      description: >-
        The type of workflow subscription. This determines which types are
        subscribing to a workflow.
      allOf:
        - $ref: '#/components/schemas/Subscription-Type'
    Issue:
      type: object
      properties:
        issue:
          type: string
          description: Description of the issue.
        issueLocation:
          type: string
          description: The location or context where the issue was identified.
        issueType:
          type: string
          description: The type or category of the issue.
    Subscription-Type:
      type: string
      description: >-
        Specifies the type of service profile subscription. This value
        determines the category of the service profile subscription.
      enum:
        - AML
        - ACTIVITY
  securitySchemes:
    Api-Key:
      type: apiKey
      in: header
      name: api_key
      description: ''
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````