Post a manual journal entry
Create a manual journal entry in the 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. For an entry in a foreign currency, set transaction_currency and give every line its transaction_amount_atoms alongside the functional amount_atoms; the entry must balance in both, and a zero transaction amount is a functional-only line (a revaluation mark or realized-FX plug). The stored rate is the ratio of the two amounts. X-Idempotency-Key is required: repeating a key within an hour never posts a second entry.
Query Parameters
- Type: stringentity
External id of the entity to act for, from
GET /v1/entities. Required when signed in with OAuth (an organization can hold several entities; ask the user which one if more than one could apply). Optional with an API key, which is scoped to one entity already.
Headers
- Type: stringX
- Idempotency - Key max length:128requiredRequired. Any value unique to this entry, at most 128 characters. Repeating it within an hour is refused, never duplicated.
Body·
A balanced journal entry to post to the key's entity.
- Type: stringcurrencyrequired
ISO 4217 code of the entry's functional currency; must equal the entity's functional currency.
- Type: stringFormat: dateentry
_date requiredDate for the journal entry
- Type: array of JournalEntryLineCreateParams 2…10000linesrequiredProperties: 7
Journal entry lines (minimum 2, maximum 10000)
- Type: booleanis
_adjusting Mark as adjusting entry
- Type: stringje
_number min length:1max length:64nullableYour own reference. Omit and act assigns the entity's next
JE-Nnumber. - Type: stringmanual
_entry _reason max length:1000nullableOptional reason for manual entry
- Type: stringmemomax length:1000nullable
Optional memo/description
- Type: stringnullabletransaction
_currency ISO 4217 code of the currency the transaction happened in. Defaults to
currency. When it differs, every line carriestransaction_amount_atomsand the entry must balance in both currencies.
Responses
- application/json
- 400
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, a currency that doesn't match the entity's functional currency, a foreign entry with a line missingtransaction_amount_atoms, or a functional entry with a line carrying one. - 401
The credential was refused: none sent (CAPI11), an API key that is not valid (CAPI15), or an OAuth sign-in that has expired (CAPI16), was not issued for this API (CAPI17), names an organization T0 does not hold (CAPI18) or a membership that is no longer usable (CAPI19).
detailsays what to do. - 403
The key lacks the customer_api:post_journal_entries permission, or the signed-in user cannot create journal entries in this entity (CAPI71). Mint or rotate a key with it - a key's permissions cannot be edited. The signed-in user has never opened the T0 app, so has no act user to author the entry (CAPI75).
- 409
X-Idempotency-Keywas 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
curl https://api.t0.ai/v1/journal-entries \
--request POST \
--header 'X-Idempotency-Key: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"entry_date": "2026-11-30",
"transaction_currency": "",
"manual_entry_reason": "",
"is_adjusting": false,
"je_number": "a",
"lines": [
{
"gl_account_id": "",
"line_type": "debit",
"amount_atoms": 1,
"transaction_amount_atoms": 0,
"memo": "",
"counterparty_type": "customer",
"counterparty_external_id": ""
},
{
"gl_account_id": "",
"line_type": "debit",
"amount_atoms": 1,
"transaction_amount_atoms": 0,
"memo": "",
"counterparty_type": "customer",
"counterparty_external_id": ""
}
],
"memo": "",
"currency": ""
}'
{
"id": "string",
"object": "journal_entry",
"created_at": "2026-11-30T21:43:49.677Z",
"updated_at": "2026-11-30T21:43:49.677Z",
"je_number": "string",
"entry_date": "2026-11-30",
"memo": "string",
"source": "string",
"currency": "string",
"transaction_currency": "string",
"atoms_per_unit": 1,
"transaction_atoms_per_unit": 1,
"total_debit_atoms": 1,
"total_credit_atoms": 1,
"total_transaction_debit_atoms": 1,
"total_transaction_credit_atoms": 1,
"status": "string",
"is_adjusting": false,
"counterparty_name": "string",
"lines": [
{
"id": "string",
"object": "journal_entry_line",
"created_at": "2026-11-30T21:43:49.677Z",
"updated_at": "2026-11-30T21:43:49.677Z",
"journal_entry_id": "string",
"account_id": "string",
"account_number": "string",
"account_name": "string",
"account_type": "bank",
"line_type": "debit",
"amount_atoms": 1,
"transaction_amount_atoms": 1,
"memo": "string",
"counterparty_type": "customer",
"counterparty_external_id": "string",
"counterparty_name": "string"
}
]
}