# budget

```graphql
query Budget($budgetId: ID!) {
  budget(budgetId: $budgetId) {
    id
    scope {
      kind
      projectId
      userId
      apiKeyId
    }
    monthlyLimitCredits
    monthlyLimitUsd
    status {
      used
      remaining
      resetsAt
    }
    createdAt
    updatedAt
  }
}
```

Get a budget and its usage for the current month.

## Arguments

| Name       | Type | Required | Description                                                                                         |
| ---------- | ---- | -------- | --------------------------------------------------------------------------------------------------- |
| `budgetId` | ID!  | Yes      | Budget ID. A budget you cannot manage is masked as missing and fails with resource-not-found (404). |

## Variables

```json
{
  "budgetId": "string"
}
```

## Responses

| Status | Description                 |
| ------ | --------------------------- |
| 200    | The Budget! in data.budget. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query Budget($budgetId: ID!) {\n  budget(budgetId: $budgetId) {\n    id\n    scope {\n      kind\n      projectId\n      userId\n      apiKeyId\n    }\n    monthlyLimitCredits\n    monthlyLimitUsd\n    status {\n      used\n      remaining\n      resetsAt\n    }\n    createdAt\n    updatedAt\n  }\n}",
  "variables": {
    "budgetId": "string"
  }
}'
```

## Example response

```json
{
  "data": {
    "budget": {
      "id": "string",
      "scope": {
        "kind": "string",
        "projectId": "string",
        "userId": "string",
        "apiKeyId": "string"
      },
      "monthlyLimitCredits": 0,
      "monthlyLimitUsd": 0,
      "status": {
        "used": 0,
        "remaining": 0,
        "resetsAt": "string"
      },
      "createdAt": "string",
      "updatedAt": "string"
    }
  }
}
```
