{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recurly/json-schema/recurly-custom-fields-schema.json",
  "title": "Custom Fields",
  "description": "The custom fields will only be altered when they are included in a request. Sending an empty array will not remove any existing values. To remove a field send the name with a null or empty value.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recurly-accounts-api-openapi.yml#/components/schemas/CustomFields",
  "type": "array",
  "items": {
    "$ref": "#/$defs/CustomField"
  },
  "$defs": {
    "CustomField": {
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 50,
          "pattern": "/^[a-z0-9_-]+$/i",
          "title": "Field name",
          "description": "Fields must be created in the UI before values can be assigned to them."
        },
        "value": {
          "type": "string",
          "maxLength": 255,
          "title": "Field value",
          "description": "Any values that resemble a credit card number or security code (CVV/CVC) will be rejected."
        }
      }
    }
  }
}