{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/strix-ai/json-schema/strix-ai-ticketing-integration-settings-update-schema.json",
  "title": "TicketingIntegrationSettingsUpdate",
  "description": "Updates for a Linear or Jira integration.",
  "x-generated": "2026-11-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/strix-ai-openapi.json#/components/schemas/TicketingIntegrationSettingsUpdate",
  "type": "object",
  "properties": {
    "auto_sync_enabled": {
      "type": "boolean",
      "description": "Enable automatic issue creation for new findings."
    },
    "issue_label_enabled": {
      "type": "boolean",
      "description": "Add the configured label to each issue that Strix creates."
    },
    "issue_label_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "description": "Label name to add to each issue that Strix creates."
    },
    "auto_sync_min_severity": {
      "type": "string",
      "enum": [
        "critical",
        "high",
        "medium",
        "low"
      ],
      "description": "Minimum severity that triggers automatic issue creation."
    },
    "auto_sync_sources": {
      "type": "array",
      "minItems": 1,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "enum": [
          "scan",
          "supply_chain"
        ]
      },
      "description": "Finding sources that auto-sync creates tickets for (at least one): `scan` (pentest findings) and/or `supply_chain` (dependency CVEs). Set `auto_sync_enabled` to false to stop all auto-sync. Manual, bulk, and API pushes ignore this."
    },
    "auto_sync_reachability": {
      "type": "string",
      "enum": [
        "all",
        "reachable_only"
      ],
      "description": "Which dependency findings auto-create tickets. `all` (the default) tickets every dependency finding; `reachable_only` tickets only the findings whose reachability verdict is `reachable`; findings marked `not_reachable` or `not_applicable`, and findings still waiting for a verdict, get no ticket. Pentest findings ignore this. Manual, bulk, and API pushes ignore this."
    },
    "default_collection_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Default Jira project or Linear team identifier."
    },
    "default_collection_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Default Jira project or Linear team name."
    },
    "default_ticket_type": {
      "type": [
        "string",
        "null"
      ],
      "description": "Default Jira issue type."
    },
    "jira_field_values": {
      "type": "object",
      "additionalProperties": true,
      "description": "Jira required field values for the default project."
    },
    "repository_routes": {
      "type": "array",
      "description": "Destination for each routed repository. Applies to Linear and Jira. This array replaces the stored repository routes: a repository that is not in the array loses its route. Send `collection_id` (the older `project_id` name is still accepted). For Jira, `ticket_type` and `jira_field_values` are optional and Strix rejects a route that misses a required field. Administrators only.",
      "items": {
        "type": "object",
        "properties": {
          "repository_id": {
            "type": "string",
            "description": "Repository identifier."
          },
          "collection_id": {
            "type": "string",
            "description": "Linear team or project identifier, or Jira project identifier. Required unless `project_id` is set."
          },
          "collection_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Destination name."
          },
          "project_id": {
            "type": "string",
            "description": "Older name for `collection_id`. Send `collection_id` instead.",
            "deprecated": true
          },
          "project_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Older name for `collection_name`. Send `collection_name` instead.",
            "deprecated": true
          },
          "ticket_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Jira issue type for this route. Linear routes must leave this null."
          },
          "jira_field_values": {
            "type": "object",
            "additionalProperties": true,
            "description": "Jira required field values for this route, keyed by field. Each value is `{ value, label }`. Linear routes must leave this empty."
          }
        },
        "required": [
          "repository_id"
        ],
        "anyOf": [
          {
            "required": [
              "collection_id"
            ]
          },
          {
            "required": [
              "project_id"
            ]
          }
        ]
      }
    },
    "source_routes": {
      "type": "object",
      "description": "The destination for each finding source, keyed by `scan` (pentests), `pr_review`, and `supply_chain`. Applies to Linear and Jira. This object replaces the stored routes. To use the default destination for a source, set the key to `null` or leave the key out. Resolution order on a push: explicit destination on the push request, then repository route, then source route, then the default destination.",
      "properties": {
        "scan": {
          "oneOf": [
            {
              "$ref": "#/$defs/TicketingSourceRoute"
            },
            {
              "type": "null"
            }
          ]
        },
        "pr_review": {
          "oneOf": [
            {
              "$ref": "#/$defs/TicketingSourceRoute"
            },
            {
              "type": "null"
            }
          ]
        },
        "supply_chain": {
          "oneOf": [
            {
              "$ref": "#/$defs/TicketingSourceRoute"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "default_assignee_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Provider user ID for the default assignee (see `GET /integrations/{provider}/users`). Strix checks the user with the provider. Set `null` to clear."
    },
    "title_template": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 500,
      "description": "Ticket title template. Unknown placeholders are rejected. Set `null` to use `{{title}}`."
    },
    "description_template": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 20000,
      "description": "Ticket description template. Unknown placeholders are rejected. Set `null` to use `{{details}}`."
    },
    "group_by_pentest": {
      "type": "boolean",
      "description": "Create one Linear project or Jira Epic per pentest and file its tickets under it."
    },
    "jira_priority_map": {
      "type": [
        "object",
        "null"
      ],
      "description": "Jira only. Maps severities (`critical`, `high`, `medium`, `low`) to `{ id }` (the Jira priority ID, from `GET /integrations/{provider}/priorities`) or `null`. Send `null` to disable. Rejected for Linear. Administrators only."
    },
    "due_date_days": {
      "type": [
        "object",
        "null"
      ],
      "description": "Maps severities to a whole number of days (1-365) after creation for the due date, or `null` per severity. Send `null` to disable. Applies to Linear and Jira; new tickets only. Administrators only."
    }
  },
  "$defs": {
    "TicketingSourceRoute": {
      "type": "object",
      "description": "Destination that receives tickets for one routing rule. For Linear, the destination is a team or a project. For Jira, the destination is a project with an optional issue type and required field values.",
      "properties": {
        "collection_id": {
          "type": "string",
          "description": "Linear team or project identifier, or Jira project identifier."
        },
        "collection_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Destination name."
        },
        "ticket_type": {
          "type": [
            "string",
            "null"
          ],
          "description": "Jira issue type for this rule. If null, Strix uses the project default. Always null for Linear."
        },
        "jira_field_values": {
          "type": "object",
          "additionalProperties": true,
          "description": "Jira required field values for this rule, keyed by field. Each value is `{ value, label }`. Always empty for Linear."
        }
      },
      "required": [
        "collection_id"
      ]
    }
  }
}