{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-connect/json-schema/amazon-connect-create-case-request-schema.json",
  "title": "CreateCaseRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-connect-cases-api-openapi.yml#/components/schemas/CreateCaseRequest",
  "type": "object",
  "properties": {
    "domainId": {
      "type": "string",
      "description": "The unique identifier of the Cases domain."
    },
    "templateId": {
      "type": "string",
      "description": "A unique identifier of a template."
    },
    "fields": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CasesFieldValue"
      },
      "description": "An array of objects with field ID (matching ListFields/DescribeField) and value union data."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs."
    },
    "performedBy": {
      "$ref": "#/$defs/UserUnion"
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A map of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource."
    }
  },
  "required": [
    "domainId",
    "templateId",
    "fields"
  ],
  "$defs": {
    "CasesFieldValue": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier of a field."
        },
        "value": {
          "$ref": "#/$defs/CasesFieldValueUnion"
        }
      },
      "required": [
        "id",
        "value"
      ]
    },
    "CasesFieldValueUnion": {
      "type": "object",
      "properties": {
        "stringValue": {
          "type": "string",
          "description": "String value type."
        },
        "doubleValue": {
          "type": "number",
          "description": "Can be either null, or have a Double number value type. Only one value can be provided."
        },
        "booleanValue": {
          "type": "boolean",
          "description": "Can be either null, or have a Boolean value type. Only one value can be provided."
        },
        "emptyValue": {
          "$ref": "#/$defs/EmptyFieldValue"
        },
        "userArnValue": {
          "type": "string",
          "description": "Represents the user that performed the audit."
        }
      },
      "description": "Exactly one member is set."
    },
    "EmptyFieldValue": {
      "type": "object",
      "properties": {}
    },
    "UserUnion": {
      "type": "object",
      "properties": {
        "userArn": {
          "type": "string",
          "description": "Represents the Connect Customer ARN of the user."
        },
        "customEntity": {
          "type": "string",
          "description": "Any provided entity."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}