# Create Account Journey

The `createAccount` journey guides the end-customer through opening a new investment account: BankID identity verification, PEP/sanctions screening, KYC questionnaire, account type selection, and agreement signing.

Create the journey via [`POST /v2/partner/client/:clientId/journey`](/openapi/api/journey/postjourney) with `journeyType: "createAccount"`.

## Required fields

`accountTypes` controls which account types the customer can open (`isk`, `depot`, `insurance`). `accountServiceType` sets the investment service level (`portfolioManagement`, `investmentAdvise`, `executionOnly`).

## Optional configuration

### Account name

Provide `accountName` to fix the account name without showing it to the customer. If omitted, the customer enters one.

### Email

Provide `email` to prefill the customer's email address.

### Allocation plan

Set `allocationPlan` to configure a fund allocation during account creation. The customer confirms the allocation in the journey. Set to `null` to skip this step. `allocationPlan` and `savingsPlan` cannot both be set.

### Savings plan

Set `savingsPlan` to let the customer configure a recurring savings plan during account creation. Set to `null` to skip.

### Transfer

Set `transfer` to include a 3rd-party holdings transfer step — moving assets from another institution into the new account. See [Transfer Configuration](/guides/api-guide/create-account-transfers) for details and examples.

Set `welcomeScreen: "transfer"` to show a transfer-themed welcome screen. Only valid when `transfer` is also set.

## Schema

