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
- Type: stringX
- Idempotency - Key max length:128nullableRequired. Any value unique to this entry, at most 128 characters. Repeating it within an hour is refused, never duplicated.
Body·
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.
- Type: stringcurrencyrequired
ISO 4217 currency code
- Type: stringFormat: dateentry
_date requiredDate for the journal entry
- Type: array of JournalEntryLineCreateParams 2…1000linesrequiredProperties: 6
Journal entry lines (minimum 2, maximum 1000)
- 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
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, or a currency that doesn't match the entity's functional currency. - 401
Missing or invalid bearer API key (CAPI11).
- 403
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.
- 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 '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"
]
}