PgBeam Docs
Analytics

Get organization plan

Returns the current plan and limits for the organization.

At a glance

ItemValue
MethodGET
Path/v1/organizations/{org_id}/plan
AuthAuthorization: Bearer <token-or-api-key>

Quick request

Use this as a starting point. Replace the placeholder IDs and set PGBEAM_TOKEN if the endpoint requires auth.

curl -X GET \
  "$PGBEAM_API_URL/v1/organizations/<org_id>/plan" \
  -H "Authorization: Bearer $PGBEAM_TOKEN"
GET
/v1/organizations/{org_id}/plan
AuthorizationBearer <token>

JWT issued by Better Auth. Verified via JWKS.

In: header

Path Parameters

org_id*string

Unique organization identifier.

Match^[a-zA-Z0-9_.-]+$

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.pgbeam.com/v1/organizations/string/plan"
{
  "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"
  }
}