---
title: "Update a subscription lifetime usage"
method: PUT
path: "/subscriptions/{external_id}/lifetime_usage"
tags: ["subscriptions"]
---

# Update a subscription lifetime usage

`PUT /subscriptions/{external_id}/lifetime_usage`

This endpoint allows you to update the lifetime usage of a subscription.

## Request body

- LifetimeUsageInput
  - `lifetime_usage` object, required
    - `external_historical_usage_amount_cents` integer, required — The historical usage amount in cents for the subscription (provided by your own application).

## Response `200`

Subscription lifetime usage updated

- LifetimeUsage
  - `lifetime_usage` LifetimeUsageObject, required
    - `lago_id` string, uuid, required — Unique identifier assigned to the lifetime usage record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the lifetime usage record within the Lago system
    - `lago_subscription_id` string, uuid, required — Unique identifier assigned to the subscription record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription record within the Lago system
    - `external_subscription_id` string, required — The subscription external unique identifier (provided by your own application).
    - `external_historical_usage_amount_cents` integer, required — The historical usage amount in cents for the subscription (provided by your own application).
    - `invoiced_usage_amount_cents` integer, required — The total invoiced usage amount in cents for the subscription.
    - `current_usage_amount_cents` integer, required — The current usage amount in cents for the subscription on the current billing period.
    - `from_datetime` string, date-time, nullable, required — The recording start date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
    - `to_datetime` string, date-time, required — The recording end date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
    - `usage_thresholds` LifetimeUsageThresholdObject[] — Array of usage thresholds attached to the subscription's plan.
      - `amount_cents` integer, required — The usage threshold amount in cents.
      - `completion_ratio` number, required — The completion ratio of the usage threshold.
      - `reached_at` string, date-time, nullable, required — The date and time when the usage threshold was reached. The date and time must be in ISO 8601 format.

## Other responses

- `400` — Bad Request error
- `401` — Unauthorized error
- `404` — Not Found error
- `422` — Unprocessable entity error

---

[API](https://skmtc.dev/getlago/apis/lago-api-documentation.md) · [All operations](https://skmtc.dev/getlago/apis/lago-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getlago/lago-api-documentation/revisions/6e969ef3bb45/schema)
