Set customer-unit cap
Sets the cap on this customer unit for one credits currency. Returns changed: false without creating a version when the effective timeline is unchanged; otherwise records a new version, preserving earlier rows. The newest version wins where they overlap. effectiveFrom controls applicability; schedule defines monthly UTC boundaries independently. Omit schedule to inherit the version covering effectiveFrom, or use the creation-time UTC day if none applies. Select the currency with creditsCurrencyId in the body; it may be omitted only when the organization has exactly one credits currency. A cap covers the unit and every unit beneath it, so a cap on the customer's root unit covers every unit of that customer; spend from a signal that names no unit counts toward no cap. 404 when the customer or the unit does not exist. 409 for customers on seat-based billing, a deleted unit (CUSTOMER_UNIT_DELETED) or a draft (CUSTOMER_UNIT_DRAFT). Use the value returned as customer.id, for example cus_abc123; if you have your own customer ID, use the /api/v2/customers/external/{externalId}/… twin.
Request
- Base URL: https://api.agentpaid.io/api/v2
- URL: https://api.agentpaid.io/api/v2/customers/{id}/customer-units/{externalCustomerUnitId}/cap
- Auth: HTTP bearer
Path parameters
Paid customer display id
Your own id for the unit (its externalId), unique within this customer.
Request body
Response
200
Changes
No recorded changes to this operation across all 1 revision of this API.