---
title: "Retrieve automation usage"
method: GET
path: "/companies/{company}/automations/usage"
tags: ["Automations"]
---

# Retrieve automation usage

`GET /companies/{company}/automations/usage`

## Request

- Base URL: `https://api.factuarea.com/v1`
- URL: `https://api.factuarea.com/v1/companies/{company}/automations/usage`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Read the automation runs consumed in the current period, the plan quota, the reset instant and the warning percentage.
- `limit: null` means no automatic ceiling (Enterprise is by contract).
- It is the counter the engine enforces; purging history never changes it.

## Path parameters

- `company` string, uuid, required

## Headers

- `Factuarea-Version` string, date

## Response `200`

- object
  - `data` AutomationUsage, required: Current active automation rules and automation runs consumed this period, with the limits of the plan. Activating a rule checks the active-rule cap; the execution budget is checked only when admitting a run. Read both counters to anticipate reaching either limit. The figure comes from the same counter the engine applies when admitting a run, so it advances by exactly N after N admitted runs and does NOT change when run history is purged.
    - `object` 'automation_usage', required: Always `automation_usage`.
    - `consumed` integer, required: Automation runs already consumed in the current period.
    - `limit` integer, nullable, required: Cap of the plan for the period, or `null` when there is no automatic ceiling. Enterprise capacity is agreed by contract. `null` is not an unknown value or zero: omit the progress bar.
    - `reset_at` string, date-time, required: When the counter resets — the first instant of the next period (ISO 8601). Returned already resolved so no client has to derive it.
    - `period` string, required: Identifier of the current period, `YYYY-MM`.
    - `threshold_percent` integer, required: Consumption percentage at which the platform starts warning the account owner. It travels so your own warning and ours cannot drift apart.
    - `active_rules` object, required: Current active rules and the cap enforced when activating a rule. Draft, paused and deleted rules do not consume this cap.
      - `count` integer, required: Active, non-deleted rules belonging to this company.
      - `limit` integer, nullable, required: Active-rule cap of the plan. Zero permits no activations; null means no automatic ceiling. Enterprise capacity is agreed by contract.

## Other responses

- `400`: `parameter_unknown` with `subcode` `retired_active_profile_header`: the retired `X-Active-Profile` header was sent; the company goes in the path. `parameter_invalid_format` on `Factuarea-Version`: the header is not a `YYYY-MM-DD` date. `unsupported_api_version`: the `Factuarea-Version` date is not a supported version.
- `401`: Missing or invalid API key.
- `403`: The request is authenticated but not allowed: the API key lacks the required scope (`insufficient_scope`), the plan does not include the public API or this feature (`addon_not_active`, `feature_not_available_in_plan`), or the module is not available with a test key (`module_not_available_in_sandbox`). `company_inactive`: the company in the path is deactivated; reactivate it to operate.
- `404`: The requested resource does not exist or belongs to another company. `profile_not_found`: the company in the path does not exist, is not in the API key scope or belongs to the other environment (live or test).
- `429`: Rate limit exceeded. Retry after the duration in `Retry-After`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/factuarea/apis/factuarea-public-api.md) · [All operations](https://skmtc.dev/factuarea/apis/factuarea-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/factuarea/apis/factuarea-public-api/revisions/718e77934422?raw)
