Analytics
updateSpendLimit
Update spend limit
Sets the monthly spend limit for an organization. Null removes the limit.
Usage
const result = await api.analytics.updateSpendLimit({
pathParams: { org_id: "org_xxx" },
body: {
,
},
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| pathParams.org_id | string | Yes | Unique organization identifier. |
| body.spend_limit | number | No | Monthly spend limit in dollars. Null to remove the limit. |
Response
Promise<OrganizationPlan> — spend limit updated.
Example
import { PgBeamClient } from "pgbeam";
const client = new PgBeamClient({
token: "pbk_...",
baseUrl: "https://api.pgbeam.com",
});
const result = await client.api.analytics.updateSpendLimit({
pathParams: { org_id: "org_xxx" },
body: {
,
},
});Errors
| Status | Description |
|---|---|
| 400 | Invalid request parameters. |
| 401 | Missing or invalid authentication. |
| 403 | Operation not allowed by current plan limits. |
| 429 | Rate limited. Try again later. |