{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-create-card-request-dto-schema.json",
  "title": "CreateCardRequestDto",
  "description": "Create a virtual charge card",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-cards-api-openapi.yml#/components/schemas/CreateCardRequestDto",
  "required": [
    "budgetId",
    "name",
    "userId"
  ],
  "type": "object",
  "properties": {
    "name": {
      "minLength": 1,
      "type": "string",
      "description": "Card name"
    },
    "userId": {
      "type": "string",
      "description": "BILL-generated ID or UUID of the user linked with the card"
    },
    "budgetId": {
      "type": "string",
      "description": "BILL-generated ID or UUID of the budget linked with the card"
    },
    "limit": {
      "type": [
        "number",
        "null"
      ],
      "description": "Card spend limit for the current budget period"
    },
    "recurringLimit": {
      "type": [
        "number",
        "null"
      ],
      "description": "Card spend limit for all future budget periods"
    },
    "expirationDate": {
      "type": [
        "string",
        "null"
      ],
      "description": "User-generated expiration date. The value is in the `yyyy-MM-dd` format. BILL automatically closes the card account on this date.\n\n**Note**: Use the `validThru` value in the response as the expiration date in a card payment. Do not use the `expirationDate` value for this operation.",
      "format": "date"
    },
    "shareBudgetFunds": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Set as `true` to share all the budget funds with the card. This option enables the card user to spend from unallocated budget funds when the allocation is empty."
    }
  }
}