---
title: "Create an expense"
method: POST
path: "/legal/{connection_id}/expense"
tags: ["legal", "expense"]
---

# Create an expense

`POST /legal/{connection_id}/expense`

## Request

- Base URL: `http://api.unified.to`
- URL: `http://api.unified.to/legal/{connection_id}/expense`
- Auth: API key in header `authorization`

## Path parameters

- `connection_id` string, required

## Query parameters

- `fields` string[]
- `raw` string

## Request body

- LegalExpense
  - `id` string: unique identifier for the expense
  - `created_at` string, date-time: when the expense was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: when the expense was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `matter_id` string: pointer to the Legal Matter this expense is recorded against
  - `user_id` string: HR Employee who incurred or recorded the expense (reference to HrisEmployee)
  - `description` string: free-text description of the expense
  - `incurred_at` string, date-time: date the expense was incurred (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `quantity` number: number of units
  - `price_amount` number: unit price
  - `total_amount` number: total amount of the expense
  - `currency` string: ISO 4217 currency code
  - `type` 'HARD_COST' | 'SOFT_COST' | 'OTHER': hard cost, soft cost or other
  - `category` string: the vendor's expense category name
  - `is_billable` boolean: whether the expense is billable
  - `is_billed` boolean: whether the expense has been billed
  - `invoice_id` string: pointer to the Accounting Invoice this expense was billed on (reference to AccountingInvoice)
  - `expense_code` string: UTBMS/LEDES expense code
  - `metadata` LegalMetadata[]: custom field values
    - `id` string: the custom field identifier
    - `slug` string: the custom field key
    - `value` unknown
    - `namespace` string: the scope or origin of the custom field
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'FILE' | 'TEXTAREA' | 'SINGLE_SELECT' | 'MULTIPLE_SELECT' | 'MEASUREMENT' | 'PRICE' | 'YES_NO' | 'CURRENCY' | 'URL': the data type of the value
    - `extra_data` unknown
  - `raw` unknown

## Response `200`

Successful

- LegalExpense
  - `id` string: unique identifier for the expense
  - `created_at` string, date-time: when the expense was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `updated_at` string, date-time: when the expense was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `matter_id` string: pointer to the Legal Matter this expense is recorded against
  - `user_id` string: HR Employee who incurred or recorded the expense (reference to HrisEmployee)
  - `description` string: free-text description of the expense
  - `incurred_at` string, date-time: date the expense was incurred (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
  - `quantity` number: number of units
  - `price_amount` number: unit price
  - `total_amount` number: total amount of the expense
  - `currency` string: ISO 4217 currency code
  - `type` 'HARD_COST' | 'SOFT_COST' | 'OTHER': hard cost, soft cost or other
  - `category` string: the vendor's expense category name
  - `is_billable` boolean: whether the expense is billable
  - `is_billed` boolean: whether the expense has been billed
  - `invoice_id` string: pointer to the Accounting Invoice this expense was billed on (reference to AccountingInvoice)
  - `expense_code` string: UTBMS/LEDES expense code
  - `metadata` LegalMetadata[]: custom field values
    - `id` string: the custom field identifier
    - `slug` string: the custom field key
    - `value` unknown
    - `namespace` string: the scope or origin of the custom field
    - `format` 'TEXT' | 'NUMBER' | 'DATE' | 'BOOLEAN' | 'FILE' | 'TEXTAREA' | 'SINGLE_SELECT' | 'MULTIPLE_SELECT' | 'MEASUREMENT' | 'PRICE' | 'YES_NO' | 'CURRENCY' | 'URL': the data type of the value
    - `extra_data` unknown
  - `raw` unknown

---

[API](https://skmtc.dev/unified/apis/unified-to-api-2.md) · [All operations](https://skmtc.dev/unified/apis/unified-to-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/unified/apis/unified-to-api-2/revisions/7a38bdd7f089?raw)
