{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/firma-dev/main/json-schema/firma-dev-workspace-settings-schema.json",
  "title": "WorkspaceSettings",
  "x-generated": "2026-09-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/firma-dev-workspace-settings-api-openapi.yml#/components/schemas/WorkspaceSettings",
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "description": "Workspace name"
    },
    "team_email": {
      "type": "string",
      "format": "email",
      "description": "Workspace contact email"
    },
    "timezone": {
      "type": "string",
      "description": "Workspace timezone"
    },
    "language": {
      "type": "string",
      "description": "Workspace language for email templates",
      "enum": [
        "en",
        "es",
        "it",
        "pt",
        "fr",
        "de",
        "el",
        "ru",
        "pl",
        "cs",
        "sv",
        "nl",
        "ro",
        "nb",
        "ca"
      ],
      "default": "en"
    },
    "signing_request_email_header": {
      "type": "string",
      "description": "Custom email header text"
    },
    "signing_request_email_body": {
      "type": "string",
      "description": "Custom HTML email body"
    },
    "show_credit_cost_in_editor": {
      "type": "boolean",
      "description": "Whether to display credit cost in embedded template and signing request editors",
      "default": true
    },
    "require_otp_verification": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether signers must verify their email via OTP before accessing documents. null = inherit from company setting, true = require OTP, false = do not require OTP"
    },
    "require_terms_acceptance": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether signers must accept terms before signing. null inherits the company-level setting."
    },
    "disable_guided_navigation": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Disable automatic scrolling to the next required field during signing. Inherits from workspace or company if not set."
    },
    "show_signature_frame": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether to render a visual frame with Signature ID around signatures in completed PDFs. null = inherit from company setting (default enabled), true = show frame, false = hide frame"
    },
    "allow_presigning_download": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Allow signers to download the original document before signing. null inherits the company-level setting."
    },
    "show_partial_watermark": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Show an IN PROGRESS watermark on partial PDF downloads when not all signers have completed. null inherits the company-level setting."
    },
    "show_qr_code": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Show a QR code on the signing page that lets signers continue on their phone. null inherits the company-level setting."
    },
    "color_primary": {
      "type": [
        "string",
        "null"
      ],
      "description": "Primary color override (#rrggbb hex). Null to inherit from company."
    },
    "color_primary_fg": {
      "type": [
        "string",
        "null"
      ],
      "description": "Primary foreground color override. Null to inherit."
    },
    "color_background": {
      "type": [
        "string",
        "null"
      ],
      "description": "Background color override. Null to inherit."
    },
    "color_foreground": {
      "type": [
        "string",
        "null"
      ],
      "description": "Foreground/text color override. Null to inherit."
    },
    "color_card": {
      "type": [
        "string",
        "null"
      ],
      "description": "Card background color override. Null to inherit."
    },
    "color_border": {
      "type": [
        "string",
        "null"
      ],
      "description": "Border color override. Null to inherit."
    },
    "color_accent": {
      "type": [
        "string",
        "null"
      ],
      "description": "Editor chrome accent color. Null to inherit."
    },
    "color_accent_fg": {
      "type": [
        "string",
        "null"
      ],
      "description": "Foreground color on accent surfaces. Null to inherit."
    },
    "color_canvas": {
      "type": [
        "string",
        "null"
      ],
      "description": "Editor document-canvas surround color. Null to inherit."
    },
    "color_muted": {
      "type": [
        "string",
        "null"
      ],
      "description": "Muted surface color. Null to inherit."
    },
    "color_muted_fg": {
      "type": [
        "string",
        "null"
      ],
      "description": "Muted text color. Null to inherit."
    },
    "email_local_part": {
      "type": [
        "string",
        "null"
      ],
      "description": "The local-part (before the @) of the sender email address. Null to inherit from company setting. Only applies when a verified custom domain is configured.",
      "pattern": "^[a-z0-9]([a-z0-9._-]*[a-z0-9])?$",
      "minLength": 1,
      "maxLength": 64
    },
    "signing_button_label_overrides": {
      "type": [
        "object",
        "null"
      ],
      "description": "Per-language custom button labels for the signing view. Keys are language codes (en, de, etc.); values are objects mapping translation keys to custom text. Null to use defaults.",
      "additionalProperties": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      }
    },
    "completion_title": {
      "type": [
        "string",
        "null"
      ],
      "description": "Heading shown on the completion page after signing. Null inherits the company-level setting; the built-in translated heading is used when unset at every level.",
      "maxLength": 200
    },
    "completion_message": {
      "type": [
        "string",
        "null"
      ],
      "description": "Body text shown on the completion page after signing. Null inherits the company-level setting; the built-in translated message is used when unset at every level.",
      "maxLength": 1000
    },
    "completion_redirect_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "URL the signer is redirected to from the completion page. Must use https://. Null inherits the company-level setting; no redirect happens when unset at every level. The completion page only honors this server-resolved URL.",
      "pattern": "^https://",
      "maxLength": 2000
    },
    "completion_redirect_delay": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Seconds the completion page waits before redirecting (0 redirects immediately). Only applies when a redirect URL resolves. Null inherits the company-level setting; the page falls back to 5 seconds when unset at every level.",
      "minimum": 0,
      "maximum": 30
    }
  },
  "required": [
    "workspace_id"
  ]
}