Skip to content

Understanding Link Quotas & Usage Limits

Monitor monthly click traffic, active link limits, rate limits, and edge grace period thresholds.

Understanding Link Quotas & Usage Limits

Unanticipated traffic surges from viral marketing campaigns can risk link disruption if usage caps are not monitored proactively. This guide explains how Shaf calculates monthly click quotas, enforces active link limits, and protects existing traffic with edge grace period buffers.


Prerequisites

  • Workspace permissions: Owner or Admin role in your Shaf organization.
  • An active subscription plan on dash.shaf.app.

What Counts Toward Quotas?

Shaf evaluates four distinct operational dimensions at the edge:

Quota Dimension What Is Counted Reset Interval
Monthly Click Events Every visitor redirect executed across system and custom domains. Resets on monthly billing cycle.
Active Links Total non-archived short links maintained in Cloudflare D1. Cumulative (does not reset).
Custom Domains Verified branded hostnames connected to your workspace. Cumulative.
Team Seats Active user accounts with assigned RBAC roles. Cumulative.

Implementation Recipe

  1. Monitor Real-Time Usage Meters

    Inspect current utilization directly in the dashboard under Settings → Billing, or retrieve telemetry via the usage endpoint:

    curl -X GET "https://shaf.app/api/v1/organizations/org_01j8k9x2m4/usage" \
      -H "Authorization: Bearer $SHAF_API_TOKEN"

    Expected response (200 OK):

    {
      "billingCycle": {
        "start": "2026-11-01T00:00:00Z",
        "end": "2026-12-01T00:00:00Z"
      },
      "usage": {
        "monthlyClicks": { "current": 42150, "limit": 250000, "percent": 16.86 },
        "activeLinks": { "current": 1240, "limit": 25000, "percent": 4.96 },
        "customDomains": { "current": 3, "limit": 5, "percent": 60.0 },
        "seats": { "current": 4, "limit": 5, "percent": 80.0 }
      }
    }
  2. Quota Threshold Lifecycle & Grace Buffer

    Shaf applies tiered policies as usage approaches plan limits (refer to Plans & Limits Reference):

    flowchart LR
      A[Monthly Cycle Active] --> B{Usage Threshold}
      B -->|80% Reached| C[⚠️ Soft Warning Email<br/>to Owner & Admins]
      B -->|100% Reached| D[🔴 Creation Suspended<br/>API returns 403 for new links]
      D --> E{Traffic Status?}
      E -->|Grace Buffer Active| F[✅ Existing links continue<br/>redirecting without interruption]
      E -->|Grace Buffer Exhausted| G[⚠️ Upgrade required to<br/>restore unthrottled routing]
    Threshold Operational Impact Action Required
    80% Soft Cap Automated warning email dispatched to workspace Owner and Admins. Review growth trajectory and plan tier upgrade before peak.
    100% Hard Cap New link creation suspended across dashboard and REST API (403 Forbidden). Upgrade plan tier or delete/archive obsolete short links.
    Grace Buffer Existing short links continue redirecting normally for a short grace window. Upgrade plan before the grace period closes to avoid traffic throttling.

Verification

Query the rate limit and usage headers returned on standard API responses:

curl -I "https://shaf.app/api/v1/links" \
  -H "Authorization: Bearer $SHAF_API_TOKEN"

Expected response headers:

HTTP/2 200 OK
x-ratelimit-limit: 1000
x-ratelimit-remaining: 994
x-shaf-quota-clicks-used: 42150
x-shaf-quota-clicks-limit: 250000

Common Gotchas

Issue / Error Root Cause Solution
403 Forbidden: Link quota exceeded Workspace reached 100% of allowed Active Links. Archive unused links via API or upgrade to a plan tier with higher link allowances.
Spike in click volume Viral campaign or marketing launch exceeded expected traffic. Upgrade tier in Settings → Billing; new capacity applies immediately at the edge.
Crawlers consuming quota Third-party scraper spoofing residential user agents. Shaf bot filtering excludes verified crawlers; contact enterprise support for custom WAF IP blocking.
API rate limits (429) Script dispatched requests exceeding per-minute token rate limit. Implement request throttling, batch queries via bulk endpoints, or use worker caches.

Type to search…

↑↓ navigate↵ selectEsc close