PUT
/
v1
/
billing
/
limits
curl --request PUT \
  --url https://api.pulze.ai/v1/billing/limits \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "spending_limit_soft": 0,
  "spending_limit_hard": 0
}'
{
  "spending_limit_soft": 0,
  "spending_limit_hard": 0,
  "currency": "usd",
  "balance": 0,
  "last_invoice_date": 123,
  "billing_zip": "<string>",
  "subscription": {
    "max_tokens": 123,
    "max_apps": 123,
    "llm_routing": true,
    "prompts": true,
    "prompt_models": true,
    "personalized_llm_routing": true,
    "fine_tuning": true,
    "support_level": "community",
    "customer_success": true,
    "max_tokens_readable": "<string>",
    "max_apps_readable": "<string>",
    "support_level_readable": "<string>",
    "is_trial": false,
    "is_none": false,
    "tier": "_NONE_",
    "name": "<string>",
    "monthly_price_usd": 123,
    "yearly_price_usd": 123,
    "monthly_discounted_usd": 123,
    "yearly_discounted_usd": 123,
    "monthly_price_id": "<string>",
    "yearly_price_id": "<string>",
    "monthly_price_label": "<string>",
    "yearly_price_label": "<string>",
    "monthly_contact_sales": false,
    "yearly_contact_sales": false,
    "monthly_button_label": "<string>",
    "yearly_button_label": "<string>"
  },
  "subscription_paused": {
    "invoices": [
      {
        "invoice_id": "<string>",
        "invoice_number": "<string>",
        "amount": 123,
        "timestamp": 123,
        "pause_reason": "<string>",
        "invoice_name": "<string>",
        "payment_link": "<string>",
        "severity": 1
      }
    ]
  },
  "trial_end": "2023-11-07T05:31:56Z",
  "trial_ending_soon": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
spending_limit_soft
number
default:0

When the balance crosses this value, a warning email will be sent informing the customer

spending_limit_hard
number
default:0

When the balance crosses this value, a high-warning email will be sent informing the customer that services will be disrupted if the balance reaches 0

Response

200
application/json
Successful Response
last_invoice_date
integer
required

The timestamp when the local balance (i.e. the value we keep track of) was synced with stripe (and the customer was billed)

billing_zip
string | null
required

The Zipcode of the address of the Organization

subscription
object
required

Details on the currently active subscription

subscription_paused
object | null
required

Returned to the frontend when the subscription has been paused for any reason.

spending_limit_soft
number
default:0

When the balance crosses this value, a warning email will be sent informing the customer

spending_limit_hard
number
default:0

When the balance crosses this value, a high-warning email will be sent informing the customer that services will be disrupted if the balance reaches 0

currency
enum<string>
default:usd

The currency of the organization

Available options:
usd
balance
number
default:0

The balance in the account. Synced with Stripe periodically

trial_end
string | null

The datetime when the trial ends (or None, if the user is not in a trial)

trial_ending_soon
boolean
default:false

When the trial is coming to an end, we notify the Frontend (calculated on the server side)