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

# Create debit account

> This operation will create a debit account



## OpenAPI

````yaml account post /v4/DEBIT/customer/{customerId}
openapi: 3.0.3
info:
  description: Endpoint for doing various actions connected to a account
  version: '1'
  title: Account details API
  contact:
    name: Enfuce Financial Services
    url: https://enfuce.com
    email: info@enfuce.com
  x-logo:
    url: https://developer.enfuce.com/images/enfuce.svg
    altText: Enfuce logo
servers:
  - url: >-
      https://integration-api-cat2.{{environment}}.ext.{{realm}}.cia.enfuce.com/account
  - url: https://integration-api-cat2.live.ext.prod.cia.enfuce.com/account
    description: Live environment
security: []
tags:
  - name: Create an account
    description: <p>Endpoints for creating an account</p>
  - name: Update an account
    description: <p>Endpoints for updating an account</p>
  - name: Get account information
    description: Endpoints for fetching an account
paths:
  /v4/DEBIT/customer/{customerId}:
    post:
      tags:
        - Create an account
      summary: Create debit account
      description: This operation will create a debit account
      operationId: createDebitAccountV4UsingPOST
      parameters:
        - name: auditUser
          in: query
          description: The audit user to log the request
          required: true
          schema:
            type: string
        - name: customerId
          in: path
          description: The customer id of which customer you want to create the account on
          required: true
          schema:
            type: string
            format: biginteger
      requestBody:
        $ref: '#/components/requestBodies/createDebitResourceBody'
      responses:
        '201':
          description: Successful creation of the account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/resourceResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '404':
          description: Customer does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
      deprecated: false
components:
  requestBodies:
    createDebitResourceBody:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/createDebitResourceBody'
      description: >-
        The fields that you want to apply to your newly created account, these
        values will override the predefined template values
      required: true
  schemas:
    resourceResponse:
      type: object
      properties:
        description:
          type: string
          description: Short description of the result of the action
        id:
          type: string
          description: Will contain the ID of the resource that has been created or updated
      title: resourceResponse
    errorResponse:
      type: object
      properties:
        code:
          type: string
          description: An error code indicating what kind of error. I.e. HTTP error code
        message:
          type: string
          description: Error message in human-readable format
        id:
          type: string
          format: uuid
          description: Unique error identifier
        errorCode:
          type: string
          description: Enfuce code for a specific error type
        errorType:
          type: string
          description: Error type
          enum:
            - STATIC_VALIDATION_ERROR
            - DYNAMIC_VALIDATION_ERROR
            - INTEGRATION_ERROR
            - SECURITY_ERROR
            - UNEXPECTED_ERROR
        errorReason:
          type: string
          description: Free-form text explaining the error reason
        timestamp:
          type: string
          format: date-time
          description: Datetime when error occurred
    createDebitResourceBody:
      allOf:
        - $ref: '#/components/schemas/createBaseResourceBody'
        - properties:
            productCode:
              $ref: '#/components/schemas/productCodeInRequest'
              example: DEBIT_EUR_FI
      title: createDebitResourceBody
    createBaseResourceBody:
      type: object
      properties:
        address:
          $ref: '#/components/schemas/address'
          description: >-
            Address connected to an account that will override the address set
            on customer level. This is for example used when sending out
            statements
        additionalValues:
          $ref: '#/components/schemas/additionalValues'
        name:
          $ref: '#/components/schemas/name'
        number:
          $ref: '#/components/schemas/accountNumber'
        segment:
          $ref: '#/components/schemas/segment'
        paymentReference:
          $ref: '#/components/schemas/paymentReference'
      title: createBaseResourceBody
    productCodeInRequest:
      type: string
      description: >
        This field is used when the institution has multiple account products
        setup.

        The productCode is used to determine the specific account product.

        Use of this field as well as the values of the field, is dependent on
        institution setup and should be aligned with Enfuce prior to use.
      pattern: ^[A-Z][A-Z_0-9]{1,64}$
      example: CARD_EUR_FI
    address:
      type: object
      required:
        - address1
        - city
        - country
        - zipCode
      properties:
        address1:
          type: string
          minLength: 1
          maxLength: 255
          example: Kings street 12
        address2:
          type: string
          maxLength: 255
        address3:
          type: string
          maxLength: 255
        address4:
          type: string
          maxLength: 255
        city:
          type: string
          minLength: 1
          maxLength: 255
          example: Mariehamn
        country:
          $ref: '#/components/schemas/country'
        region:
          type: string
          maxLength: 32
          example: Åland Islands
        zipCode:
          type: string
          minLength: 1
          maxLength: 32
          example: 22100
      title: address
    additionalValues:
      type: array
      maxItems: 4
      description: >
        List of additional key-value pairs that can be associated with the
        account.

        Known keys:

        - BALC: Balance check configuration. Possible values: true (Shadow
        Balancing Disabled) or false (Shadow Balancing Enabled)
      items:
        $ref: '#/components/schemas/keyValuePair'
    name:
      type: string
      maxLength: 64
      description: Human readable name of an account
      example: My example account name
    accountNumber:
      type: string
      description: >-
        Unique account number for given account. Must be numeric if
        paymentRefence.type defined as MOD10 or FINNISH_7_3_1! Note that
        selected account numbers might be reserved by Enfuce for internal usage.
      maxLength: 64
      example: 123456789
    segment:
      type: string
      description: >-
        Field enables to group an entity into a segment. This field will be
        exported but no logic is applied to this in Enfuce API
      enum:
        - SEGMENT_A
        - SEGMENT_B
        - SEGMENT_C
        - SEGMENT_D
        - SEGMENT_E
        - SEGMENT_F
      title: segment
    paymentReference:
      type: object
      description: >-
        Number connected to account that will be used to map incoming payments
        to
      required:
        - type
      properties:
        number:
          type: string
          description: Payment reference number
          example: 1234567897
        type:
          type: string
          enum:
            - MOD10
            - FINNISH_7_3_1
            - CUSTOMER_SPECIFIC
    country:
      type: string
      description: >-
        A valid ISO 3166-1 alpha-3 country code, except for QZZ (UNMIK in
        Kosovo) and ROM for Romania.
      pattern: '[A-Z]{3}'
      example: FIN
    keyValuePair:
      type: object
      properties:
        key:
          type: string
          minLength: 1
          maxLength: 8
          pattern: ^[a-zA-Z0-9\-\_ ]*$
        value:
          type: string
          minLength: 1
          maxLength: 50
          pattern: >-
            ^[a-zA-Z0-9|\-_
            +.éàèùçâêîôûëïü'ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿĀāĂăĄąĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıĲĳĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňŉŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſǪǫȘșȚțȪȫȮȯȲȳḐḑṢṣẞỌọ]*$

````