# Modern Treasury API

> Modern Treasury API on Apizie: 186 endpoints (list account_collection_flows, get account_collection_flow, update account_collection_flow, list bulk_requests, …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://apizie.tech/v1/finance:modern-treasury/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `finance:modern-treasury`
- Category: Finance
- Status: byok
- Source: https://moderntreasury.com
- Page: https://apizie.tech/api/finance/modern-treasury
- OpenAPI: https://apizie.tech/api/finance/modern-treasury/openapi.json

The Modern Treasury REST API. Please see https://docs.moderntreasury.com for more details.

## Endpoints

### list account_collection_flows
`GET https://apizie.tech/v1/finance:modern-treasury/list-account-collection-flows` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| client_token | string | no |  |
| counterparty_id | string | no |  |
| external_account_id | string | no |  |
| per_page | integer | no |  |
| status | string | no |  |

### get account_collection_flow
`GET https://apizie.tech/v1/finance:modern-treasury/get-account-collection-flow` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |

### update account_collection_flow
`POST https://apizie.tech/v1/finance:modern-treasury/update-account-collection-flow` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### list bulk_requests
`GET https://apizie.tech/v1/finance:modern-treasury/list-bulk-requests` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| action_type | string | no | One of create, or update. |
| after_cursor | string | no |  |
| per_page | integer | no |  |
| resource_type | string | no | One of payment_order, expected_payment, or ledger_transaction. |
| status | string | no | One of pending, processing, or completed. |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create bulk_request
`POST https://apizie.tech/v1/finance:modern-treasury/create-bulk-request` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get bulk_request
`GET https://apizie.tech/v1/finance:modern-treasury/get-bulk-request` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### list bulk_results
`GET https://apizie.tech/v1/finance:modern-treasury/list-bulk-results` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| entity_id | string | no | Unique identifier for the result entity object. |
| entity_type | string | no | The type of the request that created this result. bulk_request is the only supported `request_type` |
| per_page | integer | no |  |
| request_id | string | no | Unique identifier for the request that created this bulk result. This is the ID of the bulk request when `request_type` is bulk_request |
| request_type | string | no | The type of the request that created this result. bulk_request is the only supported `request_type` |
| status | string | no | One of successful or failed. |

### get bulk_result
`GET https://apizie.tech/v1/finance:modern-treasury/get-bulk-result` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### list cases
`GET https://apizie.tech/v1/finance:modern-treasury/list-cases` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| per_page | integer | no |  |
| status | string | no | The status of the case. |
| subject_id | string | no | The ID of the object the case is about. |
| subject_type | string | no | The type of the object the case is about. |

### get case
`GET https://apizie.tech/v1/finance:modern-treasury/get-case` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### list connection_legal_entities
`GET https://apizie.tech/v1/finance:modern-treasury/list-connection-legal-entities` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| connection_id | string | no |  |
| legal_entity_id | string | no |  |
| per_page | integer | no |  |
| status | string | no |  |

### create connection_legal_entity
`POST https://apizie.tech/v1/finance:modern-treasury/create-connection-legal-entity` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get connection_legal_entity
`GET https://apizie.tech/v1/finance:modern-treasury/get-connection-legal-entity` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The id of an existing connection legal entity. |
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |

### update connection_legal_entity
`POST https://apizie.tech/v1/finance:modern-treasury/update-connection-legal-entity` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The id of an existing connection legal entity. |
| body | object | no | JSON request body |

### list connections
`GET https://apizie.tech/v1/finance:modern-treasury/list-connections` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| entity | string | no | A string code representing the vendor (i.e. bank). |
| per_page | integer | no |  |
| vendor_customer_id | string | no | An identifier assigned by the vendor to your organization. |

### list counterparties
`GET https://apizie.tech/v1/finance:modern-treasury/list-counterparties` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| created_at_lower_bound | string | no | Used to return counterparties created after some datetime. |
| created_at_upper_bound | string | no | Used to return counterparties created before some datetime. |
| email | string | no | Performs a partial string match of the email field. This is also case insensitive. |
| external_id | string | no | An optional user-defined 180 character unique identifier. |
| legal_entity_id | string | no | Filters for counterparties with the given legal entity ID. |
| name | string | no | Performs a partial string match of the name field. This is also case insensitive. |
| per_page | integer | no |  |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create counterparty
`POST https://apizie.tech/v1/finance:modern-treasury/create-counterparty` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### show counterparty
`GET https://apizie.tech/v1/finance:modern-treasury/get-counterparty` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The id of an existing counterparty. |

### update counterparty
`POST https://apizie.tech/v1/finance:modern-treasury/update-counterparty` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The id of an existing counterparty. |
| body | object | no | JSON request body |

### delete counterparty
`POST https://apizie.tech/v1/finance:modern-treasury/delete-counterparty` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The id of an existing counterparty. |

### collect account details
`POST https://apizie.tech/v1/finance:modern-treasury/collect-account-details` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| id | string | yes | counterparty id |
| body | object | no | JSON request body |

### list documents
`GET https://apizie.tech/v1/finance:modern-treasury/list-documents` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| documentable_id | string | no | The unique identifier for the associated object. |
| documentable_type | string | no | The type of the associated object. Currently can be one of `connection`, `counterparty`, `expected_payment`, `identification`,… |
| per_page | integer | no |  |

### create document
`POST https://apizie.tech/v1/finance:modern-treasury/create-document` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | Form fields as a JSON object |

### get document
`GET https://apizie.tech/v1/finance:modern-treasury/get-document` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ID of the document. |

### download document
`GET https://apizie.tech/v1/finance:modern-treasury/download-document` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ID of the document. |

### list embeddable_flows
`GET https://apizie.tech/v1/finance:modern-treasury/list-embeddable-flows` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| per_page | integer | no |  |
| status | string | no |  |
| template | string | no |  |

### create embeddable_flow
`POST https://apizie.tech/v1/finance:modern-treasury/create-embeddable-flow` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | yes | JSON request body |

### get embeddable_flow
`GET https://apizie.tech/v1/finance:modern-treasury/get-embeddable-flow` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |

### update embeddable_flow
`POST https://apizie.tech/v1/finance:modern-treasury/update-embeddable-flow` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | yes | JSON request body |

### list events
`GET https://apizie.tech/v1/finance:modern-treasury/list-events` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| entity_id | string | no |  |
| event_name | string | no |  |
| event_time_end | string | no | An inclusive upper bound for when the event occurred |
| event_time_start | string | no | An inclusive lower bound for when the event occurred |
| per_page | integer | no |  |
| resource | string | no |  |

### get event
`GET https://apizie.tech/v1/finance:modern-treasury/get-event` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | event id |

### list expected_payments
`GET https://apizie.tech/v1/finance:modern-treasury/list-expected-payments` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| counterparty_id | string | no | Specify counterparty_id to see expected_payments for a specific account. |
| created_at_lower_bound | string | no | Used to return expected payments created after some datetime |
| created_at_upper_bound | string | no | Used to return expected payments created before some datetime |
| direction | string | no | One of credit, debit |
| external_id | string | no |  |
| internal_account_id | string | no | Specify internal_account_id to see expected_payments for a specific account. |
| per_page | integer | no |  |
| status | string | no | One of unreconciled, reconciled, or archived. |
| type | string | no | One of: ach, au_becs, bacs, book, check, eft, rtp, sepa, wire |
| updated_at_lower_bound | string | no | Used to return expected payments updated after some datetime |
| updated_at_upper_bound | string | no | Used to return expected payments updated before some datetime |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create expected payment
`POST https://apizie.tech/v1/finance:modern-treasury/create-expected-payment` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get expected payment
`GET https://apizie.tech/v1/finance:modern-treasury/get-expected-payment` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### update expected payment
`POST https://apizie.tech/v1/finance:modern-treasury/update-expected-payment` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| body | object | no | JSON request body |

### delete expected payment
`POST https://apizie.tech/v1/finance:modern-treasury/delete-expected-payment` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### list external accounts
`GET https://apizie.tech/v1/finance:modern-treasury/list-external-accounts` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| counterparty_id | string | no |  |
| external_id | string | no | An optional user-defined 180 character unique identifier. |
| party_name | string | no | Searches the ExternalAccount's party_name AND the Counterparty's party_name |
| per_page | integer | no |  |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create external account
`POST https://apizie.tech/v1/finance:modern-treasury/create-external-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### show external account
`GET https://apizie.tech/v1/finance:modern-treasury/get-external-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | external account id |

### update external account
`POST https://apizie.tech/v1/finance:modern-treasury/update-external-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | external account id |
| body | object | no | JSON request body |

### delete external account
`POST https://apizie.tech/v1/finance:modern-treasury/delete-external-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | external account id |

### complete verification of external account
`POST https://apizie.tech/v1/finance:modern-treasury/complete-verification-external-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| id | string | yes | external account id |
| body | object | no | JSON request body |

### verify external account
`POST https://apizie.tech/v1/finance:modern-treasury/verify-external-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| id | string | yes | external account id |
| body | object | no | JSON request body |

### list foreign_exchange_quotes
`GET https://apizie.tech/v1/finance:modern-treasury/list-quotes` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| base_currency | string | no | Currency to convert, often called the "sell" currency. |
| effective_at_end | string | no | An inclusive upper bound for searching effective_at |
| effective_at_start | string | no | An inclusive lower bound for searching effective_at |
| expires_at | string | no | The timestamp until which the quote must be booked by. |
| internal_account_id | string | no | The ID for the `InternalAccount` this quote is associated with. |
| per_page | integer | no |  |
| target_currency | string | no | Currency to convert the `base_currency` to, often called the "buy" currency. |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create foreign_exchange_quote
`POST https://apizie.tech/v1/finance:modern-treasury/create-quote` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get foreign_exchange_quote
`GET https://apizie.tech/v1/finance:modern-treasury/get-quote` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### list holds
`GET https://apizie.tech/v1/finance:modern-treasury/list-holds` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| per_page | integer | no |  |
| status | string | no | Only return holds for a specific status. |
| target_id | string | no | Only return holds for a specific target ID. |
| target_type | string | no | Only return holds for a specific target type. |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create hold
`POST https://apizie.tech/v1/finance:modern-treasury/create-hold` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### show hold
`GET https://apizie.tech/v1/finance:modern-treasury/show-hold` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | hold id |

### update hold
`POST https://apizie.tech/v1/finance:modern-treasury/update-hold` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | hold id |
| body | object | no | JSON request body |

### create identification
`POST https://apizie.tech/v1/finance:modern-treasury/create-identification` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get identification
`GET https://apizie.tech/v1/finance:modern-treasury/get-identification` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The id of an existing identification. |

### update identification
`POST https://apizie.tech/v1/finance:modern-treasury/update-identification` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The id of an existing identification. |
| body | object | no | JSON request body |

### list incoming payment_details
`GET https://apizie.tech/v1/finance:modern-treasury/list-incoming-payment-details` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| as_of_date_end | string | no | Filters incoming payment details with an as_of_date starting on or before the specified date (YYYY-MM-DD). |
| as_of_date_start | string | no | Filters incoming payment details with an as_of_date starting on or after the specified date (YYYY-MM-DD). |
| direction | string | no | One of `credit` or `debit`. |
| per_page | integer | no |  |
| status | string | no | The current status of the incoming payment order. One of `pending`, `completed`, `returned`, `failed`, or `held`. |
| subtype | string | no | An additional layer of classification for the type of incoming payment detail. For example, a `type` of `stablecoin` may have a `subtype`… |
| type | string | no | One of: `ach`, `book`, `check`, `eft`, `rtp`, `sepa`, or `wire`. |
| virtual_account_id | string | no | If the incoming payment detail is in a virtual account, the ID of the Virtual Account. |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### get incoming payment detail
`GET https://apizie.tech/v1/finance:modern-treasury/get-incoming-payment-detail` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The unique identifier of the incoming payment detail. |

### update incoming payment detail
`POST https://apizie.tech/v1/finance:modern-treasury/update-incoming-payment-detail` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The unique identifier of the incoming payment detail. |
| body | object | no | JSON request body |

### list internal accounts
`GET https://apizie.tech/v1/finance:modern-treasury/list-internal-accounts` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| counterparty_id | string | no | Only return internal accounts associated with this counterparty. |
| currency | string | no | Only return internal accounts with this currency. |
| external_id | string | no | An optional user-defined 180 character unique identifier. |
| legal_entity_id | string | no | Only return internal accounts associated with this legal entity. |
| payment_direction | string | no | Only return internal accounts that can originate payments with this direction. |
| payment_type | string | no | Only return internal accounts that can make this type of payment. |
| per_page | integer | no |  |
| status | string | no | Only return internal accounts with this status. |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create internal account
`POST https://apizie.tech/v1/finance:modern-treasury/create-internal-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get internal account
`GET https://apizie.tech/v1/finance:modern-treasury/get-internal-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Unique identifier for the account. |

### update internal account
`POST https://apizie.tech/v1/finance:modern-treasury/update-internal-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Unique identifier for the account. |
| body | object | no | JSON request body |

### update account_capability
`POST https://apizie.tech/v1/finance:modern-treasury/update-account-capability` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Unique identifier for the account capability. |
| internal_account_id | string | yes | Unique identifier for the internal account. |
| body | object | no | JSON request body |

### list balance_reports
`GET https://apizie.tech/v1/finance:modern-treasury/list-balance-reports` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| internal_account_id | string | yes |  |
| after_cursor | string | no |  |
| as_of_date | string | no | The date of the balance report in local time. |
| balance_report_type | string | no | The specific type of balance report. One of `intraday`, `previous_day`, `real_time`, or `other`. |
| per_page | integer | no |  |

### create balance reports
`POST https://apizie.tech/v1/finance:modern-treasury/create-balance-report` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| internal_account_id | string | yes |  |
| body | object | no | JSON request body |

### get balance_report
`GET https://apizie.tech/v1/finance:modern-treasury/get-balance-report` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Either the unique identifier of the balance report or 'latest' for the latest balance report. |
| internal_account_id | string | yes |  |

### delete balance_report
`POST https://apizie.tech/v1/finance:modern-treasury/delete-balance-report` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Either the unique identifier of the balance report or 'latest' for the latest balance report. |
| internal_account_id | string | yes |  |

### list invoices
`GET https://apizie.tech/v1/finance:modern-treasury/list-invoices` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| counterparty_id | string | no |  |
| created_at_end | string | no | An inclusive upper bound for searching created_at |
| created_at_start | string | no | An inclusive lower bound for searching created_at |
| due_date_end | string | no | An inclusive upper bound for searching due_date |
| due_date_start | string | no | An inclusive lower bound for searching due_date |
| expected_payment_id | string | no |  |
| number | string | no | A unique record number assigned to each invoice that is issued. |
| originating_account_id | string | no |  |
| payment_order_id | string | no |  |
| per_page | integer | no |  |
| status | string | no |  |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create invoice
`POST https://apizie.tech/v1/finance:modern-treasury/create-invoice` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get invoice
`GET https://apizie.tech/v1/finance:modern-treasury/get-invoice` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### update invoice
`POST https://apizie.tech/v1/finance:modern-treasury/update-invoice` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| body | object | no | JSON request body |

### add payment_order_id to invoice
`POST https://apizie.tech/v1/finance:modern-treasury/add-payment-order-to-invoice` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| payment_order_id | string | yes | payment_order_id |

### list invoice_line_items
`GET https://apizie.tech/v1/finance:modern-treasury/list-invoice-line-items` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| invoice_id | string | yes | invoice_id |
| after_cursor | string | no |  |
| per_page | integer | no |  |

### create invoice_line_item
`POST https://apizie.tech/v1/finance:modern-treasury/create-invoice-line-item` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| invoice_id | string | yes | invoice_id |
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get invoice_line_item
`GET https://apizie.tech/v1/finance:modern-treasury/get-invoice-line-item` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| invoice_id | string | yes | invoice_id |

### update invoice_line_item
`POST https://apizie.tech/v1/finance:modern-treasury/update-invoice-line-item` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| invoice_id | string | yes | invoice_id |
| body | object | no | JSON request body |

### delete invoice_line_item
`POST https://apizie.tech/v1/finance:modern-treasury/delete-invoice-line-item` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| invoice_id | string | yes | invoice_id |

### list journal_entries
`GET https://apizie.tech/v1/finance:modern-treasury/list-journal-entries` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| journal_report_id | string | yes | The ID of the journal report |
| page | integer | no | Page number for pagination |
| per_page | integer | no | Number of items per page |

### show journal_entry
`GET https://apizie.tech/v1/finance:modern-treasury/get-journal-entry` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ID of the journal entry |

### list journal_reports
`GET https://apizie.tech/v1/finance:modern-treasury/list-journal-reports` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | no |  |

### show journal_report
`GET https://apizie.tech/v1/finance:modern-treasury/get-journal-report` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ID of the journal report |

### update journal_report
`POST https://apizie.tech/v1/finance:modern-treasury/update-journal-report` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ID of the journal report |
| body | object | no | JSON request body |

### list journal_sources
`GET https://apizie.tech/v1/finance:modern-treasury/list-journal-sources` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| journal_entry_id | string | no | The ID of the journal entry |
| journal_report_id | string | no | The ID of the journal report |
| page | integer | no | Page number for pagination |
| per_page | integer | no | Number of items per page |
| source_id | string | no | The ID of the source object |
| source_type | string | no | The type of the source object |

### show journal_source
`GET https://apizie.tech/v1/finance:modern-treasury/get-journal-source` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ID of the journal source |

### list ledger_account_balance_monitors
`GET https://apizie.tech/v1/finance:modern-treasury/list-ledger-account-balance-monitors` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| ledger_account_id | string | no | Query the balance monitors for a single ledger account. |
| per_page | integer | no |  |
| id[] | array | no | If you have specific IDs to retrieve in bulk, you can pass them as query parameters delimited with `id[]=`, for example… |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create ledger_account_balance_monitor
`POST https://apizie.tech/v1/finance:modern-treasury/create-ledger-account-balance-monitor` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get ledger_account_balance_monitor
`GET https://apizie.tech/v1/finance:modern-treasury/get-ledger-account-balance-monitor` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### update ledger_account_balance_monitor
`POST https://apizie.tech/v1/finance:modern-treasury/update-ledger-account-balance-monitor` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| body | object | no | JSON request body |

### delete ledger_account_balance_monitor
`POST https://apizie.tech/v1/finance:modern-treasury/delete-ledger-account-balance-monitor` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### list ledger_account_categories
`GET https://apizie.tech/v1/finance:modern-treasury/list-ledger-account-categories` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| balances | object | no | For example, if you want the balances as of a particular time (ISO8601), the encoded query string would be… |
| currency | string | no |  |
| external_id | string | no |  |
| ledger_account_id | string | no | Query categories which contain a ledger account directly or through child categories. |
| ledger_id | string | no |  |
| name | string | no |  |
| parent_ledger_account_category_id | string | no | Query categories that are nested underneath a parent category |
| per_page | integer | no |  |
| id[] | array | no | If you have specific IDs to retrieve in bulk, you can pass them as query parameters delimited with `id[]=`, for example… |
| name[] | array | no | If you have specific names to retrieve in bulk, you can pass them as query parameters delimited with `name[]=`, for example… |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create ledger_account_category
`POST https://apizie.tech/v1/finance:modern-treasury/create-ledger-account-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get ledger_account_category
`GET https://apizie.tech/v1/finance:modern-treasury/get-ledger-account-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| balances | object | no | For example, if you want the balances as of a particular time (ISO8601), the encoded query string would be… |

### update ledger_account_category
`POST https://apizie.tech/v1/finance:modern-treasury/update-ledger-account-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| body | object | no | JSON request body |

### delete ledger_account_category
`POST https://apizie.tech/v1/finance:modern-treasury/delete-ledger-account-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### add ledger_account_category to ledger_account_category
`POST https://apizie.tech/v1/finance:modern-treasury/add-ledger-account-category-to-ledger-account-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| sub_category_id | string | yes | sub_category_id |

### delete ledger_account_category from ledger_account_category
`POST https://apizie.tech/v1/finance:modern-treasury/delete-ledger-account-category-from-ledger-account-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| sub_category_id | string | yes | sub_category_id |

### add ledger_account to ledger_account_category
`POST https://apizie.tech/v1/finance:modern-treasury/add-ledger-account-to-ledger-account-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| ledger_account_id | string | yes | ledger_account_id |

### remove ledger_account from ledger_account_category
`POST https://apizie.tech/v1/finance:modern-treasury/remove-ledger-account-from-ledger-account-category` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| ledger_account_id | string | yes | ledger_account_id |

### list ledger_account_settlements
`GET https://apizie.tech/v1/finance:modern-treasury/list-ledger-account-settlements` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| created_at | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the created at timestamp. For example, for all times after Jan 1… |
| ledger_id | string | no |  |
| ledger_transaction_id | string | no |  |
| per_page | integer | no |  |
| settled_ledger_account_id | string | no |  |
| settlement_entry_direction | string | no |  |
| updated_at | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the updated at timestamp. For example, for all times after Jan 1… |
| id[] | array | no | If you have specific IDs to retrieve in bulk, you can pass them as query parameters delimited with `id[]=`, for example… |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create ledger_account_settlement
`POST https://apizie.tech/v1/finance:modern-treasury/create-ledger-account-settlement` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get ledger_account_settlement
`GET https://apizie.tech/v1/finance:modern-treasury/get-ledger-account-settlement` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### update ledger_account_settlement
`POST https://apizie.tech/v1/finance:modern-treasury/update-ledger-account-settlement` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| body | object | no | JSON request body |

### patch ledger_account_settlement_entries
`POST https://apizie.tech/v1/finance:modern-treasury/patch-ledger-account-settlement-entries` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| body | object | no | JSON request body |

### delete ledger_account_settlement_entries
`POST https://apizie.tech/v1/finance:modern-treasury/delete-ledger-account-settlement-entries` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| body | object | no | JSON request body |

### create ledger_account_statement
`POST https://apizie.tech/v1/finance:modern-treasury/create-ledger-account-statement` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get ledger_account_statement
`GET https://apizie.tech/v1/finance:modern-treasury/get-ledger-account-statement` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |

### list ledger_accounts
`GET https://apizie.tech/v1/finance:modern-treasury/list-ledger-accounts` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| available_balance_amount | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to filter by balance amount. |
| balances | object | no | Use `balances[effective_at_lower_bound]` and `balances[effective_at_upper_bound]` to get the balances change between the two timestamps.… |
| created_at | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the created at timestamp. For example, for all times after Jan 1… |
| currency | string | no |  |
| external_id | string | no |  |
| ledger_account_category_id | string | no |  |
| ledger_id | string | no |  |
| normal_balance | string | no |  |
| pending_balance_amount | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to filter by balance amount. |
| per_page | integer | no |  |
| posted_balance_amount | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), `eq` (=), or `not_eq` (!=) to filter by balance amount. |
| updated_at | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the updated at timestamp. For example, for all times after Jan 1… |
| id[] | array | no | If you have specific IDs to retrieve in bulk, you can pass them as query parameters delimited with `id[]=`, for example… |
| name[] | array | no | If you have specific names to retrieve in bulk, you can pass them as query parameters delimited with `name[]=`, for example… |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create ledger_account
`POST https://apizie.tech/v1/finance:modern-treasury/create-ledger-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get ledger_account
`GET https://apizie.tech/v1/finance:modern-treasury/get-ledger-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ledger account id (UUID) or external_id |
| balances | object | no | Use `balances[effective_at_lower_bound]` and `balances[effective_at_upper_bound]` to get the balances change between the two timestamps.… |

