Skip to main content
Set, change or clear target values of one quota, for one or more users. Returns the changes made. Only the cells listed are written: a user or a period left out keeps its value, so this adjusts the grid, never replaces it. Read the current values with list_quota_values first when the change is relative to them. Pass value: null to clear a cell. On a value synchronized from an integration, null cancels the manual overwrite and brings the synchronized value back instead. The call is all or nothing: an unknown user, a period not in the quota’s frequency format, a user or a period listed twice, a currency the user cannot hold, or more than the cap refuses the whole call before anything is written. A call writes at most 100 values, all users together, and a currency change also counts the user’s other values it rewrites. An archived quota is refused, through a view too. Restoring it takes full access to quotas: call archive_quota with archived false. Without that access, ask someone who has it. Statements are not recalculated by this call, just as when a target is edited in the web app. To refresh them, call recalculate_statements on the users and the periods written. The quota’s environment (live or a sandbox) is the one the quota lives in. Without full write access to quotas, write through a view of the quota shared with you with edit rights, passed as view_id: only the users its filter holds can be written. The views of the returned quota have a null access: get_quota says who can read a view. Requires write permission on quotas, or a view shared with edit rights. Every write to the live environment is recorded in the audit trail as the Qobra MCP agent; writes to a sandbox are not audited.

Parameters

Body

string
required
Id of the quota, from list_quotas or create_quota, a sandbox’s quota included.
object[]
required
The targets to write, grouped by user: at most 100 values per call, all users together.
string
Id of one of the quota’s views, to write through. Required when your write access comes from shared views (only users its filter holds can be written); ignored with full write access.

Example

Response

Body

object
object[]
Every cell this call changed; a cell sent at its current value is not listed, so empty means nothing changed.