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

# Save an expense

> Save a new (or update an existing) expense



## OpenAPI

````yaml https://dev.hurdlr.com/rest/v1/devUtils/documentation?version=5&Authorization=dexfeE6aRK3zwXP4ku5aWm8w&env=sandbox post /v5/expenses/expense
openapi: 3.0.1
info:
  title: Tight API
  contact:
    name: Hurdlr, Inc. (dba Tight)
    url: https://www.tight.com
    email: api@tight.com
  version: 6.0.0
servers:
  - url: https://sandbox.hurdlr.com/rest
    description: Staging Environment
  - url: https://prod.hurdlr.com/rest
    description: Production Environment
security:
  - accessTokenSecurity: []
  - basicSecurity: []
tags:
  - name: Authentication
  - name: Banks
  - name: Business & Client Management
  - name: Invoicing
  - name: Revenue
  - name: Investments
  - name: Payouts
  - name: Bills
  - name: Expenses
  - name: Payroll
  - name: Reports
  - name: Accounting
  - name: Mileage
  - name: Taxes
  - name: Time Tracking
  - name: Imports
  - name: Files
  - name: Accountant
  - name: Audit Trail
  - name: Support
  - name: Tax Engine Express
  - name: Interview Endpoint
  - name: Ledgering
  - name: Configuration
  - name: Templates
paths:
  /v5/expenses/expense:
    post:
      tags:
        - Expenses
      summary: Save an expense
      description: Save a new (or update an existing) expense
      operationId: postExpense
      requestBody:
        description: expense object
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/TRAX_POST_BODYExpensePostDTOV5WithChildren'
        required: true
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormRetVal'
      security:
        - accessTokenSecurity: []