### update ledger_account
`POST https://apizie.tech/v1/finance:modern-treasury/update-ledger-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ledger account id (UUID) |
| body | object | no | JSON request body |

### delete ledger_account
`POST https://apizie.tech/v1/finance:modern-treasury/delete-ledger-account` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ledger account id (UUID) |

### list ledger_entries
`GET https://apizie.tech/v1/finance:modern-treasury/list-ledger-entries` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| amount | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by amount. |
| as_of_lock_version | integer | no | Shows all ledger entries that were present on a ledger account at a particular `lock_version`. You must also specify `ledger_account_id`. |
| direction | string | no | If true, response will include ledger entries that were deleted. When you update a ledger transaction to specify a new set of entries, the… |
| effective_at | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the transaction's effective time. Format ISO8601 |
| effective_date | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the transaction's effective date. Format YYYY-MM-DD |
| ledger_account_category_id | string | no | Get all ledger entries that match the direction specified. One of `credit`, `debit`. |
| ledger_account_id | string | no |  |
| ledger_account_lock_version | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the lock_version of a ledger account. For example, for all… |
| ledger_account_payout_id | string | no |  |
| ledger_account_settlement_id | string | no |  |
| ledger_account_statement_id | string | no | Get all ledger entries that are included in the ledger account statement. |
| ledger_transaction_id | string | no |  |
| order_by | object | no | Order by `created_at` or `effective_at` in `asc` or `desc` order. For example, to order by `effective_at asc`, use… |
| per_page | integer | no |  |
| show_balances | boolean | no | If true, response will include the balances attached to the ledger entry. If there is no balance available, null will be returned instead. |
| show_deleted | boolean | no | If true, response will include ledger entries that were deleted. When you update a ledger transaction to specify a new set of entries, the… |
| status | string | no | Get all ledger entries that match the status specified. One of `pending`, `posted`, or `archived`. For multiple statuses, use… |
| status[] | array | no | Get all ledger entries that match the status specified. One of `pending`, `posted`, or `archived`. For multiple statuses, use… |
| updated_at | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the posted at timestamp. For example, for all times after Jan 1… |
| id[] | array | no | If you have specific IDs to retrieve in bulk, you can pass them as query parameters delimited with `id[]=`, for example… |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### get ledger_entry
`GET https://apizie.tech/v1/finance:modern-treasury/get-ledger-entry` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| show_balances | boolean | no | If true, response will include the balances attached to the ledger entry. If there is no balance available, null will be returned instead. |

