Skip to main content
PUT
Update low-credit alert settings

Authorizations

Authorization
string
header
required

Recommended. Pass your API key as a Bearer token in the Authorization header: Authorization: Bearer YOUR_API_KEY.

Body

application/json
enabled
boolean
required

Whether the alert is active.

Example:

true

threshold
integer
required

The alert fires when an analysis brings the balance to or below this number of credits. 0 never fires.

Required range: 0 <= x <= 10000
Example:

100

webhookUrl
string<uri>

Optional HTTP(S) URL that receives the credits.low event. Its host must not be a private, loopback, or link-local address. Omit it to remove a previously saved URL.

Example:

"https://client.example.com/webhooks/ochy-credits"

Response

Settings saved. Body mirrors GET /settings/low-credit-alerts.

applicable
boolean

false when the scope has unlimited credits: alerts do not apply.

Example:

true

reason
enum<string>

Present when applicable is false.

Available options:
unlimited
scopeType
enum<string>

Credit scope of the API key.

Available options:
personal,
organization
Example:

"organization"

scopeId
string

Identifier of the credit scope the API key draws from.

Example:

"org_abc123"

enabled
boolean
Example:

true

threshold
integer
Example:

100

webhookUrl
string<uri>

Omitted when no URL is saved.

Example:

"https://client.example.com/webhooks/ochy-credits"

updatedAt
string<date-time>

When the settings were last saved (ISO 8601 UTC). Omitted when never saved.

Example:

"2026-10-05T10:45:00Z"