Get Usage
Returns the current resource usage, plan limits, and available features for the authenticated workspace. Use this endpoint to display usage dashboards or enforce client-side limit checks.
GET
/v1/workspace/usage workspace:read Request Examples
curl -X GET https://xqr.co/api/v1/workspace/usage \ -H "Authorization: Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"const response = await fetch("https://xqr.co/api/v1/workspace/usage", { headers: { Authorization: "Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", },});
const { data } = await response.json();const pct = (data.usage.links_created_this_month / data.limits.links_per_month) * 100;console.log(`Link usage: ${pct.toFixed(1)}%`);import httpx
response = httpx.get( "https://xqr.co/api/v1/workspace/usage", headers={ "Authorization": "Bearer xqr_pk_a1b2c3d4.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", },)
data = response.json()["data"]usage = data["usage"]limits = data["limits"]pct = (usage["links_created_this_month"] / limits["links_per_month"]) * 100print(f"Link usage: {pct:.1f}%")Response
200 OK
Usage, limits, and feature availability.
{ "data": { "plan": "pro", "usage": { "links_created_this_month": 142, "api_calls_this_month": 8530, "total_links": 1247, "total_qr_templates": 18, "total_bio_pages": 5, "storage_bytes": 52428800, "storage_mb": 50.0 }, "limits": { "links_per_month": 5000, "dynamic_qr": 500, "bio_pages": 25, "storage_mb": 500, "api_calls_per_month": 50000, "qr_templates": 100 }, "features": { "routing_rules": true, "csv_export": true, "bulk_ops": true, "ad_free": true } }, "meta": { "request_id": "req_6f7a8b9c0d1e2f34", "rate_limit": { "limit": 600, "remaining": 598, "reset": 1742572800 } }}Was this page helpful?
Thanks for your feedback!