diff --git a/descriptions/0/api.intercom.io.yaml b/descriptions/0/api.intercom.io.yaml index 771bbf30..6f955f54 100644 --- a/descriptions/0/api.intercom.io.yaml +++ b/descriptions/0/api.intercom.io.yaml @@ -22297,33 +22297,42 @@ paths: - Calls operationId: showCallTranscript description: | - Returns the transcript for the specified call as a downloadable text file. + Returns the transcript for the specified call as a JSON array of turns. Each turn carries a `speaker_name` when the speaker could be resolved. Clients should fall back to `speaker_label` when `speaker_name` is absent. responses: '200': description: successful - headers: - Content-Disposition: - description: File attachment directive and suggested filename for the transcript - schema: - type: string - example: "attachment; filename=transcription_data-2025-07-17.txt" content: - text/plain: + application/json: schema: - type: string - description: Transcript text - examples: - transcript_txt: - value: |- - [00:00:03] Teammate 1: "Hello, thanks for calling. How can I help today?" - [00:00:09] User: "I need help recovering access to my account." - [00:00:15] Teammate 1: "I can help with that. For security, I’ll ask a few generic verification questions." - [00:00:22] User: "Okay." - [00:00:28] Teammate 1: "Please confirm general details on the account (no sensitive data over this call)." - [00:00:35] User: "I can provide non-sensitive info." - [00:00:41] Teammate 1: "Thank you. I’ll initiate a standard account recovery process and send the next steps." - [00:00:48] User: "Great, thanks." - [00:00:53] Teammate 1: "You should receive a message shortly with instructions to complete recovery." + type: array + items: + "$ref": "#/components/schemas/call_transcript_turn" + examples: + transcript: + value: + - start_time: "0.0" + end_time: "3.00" + speaker_label: "Teammate 1" + speaker: "Teammate 1" + content: "Hello, thanks for calling. How can I help today?" + speaker_type: admin + speaker_id: "789" + speaker_name: Jane Doe + - start_time: "3.00" + end_time: "9.00" + speaker_label: User + speaker: User + content: I need help recovering access to my account. + speaker_type: user + speaker_id: "6762f0dd1bb69f9f2193bb83" + speaker_name: John Smith + - start_time: "9.00" + end_time: "15.00" + speaker_label: User + speaker: User + content: I can provide non-sensitive info to verify. + speaker_type: user + speaker_id: "6762f0dd1bb69f9f2193bb84" '404': description: Not Found content: @@ -22388,7 +22397,14 @@ paths: id: "123" conversation_id: "64619700005694" transcript: - - {} + - start_time: "0.0" + end_time: "3.00" + speaker_label: "Teammate 1" + speaker: "Teammate 1" + content: "Hello, thanks for calling. How can I help today?" + speaker_type: admin + speaker_id: "789" + speaker_name: Jane Doe transcript_status: completed schema: type: object @@ -22407,8 +22423,7 @@ paths: type: array description: The call transcript if available, otherwise an empty array. items: - type: object - additionalProperties: true + "$ref": "#/components/schemas/call_transcript_turn" transcript_status: type: string nullable: true @@ -35899,6 +35914,93 @@ components: example: 0 pages: "$ref": "#/components/schemas/cursor_pages" + call_transcript_turn: + title: Call Transcript Turn + type: object + x-tags: + - Calls + description: A single turn in a call transcript. + properties: + start_time: + oneOf: + - type: string + - type: number + description: The start time of the turn, as a seconds offset from the start of the call. A string on calls transcribed by Amazon Transcribe, a number on Fin Voice calls. + example: "0.0" + end_time: + oneOf: + - type: string + - type: number + description: The end time of the turn, as a seconds offset from the start of the call. A string on calls transcribed by Amazon Transcribe, a number on Fin Voice calls. + example: "3.00" + speaker_label: + type: string + description: The diarization label for the speaker. + example: "Teammate 1" + speaker: + type: string + description: The diarization label for the speaker. Same value as `speaker_label`. + example: "Teammate 1" + content: + type: string + description: The transcribed text spoken during this turn. + example: Hello, thanks for calling. How can I help today? + speaker_type: + type: string + description: The type of the speaker - either `admin` for a teammate or `user` for a contact. Absent on Fin Voice call transcripts and on calls transcribed before speaker attribution shipped, where only `speaker_label` identifies the speaker. + example: admin + speaker_id: + type: string + description: The id of the teammate or contact who is the speaker. `-1` when the teammate who spoke has since been deleted, in which case `speaker_name` is `Deleted teammate`. + example: "789" + speaker_name: + type: string + description: The resolved display name of the speaker. A contact who has been merged into another resolves to the name on the surviving record. Omitted when the speaker cannot be resolved or has no name, for example a contact whose record was scrambled by a GDPR deletion request. Clients should fall back to `speaker_label` when this is absent. + example: Jane Doe + article_sources: + type: array + description: Sources Fin cited during this turn. Only present on Fin Voice call transcripts. + example: + - title: Password Reset Guide + entity_type: 120 + entity_id: "8185560" + items: + type: object + properties: + title: + type: string + description: The title of the cited source. + example: Password Reset Guide + entity_type: + type: integer + description: The type of the cited entity. + example: 120 + entity_id: + type: string + description: The id of the cited entity. + example: "8185560" + triggered_guidance: + type: array + description: Guidance rules that Fin matched during this turn. Only present on Fin Voice call transcripts. + example: + - match_type: clarification + rule_id: "3" + rule_text: If the customer asks about pricing, ask which plan they're interested in before answering + items: + type: object + properties: + match_type: + type: string + description: How the rule was matched. + example: clarification + rule_id: + type: string + description: The id of the matched guidance rule. + example: "3" + rule_text: + type: string + description: The text of the matched guidance rule. + example: If the customer asks about pricing, ask which plan they're interested in before answering custom_attributes: title: Custom Attributes type: object