### update ledger_entry
`POST https://apizie.tech/v1/finance:modern-treasury/update-ledger-entry` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| body | object | no | JSON request body |

### list ledger_transaction_versions
`GET https://apizie.tech/v1/finance:modern-treasury/list-ledger-transaction-versions` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| created_at | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the created_at timestamp. For example, for all dates after Jan 1… |
| ledger_account_statement_id | string | no | Get all ledger transaction versions that are included in the ledger account statement. |
| ledger_transaction_id | string | no | Get all the ledger transaction versions corresponding to the ID of a ledger transaction. |
| per_page | integer | no |  |
| version | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the version. For example, for all versions after 2, use… |

### list ledger_transactions
`GET https://apizie.tech/v1/finance:modern-treasury/list-ledger-transactions` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| after_cursor | string | no |  |
| amount | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by amount. |
| effective_at | object | no | Use "gt" (>), "gte" (>=), "lt" (<), "lte" (<=), or "eq" (=) to filter by effective at. For example, for all transactions after Jan 1 2000,… |
| effective_date | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by effective date. For example, for all dates after Jan 1 2000, use… |
| external_id | string | no |  |
| ledger_account_category_id | string | no |  |
| ledger_account_id | string | no |  |
| ledger_account_settlement_id | string | no |  |
| ledger_id | string | no |  |
| ledgerable_id | string | no |  |
| ledgerable_type | string | no |  |
| order_by | object | no | Order by `created_at` or `effective_at` in `asc` or `desc` order. For example, to order by `effective_at asc`, use… |
| partially_posts_ledger_transaction_id | string | no |  |
| per_page | integer | no |  |
| posted_at | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the posted at timestamp. For example, for all times after Jan 1… |
| reverses_ledger_transaction_id | string | no |  |
| status | string | no |  |
| updated_at | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the posted at timestamp. For example, for all times after Jan 1… |
| id[] | array | no | If you have specific IDs to retrieve in bulk, you can pass them as query parameters delimited with `id[]=`, for example… |
| metadata | object | no | For example, if you want to query for records with metadata key `Type` and value `Loan`, the query would be `metadata%5BType%5D=Loan`.… |

