{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asapp3/json-schema/asapp3-start-streaming-request-schema.json",
  "title": "StartStreamingRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asapp3-autotranscribe-media-gateway-api-openapi.yml#/components/schemas/StartStreamingRequest",
  "type": "object",
  "properties": {
    "namespace": {
      "description": "The media gateway platform or protocol you are using.",
      "type": "string",
      "enum": [
        "siprec",
        "twilio",
        "amazonconnect",
        "genesysaudiohook"
      ]
    },
    "guid": {
      "description": "The globally unique Id for the call, also sometimes called Unique Call Id (UCID). Must be in decimal form.",
      "type": "string"
    },
    "autotranscribeParams": {
      "$ref": "#/$defs/StartStreamingAutotranscribeParams"
    },
    "siprecParams": {
      "$ref": "#/$defs/StartStreamingSiprecParams"
    },
    "twilioParams": {
      "$ref": "#/$defs/StartStreamingTwilioParams"
    },
    "amazonConnectParams": {
      "$ref": "#/$defs/StartStreamingAmazonConnectParams"
    },
    "customerId": {
      "description": "Id of the customer on the call. Usually taken from Call Center CTI information.",
      "type": "string"
    },
    "agentId": {
      "description": "The Id of the agent on the call. Usually taken from Call Center CTI information.",
      "type": "string"
    }
  },
  "required": [
    "namespace",
    "guid",
    "customerId",
    "agentId"
  ],
  "$defs": {
    "SiprecMediaLineOrder": {
      "description": "Defines the mapping of media lines (m-lines) in SDP of SIPREC protocol.\n- `CUSTOMER_FIRST` will map top audio m-line to customer side of conversation (usual for inbound calls to call center, default)\n- `AGENT_FIRST` will map top audio m-line to agent side of the conversation (usual for outbound calls from call center)\n",
      "type": "string",
      "default": "CUSTOMER_FIRST",
      "enum": [
        "CUSTOMER_FIRST",
        "AGENT_FIRST"
      ]
    },
    "StartStreamingAmazonConnectParams": {
      "type": "object",
      "properties": {
        "streamArn": {
          "type": "string",
          "description": "Amazon stream arn"
        },
        "startSelectorType": {
          "type": "string",
          "description": "Identifies the fragment on the Kinesis video stream where you want to start getting the data from",
          "enum": [
            "NOW",
            "FRAGMENT_NUMBER"
          ]
        },
        "afterFragmentNumber": {
          "type": "string",
          "description": "Amazon fragment number from where you want to start returning the fragments - mandatory if startSelectorType is FRAGMENT_NUMBER"
        }
      }
    },
    "StartStreamingAutotranscribeParams": {
      "type": "object",
      "properties": {
        "language": {
          "description": "IETF language tag",
          "type": "string",
          "default": "en-US"
        },
        "detailedToken": {
          "description": "Determines whether AutoTranscribe outputs word-level details like word content, timestamp and word type\n",
          "type": "boolean",
          "default": false
        },
        "audioRecordingAllowed": {
          "description": "Determines whether ASAPP may record and store the audio for this conversation for the purposes of model training\n",
          "type": "boolean",
          "default": false
        },
        "redactionOutput": {
          "description": "Determines whether the transcription output is redacted.\n\nIf detailedToken is true, requests with value \"redacted\" or \"redacted_and_unredacted\" will be rejected.\n\nIf no redaction rules configured by the client for \"redacted\" or \"redacted_and_unredacted\", the request will be rejected.\n",
          "type": "string",
          "default": "redacted",
          "enum": [
            "redacted",
            "unredacted",
            "redacted_and_unredacted"
          ]
        }
      }
    },
    "StartStreamingSiprecParams": {
      "type": "object",
      "properties": {
        "mediaLineOrder": {
          "$ref": "#/$defs/SiprecMediaLineOrder"
        }
      }
    },
    "StartStreamingTwilioParams": {
      "type": "object",
      "properties": {
        "trackMap": {
          "$ref": "#/$defs/TwilioTrackMap"
        }
      }
    },
    "TwilioTrackMap": {
      "type": "object",
      "properties": {
        "inbound": {
          "type": "string",
          "description": "The inbound twilio track",
          "default": "customer",
          "enum": [
            "customer",
            "agent"
          ]
        },
        "outbound": {
          "type": "string",
          "description": "The outbound twilio track",
          "default": "agent",
          "enum": [
            "customer",
            "agent"
          ]
        }
      }
    }
  }
}