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

# Create Account

<Warning>
  **This API MUST be implemented by the Partner.** Platform's backend will consume it by sending the user's data for account opening.
</Warning>

Our backend will consume this service by performing a `POST` request to:

`[Base-URL]/CreateAccount`.

This endpoint will only be used when the Partner has account creation configured as `Dynamic`.

**Expected behavior:**
This endpoint is invoked when our systems require the formal creation of an account associated with a user's personal data and documents. The partner must register the account and respond with a unique identifier for the new account (`AccountIdentifier`).


## OpenAPI

````yaml swagger-client-interfaces.json POST /client-interfaces/pmo/create-account
openapi: 3.0.0
info:
  title: ''
  version: 0.0.1
servers: []
security: []
paths:
  /client-interfaces/pmo/create-account:
    post:
      tags:
        - Partner Implemented APIs
      summary: Create account
      operationId: createAccountClientApi
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAccountRequest'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAccountResponse'
      security: []
components:
  schemas:
    CreateAccountRequest:
      properties:
        TransactionId:
          type: string
        PersonalData:
          $ref: '#/components/schemas/PersonalData'
        PersonalDocuments:
          items:
            $ref: '#/components/schemas/PersonalDocument'
          type: array
        Amount:
          type: number
          format: double
        Currency:
          type: string
          description: 3 chars
        ExchangeRate:
          type: number
          format: double
      required:
        - TransactionId
        - PersonalData
        - Amount
        - Currency
        - ExchangeRate
      type: object
      additionalProperties: false
    CreateAccountResponse:
      properties:
        AccountIdentifier:
          type: string
        DisplayName:
          type: string
          description: Max 10, Only these chars -> [-_a-zA-Z0-9]
        Success:
          type: boolean
        ResponseDescription:
          type: string
      required:
        - AccountIdentifier
        - Success
        - ResponseDescription
      type: object
      additionalProperties: false
    PersonalData:
      description: >-
        Personal information. At least one of `PhoneNumber` or `Email` must be
        provided.
      properties:
        PhoneNumber:
          type: string
          description: User phone number. Required when `Email` is not provided.
        Email:
          type: string
          description: User email address. Required when `PhoneNumber` is not provided.
        FirstName:
          type: string
        MiddleName:
          type: string
        LastName:
          type: string
        LastName2:
          type: string
        Gender:
          type: string
        BirthDate:
          type: string
          description: Date formatted string, e.g. YYYY-MM-DD
        Address:
          $ref: '#/components/schemas/Address'
      required:
        - FirstName
        - LastName
        - Gender
        - BirthDate
        - Address
      type: object
      additionalProperties: false
    PersonalDocument:
      properties:
        Number:
          type: string
        DocumentType:
          $ref: '#/components/schemas/DocumentType'
      required:
        - Number
        - DocumentType
      type: object
      additionalProperties: false
    Address:
      properties:
        Address1:
          type: string
        Address2:
          type: string
        ZipCode:
          type: string
        City:
          type: string
        CountryCode:
          type: string
          description: ISO 3166-2
          minLength: 2
          maxLength: 2
        StateCode:
          type: string
          description: ISO 3166-2
      required:
        - Address1
        - City
        - CountryCode
        - StateCode
      type: object
      additionalProperties: false
    DocumentType:
      type: string
      enum:
        - None
        - Passport
        - StateId
        - ResidentCard
        - DriverLicense
        - SocialSecurityNumber
        - INE_IFE
        - ConsularId
        - ITIN

````