# Creates an expense report.

`POST /accounting/expense-reports`

Group: Accounting › Expense Reports · Operation ID: `createExpenseReport`

The response contains only the new report's id. Read the record with GET accounting/expense-reports/:id if you need its stored state, where expenseNumber appears once assigned. The report is always created pendingApproval, so a status cannot be supplied here. Two currencies are in play: the report's reimbursementCurrency is what the employee is paid in, and each item's currency is what the expense was incurred in, and they need not match. Every amount is a decimal governed by the currency on the same object. reimbursable is derived, not supplied on the report: the report counts as reimbursable unless one of its items sets reimbursable to false. Every item inherits the report's employeeId, which cannot be set per item. A report with more items than your tenant runs in one call is refused with TOO_MANY_LINES, so split it across several requests.

[Open in the interactive reference](https://docs.api.lensing.ai/?op=createExpenseReport)

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Api-Version` | header | `"v1"` | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version `v1`. |
| `Idempotency-Key` | header | string | no | An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with `400 IDEMPOTENCY_NOT_SUPPORTED` rather than silently ignored. |

## Request body

Required, `application/json`: createExpenseReportInput.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `employeeId` | string | yes | The employee the report belongs to. See id on GET people/:id. |
| `entityId` | string | yes | The legal entity the report is posted under. See id on GET base/entities. |
| `reimbursementCurrency` | string | yes | The currency the employee is reimbursed in. Format ISO 4217, for example 'USD'. Individual items may be in other currencies. |
| `submittedDate` | string (date) | yes | The date the report is submitted. Use format YYYY-MM-DD. |
| `departmentId` | string | no | The department the report is charged to. See id on GET departments/:id. |
| `offsetAccountId` | string | no | The GL offset account for the reimbursement. See id on GET accounting/accounts/:id. |
| `externalExpenseReportId` | string | no | The identifier this report has in the upstream system that produced it. It is not unique. |
| `externalUrl` | string | no | A link to the report in the upstream system that produced it. |
| `origin` | string | no | The source system this report came from, as free-form text. |
| `markAsPaid` | boolean | no | Whether to mark the report paid on creation. Defaults to false. |
| `skipJournalEntry` | boolean | no | Whether to skip journal-entry creation for this report. Defaults to false. |
| `expenseItems` | array of object | yes | The expense items on the report, in the order they should appear. At least one is expected. |
| `expenseItems[].amount` | string (decimal) | yes | The amount of the expense, as a decimal in this item's own currency. |
| `expenseItems[].currency` | string | yes | The currency the expense was incurred in. Format ISO 4217, for example 'USD'. Governs this item's amount, and need not match the report's reimbursementCurrency. |
| `expenseItems[].billDate` | string (date) | yes | The date on the receipt. Use format YYYY-MM-DD. |
| `expenseItems[].merchant` | string | yes | The merchant the expense was paid to, as printed on the receipt. |
| `expenseItems[].expenseType` | string | yes | The kind of expense. Values include 'Pur' (purchase), 'Dis' (distance traveled) and 'PerDiem'. |
| `expenseItems[].description` | string | no | A description of the expense. |
| `expenseItems[].categoryId` | string | no | The expense category this item is booked under. See id on GET accounting/expense-categories/:id. |
| `expenseItems[].accountId` | string | no | The GL account this item posts to. See id on GET accounting/accounts/:id. Omit to let the category decide. |
| `expenseItems[].reimbursable` | boolean | no | Whether this item is reimbursed to the employee. Defaults to true. |
| `expenseItems[].externalExpenseItemId` | string | no | The identifier this item has in the upstream system that produced it. |
| `expenseItems[].origin` | string | no | The source system this item came from, as free-form text. |
| `expenseItems[].attendees` | string | no | Who attended, when the item's category requires it. Free text. |
| `expenseItems[].attachments` | array of object | no | Receipts for this item, each naming an already-uploaded file by its id. Required when the category sets requireAttachment. On an existing item, omitting this leaves its attachments untouched, and an empty array clears them. |
| `expenseItems[].attachments[].fileName` | string | yes | The display name of the attached file. |
| `expenseItems[].attachments[].fileId` | string | yes | The identifier of the already-uploaded file. There is no endpoint for it. |

Example:

```json
{
  "employeeId": "5f1b8c02-7d34-4e56-9a78-1b2c3d4e5f60",
  "entityId": "8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e",
  "reimbursementCurrency": "EUR",
  "submittedDate": "2026-08-27",
  "departmentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "offsetAccountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "externalExpenseReportId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "externalUrl": "<externalUrl>",
  "origin": "<origin>",
  "markAsPaid": true,
  "skipJournalEntry": true,
  "expenseItems": [
    {
      "amount": "48.90",
      "currency": "EUR",
      "billDate": "2026-08-20",
      "merchant": "Deutsche Bahn",
      "expenseType": "Pur"
    }
  ]
}
```

## Response

`200` Success

Under `data` (createExpenseReportOutput):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | The unique identifier for the created expense report. |

## Response headers

- `Idempotency-Replayed` — Present and `true` only when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent as `false`.

## Errors

| Code | Status |
| --- | --- |
| `REFERENCE_NOT_FOUND` | 400 |
| `TOO_MANY_LINES` | 400 |
| `CATEGORY_REQUIREMENT_UNMET` | 400 |
| `CATEGORY_INACTIVE` | 400 |
| `ITEM_NEEDS_CATEGORY_OR_ACCOUNT` | 400 |
| `IDEMPOTENCY_KEY_CONFLICT` | 409 |
| `IDEMPOTENCY_PAYLOAD_MISMATCH` | 422 |

## Statuses

- `400` — Invalid request or business failure. Codes: REFERENCE_NOT_FOUND, TOO_MANY_LINES, CATEGORY_REQUIREMENT_UNMET, CATEGORY_INACTIVE, ITEM_NEEDS_CATEGORY_OR_ACCOUNT
- `401` — Missing or invalid access token
- `403` — Not authorized
- `404` — Not found
- `409` — The Idempotency-Key is still being processed by another request.
- `422` — The Idempotency-Key was already used with a different request payload.
- `429` — Too many requests
- `500` — Internal server error
