---
updatedAt: 2025-08-05T00:31:26.000Z
agentTools:
  projectIndex: https://docs.ascerta.com/llms.txt
---

# Create a new Use Case default limit configuration

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Pay-i",
    "description": "Pay-i API",
    "version": "v1"
  },
  "paths": {
    "/api/v1/use_cases/definitions/{use_case_name}/limit_config": {
      "post": {
        "tags": [
          "Use Cases"
        ],
        "summary": "Create a new Use Case default limit configuration",
        "operationId": "createUseCaseLimitConfig",
        "parameters": [
          {
            "name": "use_case_name",
            "in": "path",
            "description": "Use Case name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Limit configuration",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayI.Common.Models.BudgetManagement.CreateLimitBase"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/PayI.Common.Models.BudgetManagement.CreateLimitBase"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayI.Calculator.Models.UseCaseDefinitionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayI.Common.Models.ApiError"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayI.Common.Models.ApiError"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayI.Common.Models.ApiError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PayI.Calculator.Models.UseCaseDefinitionResponse": {
        "required": [
          "description",
          "name",
          "request_id"
        ],
        "type": "object",
        "properties": {
          "request_id": {
            "minLength": 1,
            "type": "string"
          },
          "name": {
            "minLength": 1,
            "type": "string"
          },
          "description": {
            "minLength": 1,
            "type": "string"
          },
          "logging_enabled": {
            "type": "boolean",
            "nullable": true
          },
          "limit_config": {
            "type": "object",
            "allOf": [
              {
                "$ref": "#/components/schemas/PayI.Common.Models.BudgetManagement.CreateLimitBase"
              }
            ],
            "nullable": true
          },
          "type_version": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "PayI.Common.Data.BudgetManagement.Enums.LimitType": {
        "enum": [
          "block",
          "allow"
        ],
        "type": "string"
      },
      "PayI.Common.Models.ApiError": {
        "required": [
          "message",
          "statusCode"
        ],
        "type": "object",
        "properties": {
          "message": {
            "minLength": 1,
            "type": "string"
          },
          "statusCode": {
            "type": "integer",
            "format": "int32"
          },
          "xproxy_error": {
            "$ref": "#/components/schemas/PayI.Common.Models.ProxyError"
          }
        },
        "additionalProperties": false
      },
      "PayI.Common.Models.BudgetManagement.CreateLimitBase": {
        "required": [
          "max"
        ],
        "type": "object",
        "properties": {
          "properties": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "nullable": true
            },
            "nullable": true
          },
          "max": {
            "type": "number",
            "format": "double"
          },
          "threshold": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "limit_type": {
            "$ref": "#/components/schemas/PayI.Common.Data.BudgetManagement.Enums.LimitType"
          }
        },
        "additionalProperties": false
      },
      "PayI.Common.Models.ProxyError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Pay_I_API_Key": {
        "type": "apiKey",
        "description": "Pay-I API Key. Example: \"{apikey}\"",
        "name": "xProxy-api-key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Pay_I_API_Key": []
    }
  ],
  "tags": [
    {
      "name": "Use Cases",
      "description": "Use Cases"
    }
  ],
  "servers": [
    {
      "url": "https://api.pay-i.com"
    }
  ]
}
```