components:
  schemas:
    TRAX_POST_BODYExpensePostDTOV5WithChildren:
      properties:
        expense:
          $ref: '#/components/schemas/ExpensePostDTOV5WithChildren'
    FormRetVal:
      type: object
      properties:
        result:
          type: string
          description: The result of the action performed
          enum:
            - SUCCESS
            - FAILURE
        errors:
          $ref: '#/components/schemas/ValidationRetVal'
        id:
          type: string
          description: Id of the entity being acted upon
        webhook:
          $ref: '#/components/schemas/EntityUpdateEvent'
      description: Object containing details about result of the action performed
    ExpensePostDTOV5WithChildren:
      required:
        - amount
        - bankAccountId
      type: object
      properties:
        id:
          type: integer
          description: Id of the expense, required when updating an existing expense
          format: int64
        type:
          type: string
          description: Type of the expense
          enum:
            - BUSINESS
            - NOT_BUSINESS
            - PENDING
            - PAYROLL
        date:
          type: string
          description: Date of the expense
          format: date-time
          example: '2022-01-04T10:20:00Z'
        amount:
          type: number
          description: Total amount of the expense
          example: 50.01
        state:
          type: string
          description: >-
            State in which this expense was incurred, used to calculate sales
            tax amount
          enum:
            - UNKNOWN
            - AL
            - AK
            - AS
            - AZ
            - AR
            - CA
            - CO
            - CT
            - DE
            - DC
            - FM
            - FL
            - GA
            - GU
            - HI
            - ID
            - IL
            - IN
            - IA
            - KS
            - KY
            - LA
            - ME
            - MD
            - MH
            - MA
            - MI
            - MN
            - MS
            - MO
            - MT
            - NE
            - NV
            - NH
            - NJ
            - NM
            - NY
            - NC
            - ND
            - MP
            - OH
            - OK
            - OR
            - PW
            - PA
            - PR
            - RI
            - SC
            - SD
            - TN
            - TX
            - UT
            - VT
            - VI
            - VA
            - WA
            - WV
            - WI
            - WY
            - AB
            - BC
            - MB
            - NB
            - NL
            - NT
            - NS
            - NU
            - 'ON'
            - PE
            - QC
            - SK
            - YT
        salesTaxAmount:
          type: number
          description: Sales tax amount for the expense
          example: 1.01
        description:
          type: string
          description: Description of the expense
          example: Gas purchase
        vendorId:
          type: integer
          description: >-
            Id of the vendor associated with this expense; either vendorName or
            vendorId is required to create a new expense
          format: int64
        vendorName:
          type: string
          description: >-
            Name of this vendor associated with this expense; either vendorName
            or vendorId is required to create a new expense
          example: United Airlines
        businessId:
          type: integer
          description: >-
            Id of the business assigned to this expense, required for BUSINESS
            expenses
          format: int64
        clientId:
          type: integer
          description: Id of the client assigned to this expense
          format: int64
        clientName:
          type: string
          description: Name of the client assigned to this expense
        categoryId:
          type: integer
          description: >-
            Id of the category associated with this expense, required for
            BUSINESS expenses
          format: int64
        personalCategoryId:
          type: integer
          description: Id of the personal category associated with this expense
          format: int64
        confidence:
          type: string
          description: Confidence of a tax deduction, only pertains to PENDING expenses
          enum:
            - LIKELY
            - QUESTIONABLE
            - UNLIKELY
        frequency:
          type: string
          description: Frequency of the expense
          example: ONE_TIME
          enum:
            - ONE_TIME
            - WEEKLY
            - MONTHLY
            - YEARLY
        isParent:
          type: boolean
          description: >-
            Whether this expense is a parent (e.g. to recurring or split
            children expenses). Parent expenses generally should not be directly
            displayed to the user, as its children are more pertinent and
            displaying both results in double counting.
        apiExpenseId:
          type: string
          description: Id of the expense on associated API
        bankAccountId:
          type: integer
          description: id of the user's bank account
          format: int64
        billId:
          type: integer
          description: Id of the bill that this expense paid for
          format: int64
        childExpenses:
          type: array
          items:
            $ref: '#/components/schemas/ExpenseDTOV5Child'
        customData:
          type: object
          description: >-
            Custom JSON in which you can store any data with max length of 2000
            characters
        bankTransferId:
          type: integer
          description: Id of the bank transfer to convert to an expense
          format: int64
        revenueId:
          type: integer
          description: Id of the revenue to convert to an expense
          format: int64
        taxPaymentId:
          type: integer
          description: Id of the tax payment to convert to an expense
          format: int64
        status:
          type: string
          description: Status of the expense
          readOnly: true
          enum:
            - ACTIVE
            - INACTIVE
        reviewStatus:
          type: string
          description: Review status of the expense
          enum:
            - PARTNER_REVIEW_REQUIRED
            - USER_REVIEW_REQUIRED
            - ACCOUNTANT_REVIEW_REQUIRED
            - RECONCILIATION_STAGED
            - RECONCILED
            - RECONCILIATION_DISCREPANCY
            - ADJUSTMENT_USER_REVIEW_REQUIRED
            - ADJUSTMENT_ACCOUNTANT_REVIEW_REQUIRED
            - ADJUSTMENT_RECONCILIATION_STAGED
            - RECONCILIATION_AWAITING
            - PARTNER_REVIEW_REQUIRED
            - USER_REVIEW_REQUIRED
            - ACCOUNTANT_REVIEW_REQUIRED
            - RECONCILIATION_STAGED
            - RECONCILED
            - RECONCILIATION_DISCREPANCY
            - ADJUSTMENT_USER_REVIEW_REQUIRED
            - ADJUSTMENT_ACCOUNTANT_REVIEW_REQUIRED
            - ADJUSTMENT_RECONCILIATION_STAGED
        userAccess:
          type: string
          description: >-
            Access level for the user. This field uses the default configuration
            for the Partner; however, it can be overridden to manipulate how a
            user can interact with this expense.
          enum:
            - NONE
            - READ_ONLY
            - READ_WRITE
            - NONE
            - READ_ONLY
            - READ_WRITE
        accountantAccess:
          type: string
          description: >-
            Access level for the accountant. This field uses the default
            configuration for the Partner; however, it can be overridden to
            manipulate how an accountant can interact with this expense.
          enum:
            - NONE
            - READ_ONLY
            - READ_WRITE
            - NONE
            - READ_ONLY
            - READ_WRITE
        expenseRuleId:
          type: integer
          description: Id of the rule that automatically classified this expense
          format: int64
          readOnly: true
        invoiceId:
          type: integer
          description: Id of the invoice that this expense is reimbursed on
          format: int64
          readOnly: true
        recurringParentId:
          type: integer
          description: >-
            Id of the recurring parent expense; populated if this expense is
            recurring
          format: int64
          readOnly: true
        apiAccountId:
          type: string
          description: Id of the user's bank account on associated API
          readOnly: true
        apiAccountNo:
          type: string
          description: >-
            Mask of the user's bank account, often the last 4 digits of the
            account number
          readOnly: true
        apiAccountName:
          type: string
          description: Display name for the bank account from which this expense originated
          readOnly: true
          example: Citi Premier® Card
        apiInstitutionId:
          type: string
          description: Name or id of the institution from which the transaction originated
          readOnly: true
        bankDescription:
          type: string
          description: >-
            Transaction description, similar to what will show on the user's
            bank statement
          readOnly: true
        v6EntityId:
          type: string
          description: Entity id on the v6 API for this expense
    ValidationRetVal:
      type: object
      properties:
        fieldErrors:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ValidationError'
          description: Map of field-level errors, often originating from validation errors
        globalErrors:
          type: array
          description: List of higher-level errors
          items:
            $ref: '#/components/schemas/ValidationError'
      description: Error object containing details errors incurred, if any
    EntityUpdateEvent:
      type: object
      properties:
        userId:
          type: string
        accountantUserId:
          type: string
        type:
          type: string
          enum:
            - ENTITY_UPDATE
            - LIFECYCLE_EVENT
            - LIFECYCLE
    ExpenseDTOV5Child:
      required:
        - amount
        - status
        - type
      type: object
      properties:
        id:
          type: integer
          description: Id of the expense
          format: int64
        type:
          type: string
          description: Type of the expense
          example: BUSINESS
          enum:
            - BUSINESS
            - NOT_BUSINESS
            - PENDING
        amount:
          type: number
          description: Total amount of the expense
          example: 50.01
        businessId:
          type: integer
          description: >-
            Id of business assigned to this expense, required for BUSINESS
            expenses
          format: int64
        clientId:
          type: integer
          description: Id of client assigned to this expense
          format: int64
        categoryId:
          type: integer
          description: >-
            Id of the category associated with this expense, required for
            BUSINESS expenses
          format: int64
        personalCategoryId:
          type: integer
          description: Id of the personal category associated with this expense
          format: int64
        invoiceId:
          type: integer
          description: Id of the invoice that this expense is reimbursed on
          format: int64
          readOnly: true
        description:
          type: string
          description: Description of expense
          example: Gas purchase
        status:
          type: string
          description: Status of the expense
          example: ACTIVE
          enum:
            - ACTIVE
            - DELETED
        salesTaxAmount:
          type: number
          description: Sales tax amount for the expense
          example: 1.01
        state:
          type: string
          description: State value for expense sales tax amount
          example: DC
          enum:
            - UNKNOWN
            - AL
            - AK
            - AS
            - AZ
            - AR
            - CA
            - CO
            - CT
            - DE
            - DC
            - FM
            - FL
            - GA
            - GU
            - HI
            - ID
            - IL
            - IN
            - IA
            - KS
            - KY
            - LA
            - ME
            - MD
            - MH
            - MA
            - MI
            - MN
            - MS
            - MO
            - MT
            - NE
            - NV
            - NH
            - NJ
            - NM
            - NY
            - NC
            - ND
            - MP
            - OH
            - OK
            - OR
            - PW
            - PA
            - PR
            - RI
            - SC
            - SD
            - TN
            - TX
            - UT
            - VT
            - VI
            - VA
            - WA
            - WV
            - WI
            - WY
            - AB
            - BC
            - MB
            - NB
            - NL
            - NT
            - NS
            - NU
            - 'ON'
            - PE
            - QC
            - SK
            - YT
        vendorId:
          type: integer
          description: Id of the vendor associated with this expense
          format: int64
        billId:
          $ref: '#/components/schemas/FieldActionLong'
    ValidationError:
      type: object
      properties:
        type:
          type: string
          description: A broad categorization of the error
          enum:
            - DUPLICATE
            - REQUIRED
            - DELETE
            - INVALID_VALUE
            - NOT_MODIFIABLE
            - GENERAL
            - INVALID_FORMAT
        errorMessage:
          type: string
          description: Human-friendly message describing this error
        message:
          type: string
          writeOnly: true
          enum:
            - DUPLICATE
            - REQUIRED
            - DELETE
            - INVALID_VALUE
            - NOT_MODIFIABLE
            - GENERAL
            - INVALID_FORMAT
            - INVALID_MAPPING
      description: List of higher-level errors
    FieldActionLong:
      type: object
      description: Id of the bill that this expense paid for
  securitySchemes:
    accessTokenSecurity:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: /auth/account
          scopes:
            write: ''

````