# Create or update a billing agreement (/api/usage-agreements/save-usage-agreement)

`POST https://api.comecero.com/api/v1/usage/agreements`

Links your id for a customer (the `external_customer_id` your app sends to the usage meter) to one of their Comecero subscriptions, which pays for the usage. Send an existing `agreement_id` to update it, and `effective_to` to end it. It answers `201` for a create and for an update. Only one agreement per customer can cover any hour, and the currency must be the subscription's. Secret and trusted tokens may call it; a limited token may not (`403`).

Request body: the `usage_billing_agreement_request` schema.

Responses: 201, 400, 401, 403, 409, 500.

Full schemas: operation `save_usage_agreement` in /openapi.json.