---
title: "Create expense"
method: POST
path: "/expenses-api/expenses"
tags: ["Expenses (only available for accounting add-on users)"]
---

# Create expense

`POST /expenses-api/expenses`

Creates a new manual expense.

Validates the expense date against the lock period and rejects creation if the date is locked.

Required fields: name, expenseDate, categoryId, chargeableAmount, currency, paymentShareAmountType, revenueShareAmountType, shares, and shareOption. Either owners or listingIds must be provided (mutually exclusive).

Type (`owner_charge` or `pmc_expense`) is optional. If omitted, it is derived from the shares array: `PMC_EXPENSE` when PMC pays (or both `PMC` and `Owner` pay), `OWNER_CHARGE` when only `Owner` pays. If provided, it must match the calculated type from shares.

## Request body

- object
  - `type` 'owner_charge' | 'pmc_expense' — Expense type. If not provided, will be automatically calculated from shares array. If provided, must match the calculated type from shares.
  - `name` string, required
  - `expenseDate` string, required — Date of the expense in ISO 8601 format (YYYY-MM-DD)
  - `categoryId` string, required
  - `description` string
  - `chargeableAmount` number, required
  - `currency` string, required
  - `paymentShareAmountType` 'fixed' | 'percent', required
  - `revenueShareAmountType` 'fixed' | 'percent', required
  - `taxCategoryCode` 'vat' | 'gst' — Legacy; prefer taxCategoryId when specifying tax category.
  - `taxCategoryId` string
  - `taxName` string
  - `taxDescription` string
  - `taxAmountType` 'percent'
  - `taxAmount` number — Tax amount as a decimal between 0 and 1 (e.g., 0.2 for 20%)
  - `taxPayeeTypes` string[] — Business entity types that pay the tax (e.g., ["OWNER"], ["OWNER", "PMC"])
  - `isPmcAsVendor` boolean
  - `vendorId` string
  - `reservationId` string
  - `externalRefId` string — A unique identifier that serves as a reference to an external object. This ID can be used to link the current resource to a related entity in another system
  - `owners` object[] — Required when `listingIds` property is not in use. Can only be provided when OWNER has a payment share in the shares array.
    - `ownerId` string, required
    - `listingId` string
  - `listingIds` string[] — Required when `owners` property is not in use. Each item must be a valid MongoDB ObjectId.
  - `shares` object[], required
    - `type` 'revenue' | 'payment', required
    - `businessEntityType` 'OWNER' | 'GUEST' | 'PMC' | 'VENDOR' | 'CHANNEL' | 'GOV', required
    - `share` number, required — Share value for percentage between 0 and 1. For fixed any value
  - `shareOption` 'pmc_pays_to_vendor' | 'owner_pays_to_vendor' | 'pmc_and_owner_pay_to_vendor' | 'owner_pays_to_pmc_and_vendor' | 'owner_pays_to_pmc', required
  - `attachments` object[] — Array of expense attachments
    - `url` string, uri, required — URL to CDN where attachment is stored. Max length is 2048 characters
    - `urlThumbnail` string, uri, required — URL to CDN where attachment thumbnail is stored. Max length is 2048 characters
    - `extension` string, required — Attachment file extension. Max length is 10 characters
    - `fileName` string, required — Attachment file name. Max length is 255 characters

## Response `201`

Created expense(s) wrapped in a data array

- object
  - `data` object[], required — Array of expense details
    - `attachments` object[] — Array of expense attachments
      - `url` string, required
      - `urlThumbnail` string
      - `publicId` string
      - `originalExtension` string, required
      - `originalFilename` string, required
      - `bytes` number
      - `id` number
    - `id` string, required
    - `customerAccountId` string, required
    - `currentVersionId` number
    - `createdBy` string
    - `type` string, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `vendorId` string
    - `currency` string, required
    - `listingId` string
    - `ownerId` string
    - `taskId` string
    - `reservationId` string
    - `expenseRuleId` string
    - `originType` string, required
    - `name` string, required
    - `categoryId` string, required
    - `description` string
    - `expenseRuleShare` object[]
    - `taxCategoryCode` string
    - `taxName` string
    - `taxDescription` string
    - `taxPayeeTypes` string[]
    - `externalRefId` string
    - `currentVersion` object
      - `amount` number, required
      - `expenseDate` string, date-time, required
      - `status` string, required
      - `taxAmount` number

## Other responses

- `400` — Invalid input data - validation errors in request body
- `401` — Authentication required - invalid or missing token
- `403` — You do not have sufficient permissions to access this resource
- `500` — Unhandled exception. Something went wrong on server

---

[API](https://skmtc.net/guesty/apis/guesty-open-api.md) · [All operations](https://skmtc.net/guesty/apis/guesty-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/guesty/guesty-open-api/versions/7c62644070f2/schema)
