Credit Alert Webhook
Proxyify sends a POST request to your webhook URL when your credit balance falls below your configured alert threshold. Use this to trigger auto-top-up flows, send notifications, or pause services gracefully.
Setup
Set the webhook URL on any of your API keys — either from the dashboard (Settings → Webhook URL) or via the API:
http
PATCH https://proxyify.dev/api/keys/7/
Authorization: Bearer prx-xxxxxxxxxxxxxxxx
Content-Type: application/json
{
"webhook_url": "https://your-server.com/webhook"
}
Set your alert threshold from the dashboard under Dashboard → Settings → Credit Alert Threshold. The default is 100 credits.
Webhook Payload
When your balance crosses below the threshold, Proxyify sends a POST request with the following JSON body:
json (POST body)
{
"event": "low_credits",
"user_email": "you@example.com",
"credits_balance": 87.5
}
| Field | Type | Description |
|---|---|---|
event | string | Always "low_credits" |
user_email | string | The email of the account owner |
credits_balance | number | Current balance at the time of the event |
Behaviour
- The webhook fires once when the balance transitions from above the threshold to below it — not on every request.
- It is sent to all active keys that have a
webhook_urlset. - Proxyify expects any
2xxresponse. If your server is unreachable, the request times out after 10 seconds and is not retried. - Proxyify will never crash or delay your API response due to a webhook failure.
Example Handler
Python (Flask)
from flask import Flask, request
app = Flask(__name__)
@app.route("/webhook", methods=["POST"])
def webhook():
data = request.get_json()
if data.get("event") == "low_credits":
balance = data["credits_balance"]
# send Slack alert, trigger top-up, etc.
print(f"Low credits: {balance} remaining")
return "", 200