> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bigcapital.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit the given expense transaction.



## OpenAPI

````yaml api-reference/openapi.json put /api/expenses/{id}
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/expenses/{id}:
    put:
      tags:
        - Expenses
      summary: Edit the given expense transaction.
      operationId: ExpensesController_editExpense
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
        - name: id
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditExpenseDto'
      responses:
        '200':
          description: ''
components:
  schemas:
    EditExpenseDto:
      type: object
      properties:
        referenceNo:
          type: string
          description: The reference number of the expense
          example: INV-123456
        paymentDate:
          format: date-time
          type: string
          description: The payment date of the expense
          example: '2021-01-01'
        paymentAccountId:
          type: number
          description: The payment account id of the expense
          example: 1
        description:
          type: string
          description: The description of the expense
          example: This is a description
        exchangeRate:
          type: number
          description: The exchange rate of the expense
          example: 1
        currencyCode:
          type: string
          example: USD
          description: The currency code of the expense
        publish:
          type: boolean
          description: The publish status of the expense
          example: true
        payeeId:
          type: number
          description: The payee id of the expense
          example: 1
        branchId:
          type: number
          description: The branch id of the expense
          example: 1
        categories:
          description: The categories of the expense
          example:
            - index: 1
              expenseAccountId: 1
              amount: 100
              description: This is a description
              landedCost: true
              projectId: 1
          type: array
          items:
            type: string
        attachments:
          description: The attachments of the expense
          example:
            - key: '123456'
          type: array
          items:
            type: string
      required:
        - referenceNo
        - paymentDate
        - paymentAccountId
        - description
        - exchangeRate
        - currencyCode
        - publish
        - payeeId
        - branchId
        - categories
        - attachments

````