Loki Docs
Tools › Transactions › Create an account

Create an account

create_accountAdds
What it does
Adds a new record and leaves what you had alone. Safe to retry: the same call twice changes nothing more.
Permission
Transactions, change transactions:write

What your assistant is told

Create a money account for the user. alias is its short handle ("ING", "LLC", "Cash") — unique for the user, used to refer to it everywhere; it can't look like an id or an IBAN. iban is optional: set it whenever the account will get bank statements, so they find it. With an iban and no alias, the alias defaults to the IBAN's last 4 digits. kind is "personal" (default) or "business" — use business for a company's or sole trader's money. currency is the account's 3-letter ISO booking currency; transactions written into it without one use it. institution is the bank's name, optional. Pass idempotencyKey (a UUID you mint) so a retry returns the same account. Returns the account with its id.

Parameters

  • currencytext, required3-letter ISO 4217 booking currency, e.g. "RON".
  • aliastext, optionalShort handle, e.g. "ING", "LLC". Max 80 characters. Optional when iban is given (defaults to its last 4 digits).
  • ibantext, optionalThe account's IBAN, any spacing. Optional.
  • kindtext, optional"personal" (default) or "business".
  • institutiontext, optionalOptional bank or provider name, e.g. "ING".
  • idempotencyKeyid, optionalA UUID you mint for this create; replaying it returns the same account.