---
title: "Record contract spending"
method: POST
path: "/bus/contracts/spending"
tags: ["bus"]
---

# Record contract spending

`POST /bus/contracts/spending`

Records the spending of a contract. This is used to keep track of how much was spent on sector deletions, funding ephemeral accounts, listing sector roots, and storing sectors.

## Request body

- object[]
  - `deletions` string — Total amount spent on sector deletions
  - `fundAccount` string — Total amount spent on funding ephemeral accounts
  - `sectorRoots` string — Total amount spent on listing sector roots
  - `uploads` string — Total amount spent on storing sectors
  - `contractID` string — A unique identifier for a file contract
  - `revisionNumber` integer — The revision number of the contract
  - `size` integer — The size of the contract in bytes
  - `missedHostPayout` string — The amount of siacoins that the host will receive if the contract resolves missed
  - `validRenterPayout` string — The amount of siacoins that the renter will receive if the contract resolves valid.

## Response `200`

Spending recorded successfully

## Other responses

- `500` — Internal server error

## Changes

- **2024-12-18** `922f156353c9` — 1 breaking, 1 info
  - removed the media type `text/plain` for the response with the status `500`
  - api tag `bus` added
- **2024-12-17** `acbb46c060cb` — 1 info
  - endpoint added
- **2024-12-09** `f062c35d8f47` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/siafoundation/apis/renterd-api/changes/bus/contracts/spending/post.md)

---

[API](https://skmtc.dev/siafoundation/apis/renterd-api.md) · [All operations](https://skmtc.dev/siafoundation/apis/renterd-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/siafoundation/renterd-api/revisions/184a3d5207da/schema)
