---
title: "Create a journal entry"
method: POST
path: "/journal-entries"
tags: ["Journal Entries"]
---

# Create a journal entry

`POST /journal-entries`

## Request

- Base URL: `https://api.lumabill.ch/v1`
- URL: `https://api.lumabill.ch/v1/journal-entries`
- Auth: HTTP bearer

Debits and credits across all lines must balance (sum of debits = sum of credits). Mutations to entries in closed fiscal years are rejected.

## Request body

- JournalEntryWrite
  - `entryDate` string, date, required
  - `description` string
  - `fiscalYearId` string, uuid, nullable: Optional; must be the year covering entryDate
  - `documentUrl` string, nullable
  - `lines` JournalLineWrite[], required: Must balance in CHF: sum of debits = sum of credits (1 cent tolerance). A residual that only comes from converting FX lines is booked on the FX result account (400 FX_ROUNDING_RESIDUAL when the profile has none).
    - `chartAccountId` string, uuid, required: Chart-of-accounts UUID (see /chart-accounts)
    - `side` 'DEBIT' | 'CREDIT', required
    - `amount` number, double: CHF amount; omit when originalCurrency is given
    - `vatCode` string, nullable
    - `originalCurrency` 'CHF' | 'EUR' | 'USD' | 'GBP' | 'JPY' | 'CAD' | 'AUD' | 'SEK' | 'NOK' | 'DKK' | 'HUF': ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.
    - `originalAmount` number, double
    - `exchangeRate` number, double: CHF per 1 unit of originalCurrency

## Response `201`

Journal entry created

- object
  - `id` string, uuid
  - `createdAt` string, date-time
  - `message` string

## Other responses

- `400`: Validation error
- `401`: Invalid or missing API key
- `403`: Subscription required or read-only key on a write endpoint
- `429`: Rate limit exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/lumabill/apis/lumabill-api.md) · [All operations](https://skmtc.dev/lumabill/apis/lumabill-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lumabill/apis/lumabill-api/revisions/e48e7099b545?raw)