```json
{
  "$ref": "#/components/schemas/create_account",
  "components": {
    "schemas": {
      "optional_account_categories": {
        "$id": "/models/shared/optional_account_categories.yaml",
        "title": "Optional Account Categories",
        "description": "MiFID II investor classification. If the client permissions allows both pro and retail customers, this must be set.\nIt must never exceed the permissions on the client.\n\n- `pro` — Professional investor (MiFID II)\n- `retail` — Retail investor, protected by consumer protection regulations (MiFID II)\n",
        "type": "array",
        "items": {
          "type": "string",
          "description": "- `pro` — Professional investor (MiFID II)\n- `retail` — Retail investor, protected by consumer protection regulations (MiFID II)\n",
          "enum": [
            "pro",
            "retail"
          ]
        }
      },
      "deposit_type": {
        "$id": "/models/allocationplan/shared/deposit_type.yaml",
        "title": "DepositType",
        "description": "How to deposit cash to account",
        "oneOf": [
          {
            "description": "Autogiro",
            "type": "string",
            "enum": [
              "autogiro"
            ],
            "title": "autogiro"
          },
          {
            "description": "Direct transfer via bank",
            "type": "string",
            "enum": [
              "bank_transfer"
            ],
            "title": "bank_transfer"
          },
          {
            "description": "Swish payment",
            "type": "string",
            "enum": [
              "swish"
            ],
            "title": "swish"
          }
        ]
      },
      "periodicity": {
        "$id": "/models/allocationplan/shared/periodicity.yaml",
        "title": "Periodicity",
        "description": "When to allocate",
        "oneOf": [
          {
            "description": "Once per month allocation",
            "type": "string",
            "enum": [
              "monthly"
            ],
            "title": "monthly"
          },
          {
            "description": "Once per week allocation",
            "type": "string",
            "enum": [
              "weekly"
            ],
            "title": "weekly"
          },
          {
            "description": "allocate every bank day",
            "type": "string",
            "enum": [
              "daily"
            ],
            "title": "daily"
          },
          {
            "description": "direct",
            "type": "string",
            "enum": [
              "direct"
            ],
            "title": "direct"
          }
        ]
      },
      "instrument_allocation_item": {
        "$id": "/models/allocationplan/shared/instrument_allocation_item.yaml",
        "title": "InstrumentAllocationItem",
        "type": "object",
        "required": [
          "instrument",
          "allocation"
        ],
        "properties": {
          "instrument": {
            "description": "Instrument ID",
            "type": "string",
            "example": "SE0000810798SEK"
          },
          "allocation": {
            "type": "number",
            "example": 100,
            "description": "Allocation in percent for this instrument"
          }
        }
      },
      "uuid": {
        "$id": "/models/uuid.yaml",
        "title": "UUID",
        "type": "string",
        "example": "49ad7378-121c-4a53-9894-dfd14a7b4877",
        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
      },
      "transfer": {
        "title": "Transfer",
        "description": "Transfer configuration from 3rd party institution into newly created Fondo Account.\nIf defined, the transfer screen is shown.\nIf `null` the transfer view will not be shown.\n",
        "type": [
          "object",
          "null"
        ],
        "required": [
          "enforce",
          "transfers"
        ],
        "properties": {
          "enforce": {
            "type": "string",
            "enum": [
              "required",
              "optional"
            ],
            "description": "Controls whether the end user can skip the transfer step.\n`required` means the end user must complete the transfer step.\n`optional` means the end user may skip the transfer step.\n"
          },
          "transfers": {
            "description": "List of custodians and their accounts to transfer from.\nThe custodian is always readonly. Account numbers, when provided, are readonly.\n",
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "custodian",
                "accounts"
              ],
              "properties": {
                "custodian": {
                  "$ref": "#/components/schemas/uuid",
                  "description": "ID matching a custodian."
                },
                "accounts": {
                  "type": "array",
                  "description": "Accounts at this custodian. Each account is either known (accountNumber set)\nor unknown (accountNumber null, end user enters it).\n",
                  "minItems": 1,
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "accountNumber",
                      "required",
                      "defaultUnitsOutput",
                      "balanceOutput",
                      "closeAccountAndSavingsplans",
                      "sourceAccountType",
                      "untransferableUnitsOutput",
                      "allowInstrumentSelection"
                    ],
                    "if": {
                      "properties": {
                        "accountNumber": {
                          "type": "string"
                        }
                      }
                    },
                    "then": {
                      "properties": {
                        "sourceAccountType": {
                          "maxItems": 1
                        }
                      }
                    },
                    "properties": {
                      "accountNumber": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Account number at the custodian. Readonly when provided.\nIf `null`, the end user enters the account number.\nAt most one `null` account number is allowed per custodian across all transfer entries.\n",
                        "example": "1223456789"
                      },
                      "sourceAccountType": {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "enum": [
                            "isk",
                            "depot",
                            "insurance"
                          ]
                        },
                        "description": "Allowed source account types at the custodian.\nA single entry locks the type; multiple entries let the end user pick.\nEach entry must be one of the journey's `accountTypes`.\nLocked to one entry when `accountNumber` is provided.\n"
                      },
                      "closeAccountAndSavingsplans": {
                        "type": [
                          "boolean",
                          "null"
                        ],
                        "description": "Should the custodian close the account and corresponding savingsplans\nafter the transfer is complete?\nIf \"null\", the user must decide.\n"
                      },
                      "required": {
                        "type": "boolean",
                        "description": "If true, the end user must complete this transfer.\nIf false, the end user may deselect this transfer.\n"
                      },
                      "untransferableUnitsOutput": {
                        "description": "If units are selected as output of unit transfer - what to transfer as if the transfer fails.\nI.e. the instrument does not exist in universe or trading is stopped.\nIf a single entry, the behavior is locked.\nIf multiple entries, the end user picks.\n`cash` — sell and transfer as cash.\n`ignore` — leave them.\n",
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "enum": [
                            "cash",
                            "ignore"
                          ]
                        }
                      },
                      "defaultUnitsOutput": {
                        "type": "array",
                        "description": "What to do with instruments not listed in `instruments`.\nIf a single entry, the behavior is locked.\nIf multiple entries, the end user picks.\n`cash` — sell and transfer as cash.\n`units` — transfer as units.\n`ignore` — leave them.\n",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "enum": [
                            "cash",
                            "units",
                            "ignore"
                          ]
                        }
                      },
                      "balanceOutput": {
                        "type": "array",
                        "description": "What to do with the account's cash balance.\nIf a single entry, the behavior is locked.\nIf multiple entries, the end user picks.\n`cash` — transfer the cash balance.\n`ignore` — leave it.\n",
                        "minItems": 1,
                        "items": {
                          "type": "string",
                          "enum": [
                            "cash",
                            "ignore"
                          ]
                        }
                      },
                      "allowInstrumentSelection": {
                        "type": "boolean",
                        "description": "Should the end user be able to add specific instruments to transfer?\n"
                      },
                      "instruments": {
                        "type": "array",
                        "description": "Specific instruments to transfer from this account.\nIf omitted, all instruments are handled by `defaultUnitsOutput`.\n",
                        "items": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "id",
                            "unitType",
                            "outputType"
                          ],
                          "if": {
                            "properties": {
                              "unitType": {
                                "not": {
                                  "contains": {
                                    "const": "partial"
                                  }
                                }
                              }
                            }
                          },
                          "then": {
                            "properties": {
                              "units": {
                                "type": "null"
                              }
                            }
                          },
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Instrument ID (ISIN + currency).",
                              "example": "SE0000810798SEK"
                            },
                            "unitType": {
                              "type": "array",
                              "description": "If a single entry, the behavior is locked.\nIf multiple entries, the end user picks.\n`full` — all units of this instrument.\n`partial` — a specific number of units.\n",
                              "minItems": 1,
                              "items": {
                                "type": "string",
                                "enum": [
                                  "full",
                                  "partial"
                                ]
                              }
                            },
                            "outputType": {
                              "type": "array",
                              "description": "If a single entry, the behavior is locked.\nIf multiple entries, the end user picks.\n`cash` — sell and transfer as cash.\n`units` — transfer as units.\n",
                              "minItems": 1,
                              "items": {
                                "type": "string",
                                "enum": [
                                  "cash",
                                  "units"
                                ]
                              }
                            },
                            "units": {
                              "type": [
                                "number",
                                "null"
                              ],
                              "description": "Number of units to transfer.\nOnly applicable when `unitType` includes `partial`.\nIf omitted, the end user enters the amount.\n"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "create_account": {
        "$id": "/models/journey/createAccount/create_account.yaml",
        "title": "createAccount",
        "required": [
          "accountTypes",
          "accountServiceType",
          "journeyType"
        ],
        "additionalProperties": false,
        "not": {
          "allOf": [
            {
              "required": [
                "allocationPlan"
              ],
              "properties": {
                "allocationPlan": {
                  "type": "object"
                }
              }
            },
            {
              "required": [
                "savingsPlan"
              ],
              "properties": {
                "savingsPlan": {
                  "type": "object"
                }
              }
            }
          ]
        },
        "properties": {
          "journeyType": {
            "type": "string",
            "title": "createAccount",
            "enum": [
              "createAccount"
            ]
          },
          "welcomeScreen": {
            "description": "Optional custom welcome screen.\nCurrently only available when transfer is set.\n\n- `transfer` — only allowed in combination with populated transfer field\n",
            "type": "string",
            "enum": [
              "transfer"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "end user email address",
            "example": "enduser@endUserDomain.com"
          },
          "accountName": {
            "type": "string",
            "maxLength": 500,
            "description": "If not provided, the end-user will be asked to select accountName. If provided, the accountName will not be visible to the customer in this journey."
          },
          "accountTypes": {
            "type": "array",
            "description": "Allowed account types",
            "items": {
              "enum": [
                "isk",
                "depot",
                "insurance"
              ]
            }
          },
          "accountServiceType": {
            "description": "Account service type",
            "type": "string",
            "title": "accountServiceType",
            "enum": [
              "portfolioManagement",
              "investmentAdvise",
              "executionOnly"
            ]
          },
          "accountCategories": {
            "$ref": "#/components/schemas/optional_account_categories"
          },
          "allocationPlan": {
            "description": "Setup an allocation plan for the account. Deposits will allocate based on this plan.\nIf `null` the view will not be shown\n",
            "type": [
              "object",
              "null"
            ],
            "required": [
              "instruments"
            ],
            "properties": {
              "depositType": {
                "$ref": "#/components/schemas/deposit_type"
              },
              "periodicity": {
                "$ref": "#/components/schemas/periodicity"
              },
              "paymentAccount": {
                "type": "object",
                "description": "The details of the bank account to charge from (autogiro)",
                "properties": {
                  "iban": {
                    "type": "string",
                    "description": "IBAN (ISO 13616, International Bank Account Number)",
                    "example": "SE7280000810340009783242"
                  }
                }
              },
              "instruments": {
                "description": "Instrument allocations. The sum of all allocations must be exactly 100.",
                "type": "array",
                "example": [
                  {
                    "instrument": "SE0000810798SEK",
                    "allocation": 100
                  }
                ],
                "items": {
                  "$ref": "#/components/schemas/instrument_allocation_item"
                }
              }
            }
          },
          "savingsPlan": {
            "description": "Enable savings plan setup during account creation.\nUser will configure instruments and amounts in the UI.\nIf `null` the view will not be shown.\n",
            "type": [
              "object",
              "null"
            ],
            "required": [
              "periodicity"
            ],
            "properties": {
              "periodicity": {
                "type": "string",
                "enum": [
                  "monthly"
                ]
              },
              "instruments": {
                "description": "Instruments available for the savings plan.\nIf omitted, the end user may choose from all instruments in the client universe.\n",
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "instrument"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "instrument": {
                      "type": "string",
                      "description": "Instrument ID"
                    }
                  }
                }
              }
            }
          },
          "kycs": {
            "description": "Valid Know Your Customer answers used to prefill the options in the journey.",
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "required": [
                "qid",
                "answer"
              ],
              "properties": {
                "qid": {
                  "description": "Fondo ID of the question",
                  "example": "money_origin",
                  "type": "string"
                },
                "answer": {
                  "description": "Answer",
                  "example": "lön/pension",
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "array"
                    },
                    {
                      "type": "object"
                    }
                  ]
                }
              }
            }
          },
          "transfer": {
            "$ref": "#/components/schemas/transfer"
          }
        }
      }
    }
  }
}
```