Skip to main content
POST
/
api
/
public
/
v1
/
budgets
Create budget
curl --request POST \
  --url https://app.msportal.ai/api/public/v1/budgets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "fiscalYear": 2000,
  "periodType": "Annual",
  "status": "Draft",
  "currency": "<string>",
  "notes": "<string>"
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>",
    "fiscalYear": 123,
    "periodType": "Annual",
    "status": "Draft",
    "currency": "<string>",
    "notes": "<string>",
    "company": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "createdBy": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "totals": {
      "softwareTotal": 123,
      "hardwareTotal": 123,
      "labourTotal": 123,
      "subscriptionTotal": 123,
      "otherTotal": 123,
      "grandTotal": 123
    },
    "lineItemCount": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "lineItems": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "type": "Software",
        "description": "<string>",
        "quantity": 1,
        "unitPrice": 1,
        "recurrence": "One-Time",
        "termMonths": 2,
        "annualisedCost": 123,
        "status": "pending",
        "currency": "<string>",
        "notes": "<string>",
        "category": {
          "id": "<string>",
          "name": "<string>"
        },
        "linkedItem": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "type": "device",
          "name": "<string>"
        },
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.

Body

application/json
title
string
required

Budget title (required)

Required string length: 1 - 255
companyId
string<uuid>
required

Company ID (required)

fiscalYear
integer
required

Fiscal year (required)

Required range: 1900 <= x <= 2100
periodType
enum<string>

Period type (default: Annual)

Available options:
Annual,
Quarterly,
Monthly
status
enum<string>

Status (default: Draft)

Available options:
Draft,
PendingApproval,
Approved,
Obsolete
currency
string

Currency code (default: USD)

Required string length: 3
notes
string

Budget notes

Maximum string length: 10000

Response

Budget created successfully

data
object
required