Quotas

The quotas endpoint allows you to retrieve information about your account's current usage and remaining quota for both documents and templates.

Request

GET /v1/account/quotas

Response

{
  "allocated": {
    "subscriptions": {
      "docs": number,
      "templates": number
    },
    "credits": {
      "docs": number,
      "templates": number
    },
    "total": {
      "docs": number,
      "templates": number
    }
  },
  "remaining": {
    "subscriptions": {
      "docs": number,
      "templates": number
    },
    "credits": {
      "docs": number,
      "templates": number
    },
    "total": {
      "docs": number,
      "templates": number
    }
  }
}

Response Fields

FieldTypeDescription
allocated.subscriptions.docsnumberTotal number of monthly document generation requests allowed from your subscriptions
allocated.subscriptions.templatesnumberTotal number of templates allowed from your subscriptions
allocated.credits.docsnumberTotal number of document generation requests allowed from your credits
allocated.credits.templatesnumberTotal number of templates allowed from your credits
allocated.total.docsnumberTotal number of document generation requests allowed from your subscriptions and credits combined
allocated.total.templatesnumberTotal number of templates allowed from your subscriptions and credits combined
remaining.subscriptions.docsnumberRemaining number of monthly document generation requests from your subscriptions
remaining.subscriptions.templatesnumberRemaining number of templates from your subscriptions
remaining.credits.docsnumberRemaining number of document generation requests from your credits
remaining.credits.templatesnumberRemaining number of templates from your credits
remaining.total.docsnumberTotal remaining number of document generation requests from your subscriptions and credits combined
remaining.total.templatesnumberTotal remaining number of templates from your subscriptions and credits combined

Examples

const apiKey = "Your_API_Key";

const response = await fetch("https://templatedocs.io/api/v1/account/quotas", {
    headers: {
        "Authorization": `Bearer ${apiKey}`
    }
});
const quotas = await response.json();
console.log(quotas);