---
title: "Monthly spend cap reached (spend-cap-reached)"
description: "PubNio spend-cap-reached problem, HTTP 402: The workspace has a monthly spend cap, and this period's spend plus the publish's estimated cost would pass it."
---

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

# Monthly spend cap reached (spend-cap-reached)

HTTP 402 Monthly spend cap reached. The workspace has a monthly spend cap, and this period's spend plus the publish's estimated cost would pass it.

## When it happens

2 operations declare it: [`POST /api/v1/posts`](https://pubnio.com/api/v1/docs#tag/posts/POST/api/v1/posts) and [`POST /api/v1/posts/{postId}/publish`](https://pubnio.com/api/v1/docs#tag/posts/POST/api/v1/posts/{postId}/publish).

## Response body

```json
{
  "type": "https://pubnio.com/docs/problems/spend-cap-reached/",
  "status": 402,
  "title": "Monthly spend cap reached",
  "detail": "This publish would exceed the workspace monthly variable spend cap.",
  "code": "spend_cap_reached",
  "capMicros": 20000000,
  "periodSpendMicros": 19990000,
  "estimatedMicros": 15000,
  "fundingUrl": "/app/1d3e5f70-2a4b-4c6d-8e0f-123456789abc/settings?tab=billing",
  "canManageBilling": false,
  "nextAction": "Ask a workspace owner to adjust the spend cap at /app/1d3e5f70-2a4b-4c6d-8e0f-123456789abc/settings?tab=billing.",
  "requestId": "0f8e4c2a-6b1d-4e3f-8a9b-7c6d5e4f3a21"
}
```

| Field               | Type    | Always present |
| ------------------- | ------- | -------------- |
| `capMicros`         | integer | Yes            |
| `periodSpendMicros` | integer | Yes            |
| `estimatedMicros`   | integer | Yes            |
| `fundingUrl`        | string  | Yes            |
| `canManageBilling`  | boolean | Yes            |
| `nextAction`        | string  | Yes            |

## Recovery for agents

- Do what `nextAction` says.

## Retryable

No: the SDKs mark HTTP 402 not `retryable`.

## Limits

- Match on `type` or `code`, not on `detail`.

## Related

- [Billing problems](https://pubnio.com/docs/problems/#billing)
- [API reference](https://pubnio.com/docs/api/)

Source: https://pubnio.com/docs/problems/spend-cap-reached/index.mdx
