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

# Create Expense

> Log a new expense. Amounts are in cents (see [Concepts](/concepts)); attach files first via `POST /attachments` and reference their IDs in the request body.



## OpenAPI

````yaml /openapi.json post /expenses
openapi: 3.1.1
info:
  title: Everhour API
  version: 1.0.0
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.everhour.com
security:
  - ApiKeyAuth: []
tags:
  - name: Clients
  - name: Custom Fields
  - name: Expenses
  - name: Invoices
  - name: Projects
  - name: Reports
  - name: Schedule
  - name: Tasks
  - name: Time Off
  - name: Time Records
  - name: Timecards
  - name: Timers
  - name: Timesheets
  - name: Users
  - name: Webhooks
paths:
  /expenses:
    post:
      tags:
        - Expenses
      summary: Create Expense
      description: >-
        Log a new expense. Amounts are in cents (see [Concepts](/concepts));
        attach files first via `POST /attachments` and reference their IDs in
        the request body.
      operationId: createExpense
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpenseRequestCreateRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Expense'
        '401':
          description: Unauthorized
components:
  schemas:
    ExpenseRequestCreateRequest:
      type: object
      properties:
        amount:
          type: integer
          description: Amount in cents.
          example: 2278
        attachments:
          type: array
          items:
            type: integer
          description: Attachment IDs to link.
        billable:
          type: boolean
          example: true
        category:
          type: integer
          description: Expense category ID
          example: 236046
        date:
          type: string
          example: '2019-04-04'
        details:
          type: string
          example: Transportation notes
        project:
          type: string
          example: as:333045610521453
        quantity:
          type: number
          example: 17
        user:
          type: integer
          example: 6
        type:
          type: string
          enum:
            - separate
            - billable
            - cost
          description: Expense type.
      required:
        - category
        - date
    Expense:
      type: object
      properties:
        amount:
          type: integer
          example: 2278
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/AttachmentDetails'
        billable:
          type: boolean
          example: true
        category:
          type: number
          example: 236046
        date:
          type: string
          example: '2019-04-04'
        details:
          type: string
          example: Transportation notes
        id:
          type: number
          example: 234718
        project:
          type: string
          example: as:333045610521453
        quantity:
          type: number
          example: 17
        user:
          type: number
          example: 6
    AttachmentDetails:
      type: object
      properties:
        id:
          type: number
          example: 514
        name:
          type: string
          example: avatar.jpg
        token:
          type: string
          example: 9a04b8a1fb99cbfadf3386ad6a338c14
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````