> ## Documentation Index
> Fetch the complete documentation index at: https://docs.molesignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Intake budgets

> List, set, and remove the budgets of sources.

A budget only tells people when a source nears or passes it: intake answers and stores the same. See [Intake usage and budgets](https://docs.molesignal.com/en-US/streams.md#intake-usage-and-budgets).

## List budgets

```http theme={null}
GET /api/v1/streams/budgets
```

Returns every budget of the organization with the label of its source and how it stands in the period under way. Requires `intake_usage.read`, or `sys.telemetry.read` in the `_sys` organization. Figures that are not known are `null`.

## Set a budget

```http theme={null}
POST /api/v1/streams/budgets
```

Sets the budget of a source. A source has one at most: setting it again changes that one. Requires `intake_budgets.manage`. The `_sys` organization cannot set budgets.

| Field | Required | Notes |
| - | - | - |
| `dimension` | Yes | `credential`, `stream`, or `service`. |
| `source_key` | Yes | The source, as [Intake usage](https://docs.molesignal.com/en-US/api/streams/usage.md) gives it. The platform's own telemetry, events that name no service, and the services past the limit cannot take a budget. |
| `period` | Yes | `day` or `month`, by the calendar in UTC. |
| `limit_size` | Yes | In MiB, from 1 to 1073741824. |
| `warn_percent` | No | The share of the limit to warn at, from 0 to 99. `0` warns only when it is used up. Default: 80. |
| `notify_user_ids` | No | Members of the organization to tell, at most 50. Default: the person setting the budget. A service account must name them. |

```bash cURL theme={null}
curl -X POST "http://localhost:5080/api/v1/streams/budgets" \
  -H "authorization: Bearer $MS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"dimension":"stream","source_key":"logs:app","period":"day","limit_size":102400}'
```

## Remove a budget

```http theme={null}
DELETE /api/v1/streams/budgets/{budget_id}
```

Returns `204`. Requires `intake_budgets.manage`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.