{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/sendgrid/main/json-schema/sendgrid-subuser-credits-request-schema.json", "title": "Subuser Credits reset request body", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/sendgrid-subusers-api-openapi.yml#/components/schemas/SubuserCreditsRequest", "type": "object", "properties": { "type": { "type": "string", "description": "Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis.", "$ref": "#/$defs/Type1" }, "reset_frequency": { "type": "string", "description": "The frequency with which a Subuser's credits are reset if `type` is set to `recurring`. Do _not_ include `reset_frequency` if you choose a reset `type` value of `unlimited` or `nonrecurring`.", "$ref": "#/$defs/ResetFrequency1" }, "total": { "type": "integer", "description": "Total number of credits to which the Subuser is to be reset. If `type` is `nonrecurring` then the Subuser's credits will be reset to `total` on a one-time basis. If `type` is `recurring` then the Subuser's credits will be reset to `total` every time a reset is scheduled in accordance with the `reset_frequency`. Do _not_ include `total` if you choose a reset `type` value of `unlimited`.", "minimum": 1 } }, "required": [ "type" ], "$defs": { "ResetFrequency1": { "type": "string", "enum": [ "monthly", "weekly", "daily" ] }, "Type1": { "type": "string", "enum": [ "unlimited", "recurring", "nonrecurring" ] } } }