{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/contraforce/json-schema/contraforce-update-service-account-request-schema.json",
  "title": "UpdateServiceAccountRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/contraforce-service-accounts-api-openapi.yml#/components/schemas/UpdateServiceAccountRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": [
        "null",
        "string"
      ]
    },
    "description": {
      "type": [
        "null",
        "string"
      ]
    },
    "organizationalRole": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/OrganizationalRole"
        }
      ]
    },
    "workspaceAssignments": {
      "type": [
        "null",
        "array"
      ],
      "items": {
        "$ref": "#/$defs/WorkspaceRoleAssignment"
      }
    }
  },
  "$defs": {
    "OrganizationalRole": {
      "enum": [
        "Admin",
        "UserAdmin",
        "WorkspaceAdmin",
        "AgentAdmin",
        "Member",
        "OrgContentOperator",
        "OrgContentAdmin"
      ]
    },
    "WorkspaceRole": {
      "enum": [
        "Owner",
        "ContentAdmin",
        "IncidentResponder",
        "IncidentAnalyst",
        "WorkspaceReader"
      ]
    },
    "WorkspaceRoleAssignment": {
      "type": "object",
      "properties": {
        "workspaceId": {
          "type": "string",
          "format": "uuid"
        },
        "role": {
          "$ref": "#/$defs/WorkspaceRole"
        }
      }
    }
  }
}