Skip to main content
PUT
/
v0
/
organizations
/
{organization_id}
/
members
/
{member_user_id}
/
spending-limit
curl --request PUT \
  --url 'https://api.unify.ai/v0/organizations/<organization_id>/members/<member_user_id>/spending-limit' \
  --header "Authorization: Bearer $UNIFY_KEY"
  --header 'Content-Type: application/json' \
  --data '{
    "monthly_spending_cap": 100.0
}'
{
    "organization_id": "integer",
    "user_id": "string",
    "monthly_spending_cap": "number | null",
    "assistants_capped": "integer"
}
Set the monthly spending limit for a member within an organization. This limit controls how much the member can spend when using the org’s API key. It is separate from the user’s personal spending limit (which applies to their personal API key). The member limit cannot exceed the organization’s limit. When the limit is lowered, assistant limits owned by this member that exceed the new limit will be automatically capped.

Authorizations

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

Path Parameters

organization_id
integer
required
member_user_id
string
required

Body

monthly_spending_cap
number | null
required
Monthly spending limit in dollars for this member. Set to null for no limit.
curl --request PUT \
  --url 'https://api.unify.ai/v0/organizations/<organization_id>/members/<member_user_id>/spending-limit' \
  --header "Authorization: Bearer $UNIFY_KEY"
  --header 'Content-Type: application/json' \
  --data '{
    "monthly_spending_cap": 100.0
}'
{
    "organization_id": "integer",
    "user_id": "string",
    "monthly_spending_cap": "number | null",
    "assistants_capped": "integer"
}