---
title: "Create Expense Entry"
method: POST
path: "/expense_entries"
tags: ["Expense Entries"]
---

# Create Expense Entry

`POST /expense_entries`

## Request

- Base URL: `https://secure.fleetio.com/api`
- URL: `https://secure.fleetio.com/api/expense_entries`
- Auth: API key in header `Authorization` and API key in header `Account-Token`
- TypeScript: <https://skmtc.dev/fleetio/apis/fleetio-developer-api/docs/expense_entries/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new Expense Entry

## Request body

- object
  - `vehicle_id` integer, required
  - `expense_entry_type_id` integer, required
  - `vendor_id` integer
  - `total_amount_cents` integer, required: The total amount of this Expense Entry, in cents.
  - `occurred_at` string, date-time, required: Date and time of the expense. We recommend using [ISO-8601](/docs/overview/date-formatting) formatted dates to avoid ambiguity.
  - `notes` string: Additional comments.
  - `custom_fields` CustomFields, nullable: *Full details on working with Custom Fields [here](/docs/overview/custom-fields).
  - `documents_attributes` object[]: An array of one or more document objects to add to the record. Follow our [Attaching Documents and Images](/docs/overview/attaching-documents-and-images) guide to upload to our third party storage provider in order to obtain `file_url`.
    - `name` string: The name to give the file which will be shown in the UI.
    - `file_url` string: The URL obtained from our storage provider that points to the file.
    - `file_mime_type` string: The MIME type of the file. For example, `application/pdf`.
    - `file_name` string: The name of the file.
    - `file_size` integer: The size of the file in bytes.
  - `images_attributes` object[]: An array of one or more image objects to add to the record. Follow our [Attaching Documents and Images](/docs/overview/attaching-documents-and-images) guide to upload to our third party storage provider in order to obtain `file_url`.
    - `name` string: The name to give the image which will be shown in the UI.
    - `file_url` string: The URL obtained from our storage provider that points to the image.
    - `file_mime_type` string: The MIME type of the image. For example, `image/png`.
    - `file_name` string: The name of the image.
    - `file_size` integer: The size of the image file in bytes.

## Response `201`

OK

- ExpenseEntryCreated, nullable: An Expense Entry
  - `id` integer, required
  - `created_at` string, date-time: The date and time at which this record was created.
  - `updated_at` string, date-time: The date and time at which this record was most recently updated.
  - `account_id` integer, required: The ID of the `Account` that owns this Expense Entry.
  - `notes` string, nullable: Additional comments.
  - `expense_entry_type_id` integer, required
  - `occurred_at` string, date-time, required: Date and time of the expense.
  - `vehicle_id` integer, required: The ID of the associated `Vehicle`.
  - `vendor_id` integer, nullable, required
  - `custom_fields` CustomFields, nullable, required: *Full details on working with Custom Fields [here](/docs/overview/custom-fields).
  - `billable_id` integer, nullable: The ID of the associated `Acquisition`, if applicable.
  - `billable_type` 'Acquisition', nullable: The billable type, if applicable.
  - `bulk_watch_record` boolean: Whether or not this record is being watched in bulk.
  - `comments_count` integer, required: The number of `Comments` on this record.
  - `documents_count` integer, required: The number of documents attached to this record.
  - `images_count` integer, required: The number of images attached to this record.
  - `import_id` integer, nullable: The ID of the `Import` that created this record, if applicable.
  - `is_sample` boolean: Whether or not this record is sample data.
  - `recurring_expense_entry_id` integer, nullable: The ID of the associated recurring Expense Entry, if applicable.
  - `skip_automatic_watchers_callbacks` boolean: Whether or not to skip automatic watchers callbacks.
  - `total_amount_cents` string, required: The total amount of the expense.
  - `vehicle_archived_at` string, date-time, nullable: The date and time the associated `Vehicle` was archived, if applicable.
  - `watchable_options` object, required: Options related to watching the record.

## Other responses

- `401`: Request could not be authenticated
- `422`: Unprocessable Entity
- `500`: Something unexpected happened

---

[API](https://skmtc.dev/fleetio/apis/fleetio-developer-api.md) - [All operations](https://skmtc.dev/fleetio/apis/fleetio-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fleetio/apis/fleetio-developer-api/revisions/49558d744bd7?raw)
