Create a budget
const url = 'https://example.com/api/v1/money/budgets';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"currency":"example","name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/money/budgets \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "currency": "example", "name": "example" }'Create a budget for the caller. The request sets its name and supported currency. The server creates the budget folder, Budget.md, and Accounts.md, then returns the new budget. Route: /api/v1/money/budgets. Inputs: . Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Create a budget: Money/<name>/ with Budget.md and Accounts.md.
object
Budget currency, ISO 4217 (for example EUR).
Budget name; also the folder name.
Examplegenerated
{ "currency": "example", "name": "example"}Responses
Section titled “Responses”Created Money/
One budget folder in the User’s Money/ folder.
object
Budget currency, ISO 4217.
Folder name under Money/.
Stable budget ID (budget-id in the frontmatter).
Display name (the # title of Budget.md).
Why the files cannot be posted, when they are broken.
Decimal places of currency.
Examplegenerated
{ "currency": "example", "folder": "example", "id": "example", "name": "example", "problem": "example", "scale": 1}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}