---
title: "Create a manual transaction"
method: POST
path: "/companies/{companyId}/transactions"
tags: ["Transactions"]
---

# Create a manual transaction

`POST /companies/{companyId}/transactions`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/transactions`
- Auth: HTTP bearer

## Request body

- CreateTransactionInput
  - `entityId` string, uuid, required
  - `occurredOn` string, date, required
  - `description` string, required
  - `merchant` string
  - `amountCents` integer, required
  - `currency` string, required
  - `direction` 'in' | 'out', required
  - `categoryGlAccountId` string, uuid
  - `bankAccountId` string, uuid
  - `notes` string
  - `confirmDuplicate` boolean: Record this row even though an identical manual transaction was created in the last 60 s (the 409 TRANSACTION_DUPLICATE_MANUAL_CREATE case). The new row's metadata.manual_duplicate_confirmed_of names the earlier row.

## Response `201`

Transaction created

- TransactionResponse
  - `success` boolean
  - `data` Transaction
    - `journalEntryUnavailableReason` 'scope_mismatch' | 'ambiguous_posting': Detail responses only. Present when `journalEntry` is null although an entry is linked.
    - `matchedDocumentUnavailableReason` 'scope_mismatch': Detail responses only. Present when `matchedDocument` is null although a document is matched.
    - `id` string, uuid
    - `companyId` string, uuid
    - `entityId` string, uuid
    - `occurredOn` string, date
    - `description` string
    - `merchant` string, nullable
    - `amountCents` integer
    - `currency` string
    - `direction` 'in' | 'out'
    - `status` 'needs_review' | 'categorized'
    - `categoryGlAccountId` string, uuid, nullable
    - `classId` string, uuid, nullable
    - `className` string, nullable
    - `hasReceipt` boolean
    - `bankAccountId` string, uuid, nullable
    - `merchantName` string, nullable
    - `notes` string, nullable
    - `isSplit` boolean
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `409`: Request conflicts with the durable onboarding state
- `422`: Request failed validation

---

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