Skip to main content
GET
Get CFDI usage/quota for the current billing month
Returns how many CFDI the organization has stamped this calendar month (Mexico City time) against its plan’s included quota.
This endpoint takes no organizationId in the URL. Authenticate with either a Supabase Bearer session (send the X-Organization-Id: <org-id> header — the user must be a member of that organization) or an API key (the organization resolves automatically from the key; any X-Organization-Id header sent alongside an API key is ignored).

Authentication

Accepts either:
  • A Supabase Bearer session (Authorization: Bearer <token>) with the X-Organization-Id: <org-id> header — the authenticated user must be a member of that organization.
  • An API key (X-API-Key: sk_...) with the read:invoices scope — the organization is resolved from the key itself.

Example Request

cURL
TypeScript SDK
With an API key, omit the X-Organization-Id header (and the SDK’s organizationId argument) entirely — it’s resolved from the key:
TypeScript SDK (API key)

Example Response

object
CFDI emitidos este mes (horario de Ciudad de México) por canal de origen, sumando sandbox y producción. Claves: web, api, sdk, cli, mcp y unknown (CFDI sin canal registrado). A diferencia de cfdiUsedThisMonth, que solo cuenta producción, este desglose no afecta tu cuota.

Common Errors

400 Bad Request

Missing X-Organization-Id header on a session-authenticated request.

401 Unauthorized

Missing or invalid Bearer token / API key.

403 Forbidden

The authenticated user is not a member of the organization sent in X-Organization-Id, or the API key does not have the read:invoices scope.

Authorizations

X-API-Key
string
header
required

API Key for authentication (format: sk_...)

Headers

X-Organization-Id
string

Required for Supabase session auth. Ignored when authenticating with an API key (the organization resolves from the key).

Response

plan
enum<string>
required
Available options:
starter,
pro,
business,
enterprise
cfdiIncluded
object | null
required

null = ilimitado (plan enterprise)

Example:

500

cfdiUsedThisMonth
number
required
Example:

128

cfdiRemaining
object | null
required

null = ilimitado (plan enterprise)

Example:

372

periodResetsAt
string
required
Example:

"2026-09-01T06:00:00.000Z"

usagePct
number
required
Example:

70.5

projectedCostMxn
object | null
required

Costo estimado del excedente este mes en MXN — null en el plan enterprise

Example:

25

cfdiByChannelThisMonth
object
required

CFDI emitidos este mes (America/Mexico_City) por canal de origen, sumando sandbox y producción. unknown = CFDI sin canal registrado.

Example: