> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qobra.co/llms.txt
> Use this file to discover all available pages before exploring further.

# update_quota_values

> Set, change or clear target values of one quota, for one or more users. All or nothing, at most 100 values per call.

Set, change or clear target values of one quota, for one or more users.

Only the cells listed are written: a user or a period left out keeps its value,
so this is an adjustment, never a replacement of the whole quota. 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 or a period listed twice refuses the whole call before
anything is written. A call writes at most 100 values, all users together.

Statements are not recalculated by this call, just as when a target is edited
in the web app — they pick the new values up at the next automatic
recalculation, or when someone refreshes them.

The quota's environment (live or a sandbox) is the one the quota lives in.

Requires write permission on quotas. Available only where the Qobra write tools
beta is enabled. 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

<Accordion title="Body" defaultOpen>
  <ParamField body="quota_id" type="string" required>
    Id of the quota whose targets to write — the id list\_quotas returns, or
    the one create\_quota just returned.
  </ParamField>

  <ParamField body="values" type="object[]" required>
    The targets to write, grouped by user. At most 100 values per call, all
    users together.

    <Expandable title="object properties">
      <ParamField body="user_id" type="string" required>
        Id of the user — the id a user reference carries.
      </ParamField>

      <ParamField body="currency" type="string">
        Currency of this user's amount targets, as a code (EUR, USD…). It
        applies to every value this user has on the quota, not only to the
        ones sent here. Omit it to keep the user's current currency; ignored
        on a percentage or float quota.
      </ParamField>

      <ParamField body="values" type="object[]" required>
        The cells to write for this user, one per period.

        <Expandable title="object properties">
          <ParamField body="period" type="string" required>
            Period of the target, in the quota's own frequency format:
            YYYY-MM (monthly), YYYY-QX (quarterly), YYYY-SX (semesterly) or
            YYYY (annually).
          </ParamField>

          <ParamField body="value" type="number" required>
            The target, in the unit list\_quota\_values returns. null clears
            it — on a value synchronized from an integration, null cancels
            the manual overwrite and brings the synchronized value back
            instead, since a synchronized value is never deleted.
          </ParamField>
        </Expandable>
      </ParamField>
    </Expandable>
  </ParamField>
</Accordion>

## Example

```json theme={null}
{
  "quota_id": "66a0b1c2d3e4f50012345678",
  "values": [
    {
      "user_id": "66a0b1c2d3e4f50012340001",
      "currency": "EUR",
      "values": [
        { "period": "2026-10", "value": 50000 },
        { "period": "2026-11", "value": 55000 }
      ]
    },
    {
      "user_id": "66a0b1c2d3e4f50012340002",
      "values": [{ "period": "2026-10", "value": null }]
    }
  ]
}
```

## Response

<Accordion title="Body" defaultOpen>
  <ResponseField name="quota" type="object">
    The quota the values were written on — the same row list\_quotas returns.
    See [`list_quotas`](/mcp_documentation/tools/list_quotas) for the full
    field breakdown.
  </ResponseField>

  <ResponseField name="changes" type="object[]">
    Every cell this call changed. A cell sent at the value it already held is
    not listed, so an empty list means nothing changed.

    <Expandable title="object properties">
      <ResponseField name="value" type="any">
        The value after this call; null when the cell was cleared.
      </ResponseField>

      <ResponseField name="currency" type="string">
        Currency code of the value, only for an amount quota.
      </ResponseField>

      <ResponseField name="resource_url" type="string">
        Deep link to open the quota in the Qobra web app.
      </ResponseField>

      <ResponseField name="user" type="object">
        <Expandable title="object properties">
          <ResponseField name="id" type="string" />

          <ResponseField name="email" type="string" />

          <ResponseField name="name" type="string" />
        </Expandable>
      </ResponseField>

      <ResponseField name="period" type="string" />

      <ResponseField name="action" type="string">
        What happened to the cell: created (it was empty), updated (new
        value), cleared (the value was removed), or overwrite\_cancelled (a
        manual overwrite of a synchronized value was dropped, bringing the
        synchronized value back). One of: `created`, `updated`, `cleared`,
        `overwrite_cancelled`.
      </ResponseField>

      <ResponseField name="previous_value" type="any">
        The value before this call; null when the cell was empty.
      </ResponseField>
    </Expandable>
  </ResponseField>
</Accordion>
