{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-connect/json-schema/amazon-connect-start-attached-file-upload-request-schema.json",
  "title": "StartAttachedFileUploadRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-connect-attached-files-api-openapi.yml#/components/schemas/StartAttachedFileUploadRequest",
  "type": "object",
  "properties": {
    "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."
    },
    "InstanceId": {
      "type": "string",
      "description": "The unique identifier of the Connect Customer instance."
    },
    "FileName": {
      "type": "string",
      "description": "A case-sensitive name of the attached file being uploaded."
    },
    "FileSizeInBytes": {
      "type": "integer",
      "description": "The size of the attached file in bytes."
    },
    "UrlExpiryInSeconds": {
      "type": "integer",
      "description": "Optional override for the expiry of the pre-signed S3 URL in seconds. The default value is 300."
    },
    "FileUseCaseType": {
      "type": "string",
      "enum": [
        "CONTACT_ANALYSIS",
        "EMAIL_MESSAGE",
        "EMAIL_MESSAGE_PLAIN_TEXT",
        "EMAIL_MESSAGE_REDACTED",
        "EMAIL_MESSAGE_PLAIN_TEXT_REDACTED",
        "ATTACHMENT",
        "VOICE_RECORDING"
      ],
      "description": "The use case for the file. Only ATTACHMENTS are supported."
    },
    "AssociatedResourceArn": {
      "type": "string",
      "description": "The resource to which the attached file is (being) uploaded to. The supported resources are Cases, Email, and Task. This value must be a valid ARN."
    },
    "CreatedBy": {
      "$ref": "#/$defs/CreatedByInfo"
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags used to organize, track, or control access for this resource. For example, { \"Tags\": {\"key1\":\"value1\", \"key2\":\"value2\"} }."
    }
  },
  "required": [
    "InstanceId",
    "FileName",
    "FileSizeInBytes",
    "FileUseCaseType",
    "AssociatedResourceArn"
  ],
  "$defs": {
    "CreatedByInfo": {
      "type": "object",
      "properties": {
        "ConnectUserArn": {
          "type": "string",
          "description": "An agent ARN representing a connect user."
        },
        "AWSIdentityArn": {
          "type": "string",
          "description": "STS or IAM ARN representing the identity of API Caller. SDK users cannot populate this and this value is calculated automatically if ConnectUserArn is not provided."
        }
      },
      "description": "Exactly one member is set."
    }
  }
}