Skip to main content
POST
/
api
/
budget-envelopes
Create a new budget envelope
curl --request POST \
  --url https://app.solya.app/api/budget-envelopes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 500000,
  "currency": "EUR",
  "periodId": "period-uuid-123",
  "scope": "TOTAL",
  "scopeValue": null
}
'
{
  "amount": 500000,
  "createdAt": "2026-06-05T10:00:00.000Z",
  "currency": "EUR",
  "id": "envelope-uuid-new",
  "periodId": "period-uuid-123",
  "scope": "TOTAL",
  "scopeValue": null,
  "updatedAt": null
}

Authorizations

Authorization
string
header
required

User session token issued by NextAuth. For human users accessing Solya via the web application.

Body

application/json
amount
required
currency
string
required
periodId
string
required
Minimum string length: 1
scope
enum<string>
required
Available options:
TOTAL,
BRAND,
DEPARTMENT,
COLLECTION
scopeValue
string | null
required
Required string length: 1 - 255

Response

Successful response

data
object
required
success
enum<boolean>
required
Available options:
true