---
title: "Updating an existing Expense"
method: PUT
path: "/expenses/{id}"
tags: ["Expenses"]
---

# Updating an existing Expense

`PUT /expenses/{id}`

## Request

- Base URL: `https://api.mavenlink.com/api/v1`
- URL: `https://api.mavenlink.com/api/v1/expenses/{id}`
- Auth: none declared

An expense that has already been created can be updated with an HTTP PUT request. Any required or optional
attribute, with the exception of `workspace_id`, can be changed in an update.


This endpoint returns structured Expense objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `expenses` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

## Path parameters

- `id` integer, required

## Query parameters

- `include` string
- `optional_fields` string[]

## Request body

- object
  - `expense` object
    - `workspace_id` integer: The ID of the project in which the expense will be associated.
    - `date` string, date: The date of the expense in ISO8601 format. The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.
    - `expense_category_id` integer: The ID of the category to which the expense will be associated.
    - `category` string: The category of the expense as a string.
    - `amount_in_cents` integer: The amount of the expense, in cents. If 'foreign_exchange_amount' is specified, that overrides the 'amount_in_cents'.
    - `foreign_exchange_amount` object: If you have permission to convert expenses, this is the expense in foreign currency units.
      - `source_value` string, required: The amount of the expense, in foreign currency units.
      - `source_currency` string, required: The [ISO code](https://knowledge.kantata.com/hc/en-us/articles/360041576473-Supported-Currency-ISO-Codes) of the foreign currency in which the expense was incurred.
    - `user_id` integer: The internal ID of the user with whom the expense is associated. This parameter is ignored unless the authorizing user has financial access in the project and is on the consultants team; or if they are an Account Administrator that has proxy permissions through an account member with the necessary permissions.
    - `notes` string: Freeform text related to the expense.
    - `billable` boolean: A boolean that indicates whether or not this expense is billable.
    - `receipt_id` integer: The optional ID of an attached receipt for this expense.
    - `story_id` integer: The optional ID of a task in the project (this will be linked to this expense). Depending on the project's settings, expenses can be associated with only expense budgets or only tasks.
    - `expense_budget_id` integer: The optional ID of an expense budget in the project (this will be linked to this expense). Depending on the project's settings, expenses can be associated with only expense budgets or only tasks.
    - `external_reference` object: Typically populated programmatically by a third party system via an integration, this is an optional object that holds data from an external system. It connects objects in an external system with objects in Kantata OX (for example, to connect a Jira issue to a Kantata OX Project).
      - `service_name` string, required: The provider name of the integration. If you are adding multiple external references to the same object, the `service_name` must be unique.
      - `service_model` string, required: The object type of the external object this external reference belongs to.
      - `service_model_ref` string, required: The object ID of the external object this external reference belongs to.
      - `status` string: The status of the integration. Options are `successful`, `pending`, or `failed`.
      - `external_message` string: The message on the external object.
      - `external_link` string: The link to the external object.
      - `external_status` string: The status of the external object in the external system.
      - `locked` boolean: Whether the subject is locked.

## Response `200`

Expense has been updated.

- object
  - `count` integer
  - `meta` object
    - `count` integer
    - `page_count` integer
    - `page_number` integer
    - `page_size` integer
  - `results` object[]
    - `key` string
    - `id` string
  - `expenses` object
  - `external_references` object
  - `stories` object
  - `workspaces` object
  - `users` object
  - `attachments` object
  - `expense_report_submissions` object
  - `expense_categories` object
  - `roles` object
  - `vendors` object
  - `expense_budgets` object

## Other responses

- `400`: Bad Request
- `401`: Unauthorized request
- `403`: Forbidden request
- `404`: Page Not Found
- `422`: Unprocessable Entity
- `503`: Service is unavailable

---

[API](https://skmtc.dev/kantata/apis/kantata-ox-api-documentation.md) - [All operations](https://skmtc.dev/kantata/apis/kantata-ox-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kantata/apis/kantata-ox-api-documentation/revisions/9d4ebed2fa98?raw)
