Analytics
Update spend limit
Sets the monthly spend limit for an organization. Null removes the limit.
At a glance
| Item | Value |
|---|---|
| Method | PUT |
| Path | /v1/organizations/{org_id}/spend-limit |
| Auth | Authorization: Bearer <token-or-api-key> |
Quick request
Use this as a starting point. Replace the placeholder IDs, set PGBEAM_TOKEN, and create body.json from the schema below.
curl -X PUT \
"$PGBEAM_API_URL/v1/organizations/<org_id>/spend-limit" \
-H "Authorization: Bearer $PGBEAM_TOKEN" \
-H "Content-Type: application/json" \
--data @body.jsonAuthorizationBearer <token>
JWT issued by Better Auth. Verified via JWKS.
In: header
Path Parameters
org_id*string
Unique organization identifier.
Match
^[a-zA-Z0-9_.-]+$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://api.pgbeam.com/v1/organizations/string/spend-limit" \ -H "Content-Type: application/json" \ -d '{}'{
"org_id": "string",
"plan": "starter",
"billing_provider": "stripe",
"subscription_status": "none",
"current_period_end": "2019-08-24T14:15:22Z",
"enabled": true,
"custom_pricing": true,
"spend_limit": 0,
"limits": {
"queries_per_day": 0,
"max_projects": 0,
"max_databases": 0,
"max_connections": 0,
"queries_per_second": 0,
"bytes_per_month": 0,
"max_query_shapes": 0,
"included_seats": 0
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}