storage.tier_changed
Sent when the workspace's recording storage size changes: an upgrade, a scheduled downgrade, or a drop to free after an unpaid renewal.
Sent when the workspace's recording storage size changes: an upgrade, a scheduled downgrade, or a drop to free after an unpaid renewal.
storage.tier_changed is sent when the workspace's recording storage size changes. A monthly renewal that keeps the same size does not send it. The reason field says why the size changed:
customer: you changed the size in the console or with PUT /v1/storage/tier. An upgrade applies immediately, and the wallet is charged for the rest of the month.renewal: the renewal on the 1st applied a downgrade you scheduled to a smaller paid size.downgrade: the renewal on the 1st applied a downgrade you scheduled to the free 100 MB. Nothing is charged and nothing is refunded.past_due: storage renews on the 1st from the wallet. If the wallet is still negative 72 hours after the renewal, the workspace drops to the free 100 MB.When a workspace ends up over its new size, the oldest recordings are deleted first.
Subscribe by adding storage.tier_changed to the events of a webhook created with POST /v1/webhooks.
The body is flat JSON. The event name is in the X-Sautikit-Event-Kind header, not in the body.
{
"workspace_id": "01900000-0000-7000-8000-000000000002",
"from_tier_mb": 100,
"to_tier_mb": 1024,
"charge_minor": 29950,
"currency": "KES",
"reason": "customer",
"changed_at": "2026-09-16T00:00:00Z"
}| Field | Type | Description |
|---|---|---|
workspace_id | string (UUID) | The workspace whose storage changed. |
from_tier_mb | integer | Size before the change, in MB. |
to_tier_mb | integer | Size after the change, in MB. One of 100 (free), 1024, 4096, 51200. |
charge_minor | integer | What this change charged the wallet, in minor units (KES cents). 0 when nothing was charged. |
currency | string | Wallet currency, for example KES. |
reason | string | One of customer, renewal, downgrade, past_due. |
changed_at | string (RFC 3339) | When the change was applied. |
Other fields may be present.
| Header | Description |
|---|---|
X-Sautikit-Event-Kind | storage.tier_changed. Route on this. |
X-Sautikit-Event-Id | UUID of the event. Deduplicate on this. |
X-Sautikit-Delivery-Id | UUID of this delivery. |
X-Sautikit-Attempt | Attempt number, starting at 1. |
X-Sautikit-Timestamp | Unix time (seconds) when the delivery was signed. |
X-Sautikit-Signature | t=<timestamp>,v1=<hex HMAC-SHA256>. See Verify webhook signatures. |
X-Sautikit-Event-Id header.// verifyWebhook is the function from the "Verify webhook signatures" guide.
import { verifyWebhook } from "./verify-webhook.js";
export async function POST(req) {
const body = await req.text();
try {
verifyWebhook(body, req.headers.get("x-sautikit-signature") ?? "", process.env.WEBHOOK_SECRET);
} catch {
return new Response("Forbidden", { status: 403 });
}
if (req.headers.get("x-sautikit-event-kind") === "storage.tier_changed") {
const { from_tier_mb, to_tier_mb, charge_minor, currency, reason } = JSON.parse(body);
console.log(`Storage ${reason}: ${from_tier_mb} MB to ${to_tier_mb} MB, charged ${currency} ${charge_minor / 100}`);
// update your billing records, tell your team
}
return new Response("OK", { status: 200 });
}