# prov.mandate.grants.setOverLimitSettings

prov.mandate.grants.setOverLimitSettings in Node SDK. Change the settings for the locks given (an admin key).

## Signature

```ts
prov.mandate.grants.setOverLimitSettings(params: { overLimit?: OverLimitSettings; requireSamePerson?: boolean; atVerify?: "settings" | "refuse"; /** #147: an account key can't delegate; the agent holding a mandate delegates with its own grant. */ requireHolderProof?: boolean; /** #158: ask the grantor before a hand-off outside the account (`ask`), or refuse every one. */ external?: "ask" | "refuse"; /** #158: the budget at or under which a hand-off that doesn't say allows offline checks. */ externalOnlineAbove?: number; }): Promise<DelegationSetting>
```

## Parameters

- `params` ({ overLimit?: OverLimitSettings; requireSamePerson?: boolean; atVerify?: "settings" | "refuse"; /** #147: an account key can't delegate; the agent holding a mandate delegates with its own grant. */ requireHolderProof?: boolean; /** #158: ask the grantor before a hand-off outside the account (`ask`), or refuse every one. */ external?: "ask" | "refuse"; /** #158: the budget at or under which a hand-off that doesn't say allows offline checks. */ externalOnlineAbove?: number; })

## Returns

`Promise<DelegationSetting>`

## HTTP operation

[`PUT /v1/mandate/settings/delegation`](https://provenanceauth.com/docs/api/grants.md#put-v1-mandate-settings-delegation): Set the over-limit settings

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`insufficient_role`](https://provenanceauth.com/docs/platform/errors.md#insufficient_role)
- [`invalid_json`](https://provenanceauth.com/docs/platform/errors.md#invalid_json)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)

## Example

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/mandate/settings/delegation`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "over_limit": {
      "budget": {
        "action": "ask",
        "refuse_over": {
          "percent": 10
        }
      }
    },
    "require_same_person": true
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.put(f"{api}/v1/mandate/settings/delegation", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "over_limit": {
        "budget": {
            "action": "ask",
            "refuse_over": {
                "percent": 10
            }
        }
    },
    "require_same_person": True
}).json()
```
