# prov.authorize.issuer.card_limits.set

prov.authorize.issuer.card_limits.set in Python SDK. Create or replace the limit for one agent on one card (`agent_key` `*` or `card:*` too).

## Signature

```python
prov.authorize.issuer.card_limits.set(**body: Any = …) -> Any
```

## Parameters

- `**body` (Any, optional)

## Returns

`Any`

## HTTP operation

[`POST /v1/authorize/issuer_card_limits`](https://provenanceauth.com/docs/api/issuer-controls.md#post-v1-authorize-issuer-card-limits): Set a card limit for an agent

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`card_number_refused`](https://provenanceauth.com/docs/platform/errors.md#card_number_refused)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`plan_required`](https://provenanceauth.com/docs/platform/errors.md#plan_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

## Example

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
  }),
})).json();
const program = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_card_limits`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "program_id": program,
    "card_token": "card_tok_fernhill_3",
    "agent_key": "token_requestor:40010030273",
    "window": "month",
    "cap": 50000,
    "currency": "USD",
    "per_transaction": 25000,
    "locks": {
      "mccs": [
        "5732",
        "5734"
      ]
    }
  }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/authorize/issuer_programs", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "name": "Fernhill agent cards",
    "processor": "lithic",
    "mode": "live"
}).json()
program = step1["id"]
data = httpx.post(f"{api}/v1/authorize/issuer_card_limits", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "program_id": program,
    "card_token": "card_tok_fernhill_3",
    "agent_key": "token_requestor:40010030273",
    "window": "month",
    "cap": 50000,
    "currency": "USD",
    "per_transaction": 25000,
    "locks": {
        "mccs": [
            "5732",
            "5734"
        ]
    }
}).json()
```
