Skip to content

Get plan usage

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

GET/account/plan_usage

Costs 1 rate-limit point · Rate limits

The shop's current STOQ plan, the limits it includes, and a calendar month's usage against them (back-in-stock email and SMS alerts, SMS segments, preorders).

usage.by_template splits the month's back-in-stock email and SMS alerts by notification template, as the usage card's breakdown does. Each row's key names the notification (restock_alert, reminder), the same key as /back_in_stock/templates/:key. limits.unlimited_preorders is true when the plan has no preorder limit (preorder_limit 0). usage.preorders_over_limit is the month's preorders above preorder_limit.

Also searched asplan and usagewhat plan am I onhow much have I usedusage this monthplan limits

Query parameters

  • periodstring

    Calendar month to report usage for, as YYYY-MM (e.g. 2026-04); defaults to the current month.

Returns

  • planobject
    Show 3 child attributesHide child attributes
    • namestring, nullable
      Example: pro_per_month
    • friendly_namestring, nullable
      Example: Pro
    • notestring
  • periodobject
    Show 2 child attributesHide child attributes
    • monthstring
      Example: 2026-11
    • is_currentboolean
      Example: true
  • limitsobject
    Show 6 child attributesHide child attributes
    • usage_typestring
      Example: per_month
    • unlimited_notificationsboolean
      Example: false
    • notification_limitinteger
      Example: 2000
    • email_limitinteger
      Example: 0
    • sms_limitinteger
      Example: 0
    • preorder_limitinteger
      Example: 400
  • usageobject
    Show 7 child attributesHide child attributes
    • email_alertsinteger
      Example: 684
    • sms_alertsinteger
      Example: 112
    • sms_segmentsinteger
      Example: 131
    • total_alertsinteger
      Example: 796
    • alerts_over_limitinteger
      Example: 0
    • preordersinteger
      Example: 57
    • by_templatearray of objects
      Show 3 child attributesHide child attributes
      • template_positioninteger
        Example: 0
      • email_alertsinteger
        Example: 521
      • sms_alertsinteger
        Example: 98

Errors

422
validation_failed

The action refused the request for a reason that is not a single bad field.

Any request can also fail with auth_invalid (401) or rate_limited (429).

Every error has the same shape: see Errors and the list of error codes.

GET/account/plan_usage
curl "https://app.stoqapp.com/api/v2/external/account/plan_usage" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "plan": {
    "name": "pro_per_month",
    "friendly_name": "Pro"
  },
  "period": {
    "month": "2026-11",
    "is_current": true
  },
  "limits": {
    "usage_type": "per_month",
    "unlimited_notifications": false,
    "notification_limit": 2000,
    "email_limit": 0,
    "sms_limit": 0,
    "preorder_limit": 400
  },
  "usage": {
    "email_alerts": 684,
    "sms_alerts": 112,
    "sms_segments": 131,
    "total_alerts": 796,
    "alerts_over_limit": 0,
    "preorders": 57,
    "by_template": [
      {
        "template_position": 0,
        "email_alerts": 521,
        "sms_alerts": 98
      },
      {
        "template_position": 1,
        "email_alerts": 163,
        "sms_alerts": 14
      }
    ]
  }
}