---
title: "Create a deposit"
method: POST
path: "/v1/deposits"
tags: ["Deposits"]
---

# Create a deposit

`POST /v1/deposits`

## Request

- Base URL: `https://api.frihet.io`
- URL: `https://api.frihet.io/v1/deposits`
- Auth: API key in header `X-API-Key`

Record a new client deposit or prepayment.

## Request body

- DepositCreate
  - `clientId` string, required: ID of the client who made the deposit
  - `clientName` string, required: Client name (denormalized for display)
  - `amount` number, required: Deposit amount (must be positive)
  - `currency` string: Currency code (ISO 4217)
  - `description` string, required: Description of the deposit
  - `receivedDate` string, date, required: Date the deposit was received (YYYY-MM-DD)
  - `paymentMethod` string: Payment method used
  - `paymentReference` string: Payment reference or transaction ID

## Response `201`

Deposit created

- Deposit
  - `id` string: Unique identifier
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `clientId` string, required: ID of the client who made the deposit
  - `clientName` string, required: Client name (denormalized for display)
  - `amount` number, required: Deposit amount (must be positive)
  - `currency` string: Currency code (ISO 4217)
  - `description` string, required: Description of the deposit
  - `receivedDate` string, date, required: Date the deposit was received (YYYY-MM-DD)
  - `paymentMethod` string: Payment method used
  - `paymentReference` string: Payment reference or transaction ID
  - `status` 'active' | 'partially_applied' | 'fully_applied' | 'refunded'
  - `appliedAmount` number: Total amount already applied to invoices
  - `remainingBalance` number: Remaining balance available for application or refund
  - `refundedAmount` number: Total amount refunded to the client
  - `applications` object[]: List of invoice applications for this deposit
    - `invoiceId` string
    - `invoiceNumber` string
    - `amount` number
    - `appliedAt` string, date

## Other responses

- `400`: Bad request - invalid parameters or request body
- `401`: Authentication required or invalid API key
- `429`: Rate limit exceeded (100 requests per minute)
- `500`: Internal server error

---

[API](https://skmtc.dev/frihet/apis/frihet-api.md) · [All operations](https://skmtc.dev/frihet/apis/frihet-api/llms.txt) · [OpenAPI document](https://skmtc.dev/frihet/apis/frihet-api/revisions/3dd37f6a72d1?raw)
