{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reportingninja-com/json-schema/reportingninja-com-brand-templates-create-request-schema.json",
  "title": "BrandTemplatesCreateRequest",
  "description": "Every setting is optional: what a body does not carry takes the default of the product, and a new template is born with the logo of the platform.",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reportingninja-com-openapi.json#/components/schemas/BrandTemplatesCreateRequest",
  "type": "object",
  "required": [
    "name"
  ],
  "additionalProperties": false,
  "properties": {
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "internal_notes": {
      "description": "A note for the account's own staff. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "font_family": {
      "description": "The font of the PDF. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "margin_top": {
      "description": "The top margin of the page, in points. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "margin_bottom": {
      "description": "The bottom margin of the page, in points. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "margin_left": {
      "description": "The left margin of the page, in points. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "margin_right": {
      "description": "The right margin of the page, in points. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "report_title_text_color": {
      "description": "The colour of the title of the cover, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "report_title_font_size": {
      "description": "The size of the title of the cover. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "report_title_font_weight": {
      "description": "The weight of the title of the cover. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "normal",
            "bold"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "report_subtitle_text_color": {
      "description": "The colour of the subtitle of the cover, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "report_subtitle_font_size": {
      "description": "The size of the subtitle of the cover. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "report_subtitle_font_weight": {
      "description": "The weight of the subtitle of the cover. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "normal",
            "bold"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "section_name_text_color": {
      "description": "The colour of the name of a section, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "section_name_font_size": {
      "description": "The size of the name of a section. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "section_name_font_weight": {
      "description": "The weight of the name of a section. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "normal",
            "bold"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "date_range_text_color": {
      "description": "The colour of the period line of a section, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "date_range_font_size": {
      "description": "The size of the period line of a section. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "date_range_font_weight": {
      "description": "The weight of the period line of a section. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "normal",
            "bold"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "component_name_text_color": {
      "description": "The colour of the name of a widget, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "component_name_font_size": {
      "description": "The size of the name of a widget. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "component_name_font_weight": {
      "description": "The weight of the name of a widget. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "normal",
            "bold"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "footer_text_color": {
      "description": "The colour of the footer, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "footer_font_size": {
      "description": "The size of the footer. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "footer_font_weight": {
      "description": "The weight of the footer. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "normal",
            "bold"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "include_logo": {
      "description": "Whether the report prints the logo. It cannot be true on a template that carries none, and setting it FALSE REMOVES the file, which is what the settings window of the application does when the checkbox is unticked: nothing keeps a copy, so switching it on again needs a new upload through /v1/brand-templates/set-logo. The answer says so with a LOGO_REMOVED warning. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "include_section_line": {
      "description": "Whether a line is drawn under the name of a section. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "section_line_color": {
      "description": "The colour of that line, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "component_name_background_color": {
      "description": "The background behind the name of a widget, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "component_content_text_color": {
      "description": "The colour of the content of a widget, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "component_content_font_size": {
      "description": "The size of the content of a widget. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "colors": {
      "description": "The palette the charts are drawn with, in order, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "footer_content": {
      "description": "The text of the footer. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "include_footer_line": {
      "description": "Whether a line is drawn above the footer. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "footer_line_color": {
      "description": "The colour of that line, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "primary_color": {
      "description": "The main colour of the brand, as #RRGGBB. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "cover_style": {
      "description": "The style the front cover is drawn with. A template that never picked one is read as plain, which is what it is drawn with. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "gradient",
            "plain",
            "aurora",
            "circles",
            "waves",
            "diagonal",
            "rings",
            "dots",
            "bubbles",
            "contours",
            "blocks",
            "image"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "cover_tone": {
      "description": "The tone of the text of an inverted cover (cover_inverted true); on white paper the text is always dark. auto takes it from the primary colour and is what a template that never picked one is read as. A change to light or custom on white paper is saved and answered with an INVALID_VALUE warning, because it does not print. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "auto",
            "light",
            "dark",
            "custom"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "cover_text_color": {
      "description": "The colour of the cover text, used only by the custom tone on an inverted cover, as #RRGGBB. A change that does not print (white paper, or another tone) is saved and answered with an INVALID_VALUE warning. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "cover_inverted": {
      "description": "Whether the cover is drawn on a coloured surface instead of white paper. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "prepared_by": {
      "description": "The line naming who prepared the report. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "prepared_for": {
      "description": "The line naming who it was prepared for. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "toc_style": {
      "description": "The style of the table of contents. A template that never picked one is read as timeline. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "cards",
            "rule",
            "band",
            "timeline"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "portal_header_style": {
      "description": "The header the client portal wears. none draws no header and is what a template that never picked one is read as. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "none",
            "letterhead",
            "card",
            "band"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "portal_header_logo": {
      "description": "Whether that header carries the logo. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "web_font_family": {
      "description": "The font of the client portal and of a public link. app_default is the font of the application. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "brand_template_key": {
      "description": "Ignored on a write: part of what a read publishes and not part of what a write stores. It is accepted so the object /v1/brand-templates/get answers can be sent straight back, and it comes back as a READ_ONLY_FIELD_IGNORED warning.",
      "readOnly": true,
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "is_default": {
      "description": "Whether new reports and client portal views of the account are born with this template, the checkbox of the brand template window. One per account: true makes it this one, false on the default leaves the account with none (the brand of the platform), and false on any other or the value it already has changes nothing. Left out or null, it is left as it is.",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "is_system": {
      "description": "Ignored on a write: part of what a read publishes and not part of what a write stores. It is accepted so the object /v1/brand-templates/get answers can be sent straight back, and it comes back as a READ_ONLY_FIELD_IGNORED warning.",
      "readOnly": true,
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "logo": {
      "description": "Ignored on a write: part of what a read publishes and not part of what a write stores. It is accepted so the object /v1/brand-templates/get answers can be sent straight back, and it comes back as a READ_ONLY_FIELD_IGNORED warning.",
      "readOnly": true,
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "cover_image": {
      "description": "Ignored on a write: part of what a read publishes and not part of what a write stores. It is accepted so the object /v1/brand-templates/get answers can be sent straight back, and it comes back as a READ_ONLY_FIELD_IGNORED warning.",
      "readOnly": true,
      "anyOf": [
        {
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "dry_run": {
      "type": "boolean",
      "description": "Validate everything and write nothing."
    },
    "idempotency_key": {
      "type": "string",
      "description": "Replays the answer of an identical call for 24 hours."
    }
  }
}