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

# Recalculate Entitlements

Forces recalculation of entitlements for one or more customers.

## Mutation

<CodeGroup>
  ```graphql Mutation theme={null}
  mutation RecalculateEntitlements($input: RecalculateEntitlementsInput!) {
    recalculateEntitlements(input: $input) {
      taskId
    }
  }
  ```

  ```json Variables theme={null}
  {
    "input": {
      "customerIds": ["customer-123", "customer-456"],
      "environmentId": "env-123"
    }
  }
  ```

  ```json Response theme={null}
  {
    "data": {
      "recalculateEntitlements": {
        "taskId": "task-789"
      }
    }
  }
  ```
</CodeGroup>

## Parameters

<ParamField body="input" type="RecalculateEntitlementsInput" required>
  Input for recalculating entitlements

  <Expandable title="properties">
    <ParamField body="environmentId" type="UUID" required>
      Environment ID
    </ParamField>

    <ParamField body="customerIds" type="[String]">
      Specific customer IDs to recalculate (omit for all)
    </ParamField>
  </Expandable>
</ParamField>

## Return Type

Returns a `RecalculateEntitlementsResult` with a `taskId`.

## Common Use Cases

<AccordionGroup>
  <Accordion title="Sync issues">
    Force recalculation when entitlements appear out of sync.
  </Accordion>

  <Accordion title="After plan changes">
    Recalculate after making changes to plan entitlements.
  </Accordion>
</AccordionGroup>

## Related Operations

* [Entitlements State](/api-and-sdks/api-reference/queries/entitlements-state) - Query entitlements
