---
title: "Auto-generate budgets"
method: POST
path: "/users/{user_guid}/budgets/generate"
tags: ["budgets"]
---

# Auto-generate budgets

`POST /users/{user_guid}/budgets/generate`

This endpoint will automatically create budgets for several categories based on existing transactions; these budgets are returned as an array. Specifically, budgets will only be generated if the `user` has at least one `transaction` in a given category during each of the two previous calendar months. For example, if the request is made on March 6, and there is at least one "Bills & Utilities" `transaction` in both January and February, a budget will be generated for "Bills & Utilities." If there are two "Bills & Utilities" transactions in February but none in January, no budget will be generated for that category. If budgets already exist for particular categories, new budgets will be generated and returned based on the available transactions. If one or more budgets remain unchanged, they will nevertheless be returned in the response. If no transaction data for the `user` meet the above criteria, a `422 Unprocessable Entity` error will be returned with status code 4221 along with the message, `There aren't enough transactions to automatically create any budgets`.

## Path parameters

- `user_guid` string, required

## Response `200`

OK

---

[API](https://skmtc.net/mx/apis/mx-platform-api.md) · [All operations](https://skmtc.net/mx/apis/mx-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mx/mx-platform-api/versions/b6632646ee89/schema)