### create ledger_transaction
`POST https://apizie.tech/v1/finance:modern-treasury/create-ledger-transaction` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| Idempotency-Key | string | no | This key should be something unique, preferably something like an UUID. |
| body | object | no | JSON request body |

### get ledger_transaction
`GET https://apizie.tech/v1/finance:modern-treasury/get-ledger-transaction` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ledger transaction id (UUID) or external_id. If using external_id, only non-archived Ledger Transactions will be returned. |

### update ledger_transaction
`POST https://apizie.tech/v1/finance:modern-treasury/update-ledger-transaction` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ledger transaction id (UUID) |
| body | object | no | JSON request body |

### create ledger_transaction partial post
`POST https://apizie.tech/v1/finance:modern-treasury/create-ledger-transaction-partial-post` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The ID of the ledger transaction to partially post. |
| body | object | no | JSON request body |

### create ledger_transaction reversal
`POST https://apizie.tech/v1/finance:modern-treasury/create-ledger-transaction-reversal` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | The id of ledger transaction to reverse. |
| body | object | no | JSON request body |

### list ledger_transaction versions
`GET https://apizie.tech/v1/finance:modern-treasury/list-ledger-transaction-versions-nested` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | id |
| after_cursor | string | no |  |
| created_at | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the created_at timestamp. For example, for all dates after Jan 1… |
| per_page | integer | no |  |
| version | object | no | Use `gt` (>), `gte` (>=), `lt` (<), `lte` (<=), or `eq` (=) to filter by the version. For example, for all versions after 2, use… |
| id[] | array | no | If you have specific IDs to retrieve in bulk, you can pass them as query parameters delimited with `id[]=`, for example… |

…and 66 more. See the OpenAPI spec.

## Example
```
curl "https://apizie.tech/v1/finance:modern-treasury/list-account-collection-flows" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the Modern Treasury API?
Create a free Apizie key, then send GET https://apizie.tech/v1/finance:modern-treasury/list-account-collection-flows with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Modern Treasury API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. Modern Treasury itself also needs your own key from moderntreasury.com.

### Can AI agents use the Modern Treasury API?
Yes. Add the Apizie MCP server (https://apizie.tech/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key finance:modern-treasury.

### What is the status of the Modern Treasury API?
Needs your own provider key (bring your own key)
