openapi: 3.2.0 info: title: AutoCompose AutoTranscribe Media Gateway API description: 'Autocompose API to suggest the next agent message. Suggestions are based on the conversation history, conversation metadata, and the in-progress message text the agent has already typed into the composer.' version: 0.0.3 servers: - url: https://api.sandbox.asapp.com - url: https://api.test.asapp.com tags: - name: AutoTranscribe Media Gateway description: Operations for controlling AutoTranscribe Media Gateway transcription and streaming x-displayName: AutoTranscribe Media Gateway paths: /mg-autotranscribe/v1/start-streaming: post: tags: - AutoTranscribe Media Gateway operationId: startStreaming summary: Start streaming description: 'This starts the transcription of the audio stream. Use in conjunction with the stop-streaming endpoint to control when transcription occurs for a given call. This allow you to prevent transcription of sensitive parts of a conversation, such as entering PCI data.' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/StartStreamingRequest' responses: '200': description: Router processed the request, details are in the response body content: application/json: schema: $ref: '#/components/schemas/StartStreamingResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/Conflict' '413': $ref: '#/components/responses/RequestEntityTooLarge' '422': $ref: '#/components/responses/UnprocessableEntity' '429': $ref: '#/components/responses/TooManyRequests' '503': $ref: '#/components/responses/ServiceUnavailable' default: $ref: '#/components/responses/DefaultError' security: - API-ID: [] API-Secret: [] /mg-autotranscribe/v1/stop-streaming: post: tags: - AutoTranscribe Media Gateway operationId: stopStreaming summary: Stop streaming description: 'This stops the transcription of the audio stream. Use in conjunction with the start-streaming endpoint to control when transcription occurs for a given call. This allow you to prevent transcription of sensitive parts of a conversation, such as entering PCI data.' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/StopStreamingRequest' responses: '200': description: Router processed the request, details are in the response body content: application/json: schema: $ref: '#/components/schemas/StopStreamingResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/Conflict' '413': $ref: '#/components/responses/RequestEntityTooLarge' '422': $ref: '#/components/responses/UnprocessableEntity' '429': $ref: '#/components/responses/TooManyRequests' '503': $ref: '#/components/responses/ServiceUnavailable' default: $ref: '#/components/responses/DefaultError' security: - API-ID: [] API-Secret: [] /mg-autotranscribe/v1/twilio-media-stream-url: get: tags: - AutoTranscribe Media Gateway operationId: getTwilioMediaStreams summary: Get Twilio media stream url description: Returns url where Twilio media stream should be sent to. responses: '200': description: OK - Twilio media stream url in the response body content: application/json: schema: $ref: '#/components/schemas/GetTwilioMediaStreamsResponse' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/TooManyRequests' '503': $ref: '#/components/responses/ServiceUnavailable' default: $ref: '#/components/responses/DefaultError' security: - API-ID: [] API-Secret: [] components: schemas: StartStreamingTwilioParams: type: object properties: trackMap: $ref: '#/components/schemas/TwilioTrackMap' example: trackMap: inbound: customer outbound: agent ConflictResponse: description: Conflict response type: object properties: error: $ref: '#/components/schemas/DefaultErrorDetails' example: requestId: 8e033668-9f1a-11ec-b909-0242ac120002 code: 409-01 message: Conflict 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 ' type: boolean default: false audioRecordingAllowed: description: 'Determines whether ASAPP may record and store the audio for this conversation for the purposes of model training ' type: boolean default: false redactionOutput: description: 'Determines whether the transcription output is redacted. If detailedToken is true, requests with value "redacted" or "redacted_and_unredacted" will be rejected. If no redaction rules configured by the client for "redacted" or "redacted_and_unredacted", the request will be rejected. ' type: string default: redacted enum: - redacted - unredacted - redacted_and_unredacted example: language: en-US detailedToken: false audioRecordingAllowed: false redactionOutput: redacted TooManyRequestsResponse: description: Too Many Requests response type: object properties: error: $ref: '#/components/schemas/DefaultErrorDetails' example: requestId: 8e033668-9f1a-11ec-b909-0242ac120002 code: 429-01 message: Too Many Requests ForbiddenResponse: description: Forbidden response type: object properties: error: $ref: '#/components/schemas/DefaultErrorDetails' example: requestId: 8e033668-9f1a-11ec-b909-0242ac120002 code: 403-01 message: Forbidden Response StartStreamingSiprecParams: type: object properties: mediaLineOrder: $ref: '#/components/schemas/SiprecMediaLineOrder' StopStreamingAutotranscribeResponse: type: object properties: customer: $ref: '#/components/schemas/StopStreamingAutotranscribeResponseDetails' agent: $ref: '#/components/schemas/StopStreamingAutotranscribeResponseDetails' UnprocessableEntity: description: Unprocessable Entity response type: object properties: error: $ref: '#/components/schemas/DefaultErrorDetails' example: requestId: 8e033668-9f1a-11ec-b909-0242ac120002 code: 422-01 message: Unprocessable Entity StopStreamingAutotranscribeResponseDetails: type: object properties: streamId: type: string example: 5ce2b755-3f38-11ed-b755-7aed4b5c38d5 status: $ref: '#/components/schemas/AutotranscribeResponseStatus' summary: $ref: '#/components/schemas/StopStreamingResponseSummary' 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 StopStreamingResponseSummary: type: object properties: totalAudioBytes: type: integer audioDurationMs: type: integer streamingSeconds: type: integer transcripts: type: integer example: totalAudioBytes: 1334720 audioDurationMs: 83420 streamingSeconds: 84 transcripts: 2 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: '#/components/schemas/StartStreamingAutotranscribeParams' siprecParams: $ref: '#/components/schemas/StartStreamingSiprecParams' twilioParams: $ref: '#/components/schemas/StartStreamingTwilioParams' amazonConnectParams: $ref: '#/components/schemas/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 example: namespace: siprec guid: 0867617078-0032318833-2221801472-0002236962 customerId: customerId agentId: agentId autotranscribeParams: language: en-US siprecParams: mediaLineOrder: CUSTOMER_FIRST BadRequestResponse: description: Bad request response type: object properties: error: $ref: '#/components/schemas/DefaultErrorDetails' example: requestId: 8e033668-9f1a-11ec-b909-0242ac120002 code: 400-01 message: Bad request StartStreamingResponse: type: object properties: autotranscribeResponse: $ref: '#/components/schemas/StartStreamingAutotranscribeResponse' isOk: type: boolean errorMessage: type: string example: isOk: true autotranscribeResponse: customer: streamId: 5ce2b755-3f38-11ed-b755-7aed4b5c38d5 status: code: 1000 description: OK agent: streamId: cf31116-3f38-11ed-9116-7a0a36c763f1 status: code: 1000 description: OK NotFoundResponse: description: Not Found response type: object properties: error: $ref: '#/components/schemas/DefaultErrorDetails' example: requestId: 8e033668-9f1a-11ec-b909-0242ac120002 code: 404-01 message: Not Found StopStreamingResponse: type: object properties: autotranscribeResponse: $ref: '#/components/schemas/StopStreamingAutotranscribeResponse' isOk: type: boolean errorMessage: type: string RequestEntityTooLargeResponse: description: Request Entity Too Large response type: object properties: error: $ref: '#/components/schemas/DefaultErrorDetails' example: requestId: 8e033668-9f1a-11ec-b909-0242ac120002 code: 413-01 message: Request Entity Too Large ServiceUnavailableResponse: description: Service Unavailable response type: object properties: error: $ref: '#/components/schemas/DefaultErrorDetails' example: requestId: 8e033668-9f1a-11ec-b909-0242ac120002 code: 503-01 message: Service Unavailable StartStreamingAutotranscribeResponse: type: object properties: customer: $ref: '#/components/schemas/StartStreamingAutotranscribeResponseDetails' agent: $ref: '#/components/schemas/StartStreamingAutotranscribeResponseDetails' StopStreamingRequest: 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 example: namespace: siprec guid: 0867617078-0032318833-2221801472-0002236962 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 example: streamArn: arn:aws:kinesisvideo:us-east-1:000000000000:stream/streamtest-connect-asappconnect-contact-1117e864-690f-4e1e-9dcf-6fbfcc288e41/1654194145007 startSelectorType: FRAGMENT_NUMBER afterFragmentNumber: '91343852333181476958523476930058290730435475343' StartStreamingAutotranscribeResponseDetails: type: object properties: streamId: type: string example: 5ce2b755-3f38-11ed-b755-7aed4b5c38d5 status: $ref: '#/components/schemas/AutotranscribeResponseStatus' SiprecMediaLineOrder: description: 'Defines the mapping of media lines (m-lines) in SDP of SIPREC protocol. - `CUSTOMER_FIRST` will map top audio m-line to customer side of conversation (usual for inbound calls to call center, default) - `AGENT_FIRST` will map top audio m-line to agent side of the conversation (usual for outbound calls from call center) ' type: string default: CUSTOMER_FIRST enum: - CUSTOMER_FIRST - AGENT_FIRST GetTwilioMediaStreamsResponse: type: object properties: streamingUrl: description: The websocket URL you provide to Twilio for media streaming. type: string example: wss://localhost/mg-twilio-autotranscribe/twilio-media/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c UnauthorizedResponse: description: Unauthorized response type: object properties: error: $ref: '#/components/schemas/DefaultErrorDetails' example: requestId: 8e033668-9f1a-11ec-b909-0242ac120002 code: 401-01 message: Unauthorized AutotranscribeResponseStatus: type: object properties: code: type: integer example: 1000 description: type: string example: OK DefaultErrorResponse: description: Default error response type: object properties: error: $ref: '#/components/schemas/DefaultErrorDetails' example: requestId: 8e033668-9f1a-11ec-b909-0242ac120002 code: 500-01 message: Internal server error DefaultErrorDetails: description: Error details type: object properties: requestId: type: string description: Unique ID of the failing request message: type: string description: Error message code: type: string description: Error code required: - requestId - message responses: ServiceUnavailable: description: 503 - Service Unavailable content: application/json: schema: $ref: '#/components/schemas/ServiceUnavailableResponse' DefaultError: description: 500 - Internal Server Error content: application/json: schema: $ref: '#/components/schemas/DefaultErrorResponse' Unauthorized: description: 401 - Unauthorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedResponse' BadRequest: description: 400 - Bad request content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' Forbidden: description: 403 - Forbidden content: application/json: schema: $ref: '#/components/schemas/ForbiddenResponse' Conflict: description: 409 - Conflict content: application/json: schema: $ref: '#/components/schemas/ConflictResponse' RequestEntityTooLarge: description: 413 - Request Entity Too Large content: application/json: schema: $ref: '#/components/schemas/RequestEntityTooLargeResponse' TooManyRequests: description: 429 - Too Many Requests content: application/json: schema: $ref: '#/components/schemas/TooManyRequestsResponse' UnprocessableEntity: description: 422 - Unprocessable Entity content: application/json: schema: $ref: '#/components/schemas/UnprocessableEntity' NotFound: description: 404 - Not Found content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' securitySchemes: API-ID: type: apiKey in: header name: asapp-api-id API-Secret: type: apiKey in: header name: asapp-api-secret x-tagGroups: - name: AutoCompose API tags: - AutoCompose - name: AutoSummary API tags: - AutoSummary - name: AutoTranscribe API tags: - AutoTranscribe - name: Conversations API tags: - Conversations - name: File Exporter API tags: - File Exporter - name: GenerativeAgent API tags: - GenerativeAgent - name: Health Check API tags: - Health Check - name: Knowledge Base API tags: - Knowledge Base - name: Metadata Ingestion API tags: - Metadata - name: MG Autotranscribe API Router tags: - AutoTranscribe Media Gateway x-provenance: method: harvested publisher: Asapp3 source: https://docs.asapp.com/api-specs/openapi.yaml note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json); stamped by stamp-openapi-provenance.py (roadmap#793)