# Create an expense

> Creates an expense from a multipart/form-data body. file is required and must have one of the extensions jpeg, jpg, bmp, gif, pdf, png, tiff, xlsx, xls, doc, docx or odf. vat, invoice_number and the file are stored but not returned; fetch the file with the download endpoint. Fires the expense.created webhook.

## POST /expenses

Creates an expense from a `multipart/form-data` body. `file` is required and must have one of the
extensions jpeg, jpg, bmp, gif, pdf, png, tiff, xlsx, xls, doc, docx or odf. `vat`, `invoice_number` and the
file are stored but not returned; fetch the file with the download endpoint. Fires the `expense.created`
webhook.

### Request and responses

```json
{
  "servers": [
    {
      "url": "https://app.fsaskaita.lt/api",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "operation": {
    "operationId": "createExpense",
    "description": "Creates an expense from a `multipart/form-data` body. `file` is required and must have one of the\nextensions jpeg, jpg, bmp, gif, pdf, png, tiff, xlsx, xls, doc, docx or odf. `vat`, `invoice_number` and the\nfile are stored but not returned; fetch the file with the download endpoint. Fires the `expense.created`\nwebhook.",
    "summary": "Create an expense",
    "tags": [
      "Expenses"
    ],
    "requestBody": {
      "required": true,
      "content": {
        "multipart/form-data": {
          "schema": {
            "$ref": "#/components/schemas/ExpenseCreateInput"
          }
        }
      }
    },
    "responses": {
      "201": {
        "description": "`Expense`",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "data": {
                  "$ref": "#/components/schemas/Expense"
                }
              },
              "required": [
                "data"
              ]
            }
          }
        }
      },
      "401": {
        "$ref": "#/components/responses/AuthenticationException"
      },
      "403": {
        "$ref": "#/components/responses/AuthorizationException"
      },
      "422": {
        "$ref": "#/components/responses/ValidationException"
      },
      "429": {
        "description": "Rate limit exceeded. The limit is 60 requests per minute per business, shared across all of its tokens. Wait `Retry-After` seconds before retrying.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests left in the current minute.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "description": "Unix timestamp at which the window resets.",
            "schema": {
              "type": "integer"
            }
          }
        }
      }
    }
  },
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "description": "Business token created in the app under Settings, Integrations, API. The token is scoped to exactly one business, has no expiry and is shown only once. Send it as `Authorization: Bearer <token>` together with `Accept: application/json`.",
      "scheme": "bearer"
    }
  }
}
```

### Referenced components

```json
{
  "#/components/schemas/ExpenseCreateInput": {
    "type": "object",
    "description": "Multipart body of `POST /expenses`: the same fields as `ExpenseInput`, but `file` is required.",
    "properties": {
      "currency": {
        "type": "string",
        "description": "One of the codes from `GET /currencies`.",
        "examples": [
          "EUR"
        ]
      },
      "total": {
        "type": "number",
        "description": "Amount including VAT.",
        "examples": [
          121
        ]
      },
      "vat": {
        "type": [
          "number",
          "null"
        ],
        "description": "VAT amount contained in `total`. Stored but not returned.",
        "examples": [
          21
        ]
      },
      "seller": {
        "type": "string",
        "description": "Supplier name.",
        "examples": [
          "Tiekėjas UAB"
        ],
        "maxLength": 255
      },
      "date": {
        "type": "string",
        "format": "date",
        "description": "Document date.",
        "examples": [
          "2026-09-12"
        ]
      },
      "invoice_number": {
        "type": [
          "string",
          "null"
        ],
        "description": "Supplier's document number. Stored but not returned.",
        "examples": [
          "TK-0042"
        ],
        "maxLength": 255
      },
      "file": {
        "type": "string",
        "format": "binary",
        "contentMediaType": "application/octet-stream",
        "description": "The document file: jpeg, jpg, bmp, gif, pdf, png, tiff, xlsx, xls, doc, docx or odf. Required when\ncreating an expense; optional on update, where it replaces the stored file."
      }
    },
    "required": [
      "currency",
      "total",
      "seller",
      "date",
      "file"
    ],
    "title": "ExpenseCreateInput"
  },
  "#/components/schemas/Expense": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "date": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "description": "Document date, `Y-m-d`."
      },
      "total": {
        "type": "number",
        "description": "Amount including VAT."
      },
      "currency": {
        "type": "string"
      },
      "seller": {
        "type": "string"
      },
      "created_at": {
        "type": "integer",
        "description": "Unix timestamp, seconds."
      },
      "updated_at": {
        "type": "integer",
        "description": "Unix timestamp, seconds."
      }
    },
    "required": [
      "id",
      "date",
      "total",
      "currency",
      "seller",
      "created_at",
      "updated_at"
    ],
    "title": "Expense"
  },
  "#/components/responses/AuthenticationException": {
    "description": "Unauthenticated",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "message": {
              "type": "string",
              "description": "Error overview."
            }
          },
          "required": [
            "message"
          ]
        }
      }
    }
  },
  "#/components/responses/AuthorizationException": {
    "description": "Authorization error",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "message": {
              "type": "string",
              "description": "Error overview."
            }
          },
          "required": [
            "message"
          ]
        }
      }
    }
  },
  "#/components/responses/ValidationException": {
    "description": "Validation error",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "message": {
              "type": "string",
              "description": "Errors overview."
            },
            "errors": {
              "type": "object",
              "description": "A detailed description of each field that failed validation.",
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "required": [
            "message",
            "errors"
          ]
        }
      }
    }
  }
}
```
