Post a manual journal entry

​

Create a manual journal entry in the key's entity. Debits must equal credits, every line names a GL account by the external_id from /v1/gl-accounts, and accounts payable / receivable lines must carry a counterparty. X-Idempotency-Key is required: repeating a key within an hour never posts a second entry.

Headers

  • Required. Any value unique to this entry, at most 128 characters. Repeating it within an hour is refused, never duplicated.

Body·

required
application/json

The public request body: the internal fields, minus attachments.

A subclass of the same base the UI's JournalEntryCreateParams uses, so the two cannot drift - je_number normalisation, the currency validator, the line constraints all live in that base exactly once. attachments is not on the base: it names files uploaded through an internal route this API does not publish, so a caller could only ever send an id it has no way to obtain, or one belonging to somebody else.

  • ISO 4217 currency code

  • Date for the journal entry

  • Journal entry lines (minimum 2, maximum 1000)

    Properties: 6
  • Mark as adjusting entry

  • Your own reference. Omit and act assigns the entity's next JE-N number.

  • Optional reason for manual entry

  • Optional memo/description

Responses

  • application/json
  • Missing X-Idempotency-Key (CAPI34), or the entry is the caller's to fix (CAPI33) - unbalanced, an unknown/inactive/unpostable GL account, an invalid counterparty, a line's currency conflicting with its account's denomination or missing/invalid FX snapshot, an invalid line amount, mixed transaction currencies, or a currency that doesn't match the entity's functional currency.

  • Missing or invalid bearer API key (CAPI11).

  • The key lacks the customer_api:post_journal_entries permission (CAPI71). Mint or rotate a key with it - a key's permissions cannot be edited.

  • X-Idempotency-Key was already processed within the last hour, or was reused for a different request or endpoint (CAPI34). The entity has no applied First Month of Books, so nothing can post yet (CAPI67). Accounting data is being rebuilt (CAPI73) - retryable once it finishes.

  • application/json
Request Example for post/v1/journal-entries
curl https://api.t0.ai/v1/journal-entries \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "entry_date": "",
  "memo": "",
  "currency": "",
  "manual_entry_reason": "",
  "is_adjusting": false,
  "je_number": "",
  "lines": [
    {
      "gl_account_id": "",
      "line_type": "debit",
      "amount_atoms": 1,
      "memo": "",
      "counterparty_type": "customer",
      "counterparty_external_id": ""
    }
  ]
}'
{
  "id": "string",
  "object": "journal_entry",
  "created_at": "2026-09-30T23:31:57.102Z",
  "updated_at": "2026-09-30T23:31:57.102Z",
  "is_deleted": false,
  "je_number": "string",
  "entry_date": "2026-09-30",
  "memo": "string",
  "source": "string",
  "total_debit_atoms": 1,
  "total_credit_atoms": 1,
  "currency": "string",
  "lines": [
    {
      "id": "string",
      "object": "journal_entry_line",
      "created_at": "2026-09-30T23:31:57.102Z",
      "updated_at": "2026-09-30T23:31:57.102Z",
      "is_deleted": false,
      "journal_entry_id": "string",
      "account_id": "string",
      "account_number": "string",
      "account_name": "string",
      "account_type": "bank",
      "line_type": "string",
      "amount_atoms": 1,
      "memo": "string",
      "counterparty_type": "customer",
      "counterparty_external_id": "string",
      "counterparty_name": "string"
    }
  ],
  "status": "string",
  "manual_entry_reason": "string",
  "policy_key": "string",
  "tags": {
    "additionalProperty": "string"
  },
  "attachments": [
    {
      "url": "string",
      "filename": "string",
      "content_type": "string"
    }
  ],
  "is_adjusting": false,
  "entry_type_label": "string",
  "counterparty_name": "string",
  "source_description": "string",
  "source_t0_object": {
    "object_type": "agent_automation_run",
    "object_external_id": "string",
    "display_number": "string"
  },
  "original_journal_entry_id": "string",
  "original_journal_entry_date": "2026-09-30",
  "reversed_by_journal_entry_ids": [
    "string"
  ]
}