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
Field | Type | Description |
---|---|---|
allocated.subscriptions.docs | number | Total number of monthly document generation requests allowed from your subscriptions |
allocated.subscriptions.templates | number | Total number of templates allowed from your subscriptions |
allocated.credits.docs | number | Total number of document generation requests allowed from your credits |
allocated.credits.templates | number | Total number of templates allowed from your credits |
allocated.total.docs | number | Total number of document generation requests allowed from your subscriptions and credits combined |
allocated.total.templates | number | Total number of templates allowed from your subscriptions and credits combined |
remaining.subscriptions.docs | number | Remaining number of monthly document generation requests from your subscriptions |
remaining.subscriptions.templates | number | Remaining number of templates from your subscriptions |
remaining.credits.docs | number | Remaining number of document generation requests from your credits |
remaining.credits.templates | number | Remaining number of templates from your credits |
remaining.total.docs | number | Total remaining number of document generation requests from your subscriptions and credits combined |
remaining.total.templates | number | Total 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);