# Raise a customer's spending limit with their consent (/api/usage/raise-customer-spend-limit)

`PATCH https://api.comecero.com/api/v1/customers/{customer_id}/usage/{subscription_id}/spend_limit`

Accepts a raise quoted with `POST .../spend_limit/quotes` (`operation` `raise`): the limit becomes the quote's `amount`, and the customer's consent (the quote's `consent_text`, when and from where) is kept in the change log as evidence. Only from the customer's own login, before the quote's `expires_at` (10 minutes, never past the end of the billing period it was made in), in that same period, and only while the limit and the shop's settings are as they were quoted. The same quote sent again answers what the first request answered and changes nothing more. An `Idempotency-Key` header is required, new for each change, so a retry after a timeout answers the first answer (for a day) even if the change was made but its answer was lost; the key with another body is refused. The customer gets an email confirming it (notification `subscription:spend_limit_changed`, when it is on) and you get the `usage:spend_limit_changed` webhook. A plain `PUT` still sets, lowers or clears the limit.

## Parameters

- `Idempotency-Key` (header, required): Required. Names one change: the same request again with the same key (after a timeout, say) changes nothing more and answers as the first one did, for a day. 1 to 128 printable ASCII characters, sent once; missing or empty is refused (`400`, reference `UbV150`). Use a new random key, such as a UUID, for each change you mean to make. The same key with another body is refused (`409`, reference `UbV151`).

Request body: the `usage_spend_limit_raise_request` schema.

Responses: 200, 400, 401, 403, 404, 409, 500.

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