diff --git a/specification/communication/Communication.Messages/client.tsp b/specification/communication/Communication.Messages/client.tsp index 56e08cc6d7df..5be226d5c0cb 100644 --- a/specification/communication/Communication.Messages/client.tsp +++ b/specification/communication/Communication.Messages/client.tsp @@ -7,7 +7,7 @@ import "./main.tsp"; using Azure.ClientGenerator.Core; using TypeSpec.Versioning; -@useDependency(Azure.Communication.MessagesService.Versions.c2025_04_01_Preview) +@useDependency(Azure.Communication.MessagesService.Versions.c2025_09_01_Preview) namespace ClientForAcsMessages; @client({ @@ -20,6 +20,7 @@ interface NotificationMessagesClient @access(Access.internal, "csharp") @clientName("downloadMediaInternal", "csharp") downloadMedia is Azure.Communication.MessagesService.StreamOperations.getMedia; + sendReadReceipt is Azure.Communication.MessagesService.ReadReceiptsOperations.send; } @client({ diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_CreateConversation.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_CreateConversation.json new file mode 100644 index 000000000000..f981075ec6ef --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_CreateConversation.json @@ -0,0 +1,79 @@ +{ + "title": "Creates a new conversation", + "operationId": "ConversationAdministrationOperations_CreateConversation", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "conversation": { + "topic": "Test", + "deliveryChannelIds": [ + "0f0eb78e-a576-1dfc-b414-0f0756de3338" + ], + "outboundDeliveryStrategy": "allParticipants", + "participants": [ + { + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12345678901", + "kind": "whatsApp" + } + ] + }, + { + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid1", + "kind": "communication" + } + } + ] + }, + "initialMessage": { + "content": "I need help" + } + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "201": { + "body": { + "id": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "topic": "Test", + "deliveryChannelIds": [ + "0f0eb78e-a576-1dfc-b414-0f0756de3338" + ], + "outboundDeliveryStrategy": "allParticipants", + "participants": [ + { + "id": "8:acs:uuid2", + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12345678901", + "kind": "whatsApp" + }, + { + "id": "8:acs:uuid2", + "kind": "communication" + } + ] + }, + { + "id": "8:acs:uuid1", + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid1", + "kind": "communication" + } + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_DeleteConversation.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_DeleteConversation.json new file mode 100644 index 000000000000..cf99d91ab1ae --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_DeleteConversation.json @@ -0,0 +1,12 @@ +{ + "title": "Deletes a specific conversation", + "operationId": "ConversationAdministrationOperations_DeleteConversation", + "parameters": { + "api-version": "2025-09-01-preview", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "204": {} + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_GetConversation.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_GetConversation.json new file mode 100644 index 000000000000..efa78437e044 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_GetConversation.json @@ -0,0 +1,47 @@ +{ + "title": "Gets the details of a specific conversation", + "operationId": "ConversationAdministrationOperations_GetConversation", + "parameters": { + "api-version": "2025-09-01-preview", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "id": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "topic": "Test", + "deliveryChannelIds": [ + "0f0eb78e-a576-1dfc-b414-0f0756de3338" + ], + "outboundDeliveryStrategy": "allParticipants", + "participants": [ + { + "id": "8:acs:uuid2", + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12345678901", + "kind": "whatsApp" + }, + { + "id": "8:acs:uuid2", + "kind": "communication" + } + ] + }, + { + "id": "8:acs:uuid1", + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid1", + "kind": "communication" + } + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_TerminateConversation.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_TerminateConversation.json new file mode 100644 index 000000000000..216ff531ef19 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationAdministration_TerminateConversation.json @@ -0,0 +1,12 @@ +{ + "title": "Terminates a specific conversation", + "operationId": "ConversationAdministrationOperations_TerminateConversation", + "parameters": { + "api-version": "2025-09-01-preview", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": {} + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_AddParticipants.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_AddParticipants.json new file mode 100644 index 000000000000..7a03d6b1e73d --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_AddParticipants.json @@ -0,0 +1,39 @@ +{ + "title": "Adds participants to a specific conversation", + "operationId": "ConversationThreadOperations_AddParticipants", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "options": { + "participants": [ + { + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12345678901", + "kind": "whatsApp" + } + ] + }, + { + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid1", + "kind": "communication" + } + } + ] + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "207": { + "body": { + "invalidParticipants": [] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_AnalyzeConversation.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_AnalyzeConversation.json new file mode 100644 index 000000000000..fed3e276f9a0 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_AnalyzeConversation.json @@ -0,0 +1,16 @@ +{ + "title": "Get AI Analysis of a conversation", + "operationId": "ConversationThreadOperations_AnalyzeConversation", + "parameters": { + "api-version": "2025-09-01-preview", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "summary": "The customer needs help." + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_ListConversations.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_ListConversations.json new file mode 100644 index 000000000000..8cbcb28bba10 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_ListConversations.json @@ -0,0 +1,86 @@ +{ + "title": "Retrieves list of conversations", + "operationId": "ConversationThreadOperations_ListConversations", + "parameters": { + "api-version": "2025-09-01-preview", + "maxPageSize": 25, + "channelId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "topic": "Test", + "deliveryChannelIds": [ + "0f0eb78e-a576-1dfc-b414-0f0756de3338" + ], + "outboundDeliveryStrategy": "allParticipants", + "participants": [ + { + "id": "8:acs:uuid2", + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12345678901", + "kind": "whatsApp" + }, + { + "id": "8:acs:uuid2", + "kind": "communication" + } + ] + }, + { + "id": "8:acs:uuid1", + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid1", + "kind": "communication" + } + } + ] + }, + { + "id": "19:111dfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "topic": "Test", + "deliveryChannelIds": [ + "0f0eb78e-a576-1dfc-b414-0f0756de3338" + ], + "outboundDeliveryStrategy": "allParticipants", + "participants": [ + { + "id": "8:acs:uuid3", + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12331112222", + "kind": "whatsApp" + }, + { + "id": "8:acs:uuid3", + "kind": "communication" + } + ] + }, + { + "id": "8:acs:uuid3", + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid3", + "kind": "communication" + } + } + ] + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_ListMessages.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_ListMessages.json new file mode 100644 index 000000000000..01a7f50385fd --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_ListMessages.json @@ -0,0 +1,39 @@ +{ + "title": "Retrieves list of conversation messages", + "operationId": "ConversationThreadOperations_ListMessages", + "parameters": { + "api-version": "2025-09-01-preview", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "1593108077690", + "sequenceId": 6, + "message": { + "kind": "text", + "content": "My order did not arrive" + }, + "senderDisplayName": "Jane", + "createdOn": "2020-06-25T18:01:17.6900000Z", + "senderCommunicationIdentifier": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + }, + { + "id": "1593107077690", + "sequenceId": 5, + "message": { + "kind": "text", + "content": "Hi I need help" + }, + "senderDisplayName": "Jane", + "createdOn": "2020-06-25T17:44:37.6830000Z", + "senderCommunicationIdentifier": "8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_RemoveParticipants.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_RemoveParticipants.json new file mode 100644 index 000000000000..a0c7ee913abe --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_RemoveParticipants.json @@ -0,0 +1,22 @@ +{ + "title": "remove a participant from a conversation", + "operationId": "ConversationThreadOperations_RemoveParticipants", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "options": { + "participantIds": [ + "8:acs:uuid2" + ] + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "207": { + "body": { + "invalidParticipants": [] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_SendMessage.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_SendMessage.json new file mode 100644 index 000000000000..feaeaadda0cd --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/ConversationThread_SendMessage.json @@ -0,0 +1,24 @@ +{ + "title": "Sends a conversation message from Business to User", + "operationId": "ConversationThreadOperations_SendMessage", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "options": { + "request": { + "kind": "text", + "content": "I need help" + }, + "outboundDeliveryStrategy": "allParticipants" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "messageId": "1593107077690" + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendAudio.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendAudio.json new file mode 100644 index 000000000000..e10d6793e6ac --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendAudio.json @@ -0,0 +1,29 @@ +{ + "title": "Sends a notification message - audio", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "audio", + "mediaUri": "https://example.com/audio.mp3" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendButtonInteractiveMessage.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendButtonInteractiveMessage.json new file mode 100644 index 000000000000..272fd26eeda0 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendButtonInteractiveMessage.json @@ -0,0 +1,58 @@ +{ + "title": "Sends a notification message - Interactive Button", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "interactive", + "interactiveMessage": { + "header": { + "text": "Test Header", + "kind": "text" + }, + "body": { + "text": "Test Body", + "kind": "text" + }, + "footer": { + "text": "Test Footer", + "kind": "text" + }, + "action": { + "kind": "whatsAppButtonAction", + "content": { + "buttons": [ + { + "id": "cancel", + "title": "Cancel" + }, + { + "id": "agree", + "title": "Agree" + } + ], + "kind": "buttonSet" + } + } + } + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendDocument.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendDocument.json new file mode 100644 index 000000000000..9bb09d88ce81 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendDocument.json @@ -0,0 +1,31 @@ +{ + "title": "Sends a notification message - document", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "document", + "mediaUri": "https://example.com/document.pdf", + "caption": "check out this document!", + "fileName": "fileName.pdf" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendImage.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendImage.json new file mode 100644 index 000000000000..be425a4ee5e3 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendImage.json @@ -0,0 +1,30 @@ +{ + "title": "Sends a notification message - image", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "image", + "mediaUri": "https://example.com/image.jpg", + "caption": "check out this image!" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendListInteractiveMessage.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendListInteractiveMessage.json new file mode 100644 index 000000000000..4595601db8ad --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendListInteractiveMessage.json @@ -0,0 +1,81 @@ +{ + "title": "Sends a notification message - Interactive List", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "interactive", + "interactiveMessage": { + "header": { + "text": "Choose Shipping Option", + "kind": "text" + }, + "body": { + "text": "Which shipping option do you prefer?", + "kind": "text" + }, + "footer": { + "text": "Lucky Shrub: Your gateway to succulents", + "kind": "text" + }, + "action": { + "kind": "whatsAppListAction", + "content": { + "title": "Shipping Options", + "groups": [ + { + "title": "I want it ASAP!", + "items": [ + { + "id": "priority_express", + "title": "Priority Mail Express", + "description": "Next Day to 2 Days" + }, + { + "id": "priority_mail", + "title": "Priority Mail", + "description": "1–3 Days" + } + ] + }, + { + "title": "I can wait a bit", + "items": [ + { + "id": "usps_ground_advantage", + "title": "USPS Ground Advantage", + "description": "2–5 Days" + }, + { + "id": "media_mail", + "title": "Media Mail", + "description": "2–8 Days" + } + ] + } + ], + "kind": "group" + } + } + } + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendReaction.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendReaction.json new file mode 100644 index 000000000000..7b556dbd3cf1 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendReaction.json @@ -0,0 +1,30 @@ +{ + "title": "Sends a notification message - Reaction", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "reaction", + "emoji": "<>", + "messageId": "e6265c04-c570-43fd-8be1-74aed7750455" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendReadReceipt.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendReadReceipt.json new file mode 100644 index 000000000000..d4229a19cd02 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendReadReceipt.json @@ -0,0 +1,17 @@ +{ + "title": "Sends a read receipt", + "operationId": "ReadReceiptsOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "readReceiptContent": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "typingIndicator": true + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": {} + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendSticker.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendSticker.json new file mode 100644 index 000000000000..4e7e8f588246 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendSticker.json @@ -0,0 +1,29 @@ +{ + "title": "Sends a notification message - Sticker", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "sticker", + "mediaUri": "https://www.luckyshrub.com/assets/animated-smiling-plant.webp" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendTemplate.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendTemplate.json new file mode 100644 index 000000000000..2e17803b0215 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendTemplate.json @@ -0,0 +1,55 @@ +{ + "title": "Sends a notification message - Template", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "template", + "template": { + "name": "example", + "language": "en", + "values": [ + { + "name": "userName", + "kind": "text", + "text": "John Doe" + }, + { + "name": "orderNumber", + "kind": "text", + "text": "12345" + } + ], + "bindings": { + "body": [ + { + "refValue": "userName" + }, + { + "refValue": "orderNumber" + } + ], + "kind": "whatsApp" + } + } + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendText.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendText.json new file mode 100644 index 000000000000..97c9da99ac7b --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendText.json @@ -0,0 +1,29 @@ +{ + "title": "Sends a notification message - text", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "text", + "content": "Text message through CPM" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendUrlInteractiveMessage.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendUrlInteractiveMessage.json new file mode 100644 index 000000000000..28f8347e9397 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendUrlInteractiveMessage.json @@ -0,0 +1,50 @@ +{ + "title": "Sends a notification message - Interactive Url", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "interactive", + "interactiveMessage": { + "header": { + "text": "Test Header", + "kind": "text" + }, + "body": { + "text": "Test Body", + "kind": "text" + }, + "footer": { + "text": "Test Footer", + "kind": "text" + }, + "action": { + "kind": "whatsAppUrlAction", + "content": { + "title": "Test Url", + "url": "https://example.com/audio.mp3", + "kind": "url" + } + } + } + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendVideo.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendVideo.json new file mode 100644 index 000000000000..3825df8d5ecb --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/NotificationMessages_SendVideo.json @@ -0,0 +1,30 @@ +{ + "title": "Sends a notification message - video", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "video", + "mediaUri": "https://example.com/video.mp4", + "caption": "check out this video!" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/Stream_GetMedia.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/Stream_GetMedia.json new file mode 100644 index 000000000000..c2f67ed699cb --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/Stream_GetMedia.json @@ -0,0 +1,15 @@ +{ + "title": "Download media", + "operationId": "StreamOperations_GetMedia", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "id": "d19e68ec-bdd6-4a50-8dfb-cbb1642df6ab", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": "" + } + } +} diff --git a/specification/communication/Communication.Messages/examples/2025-09-01-preview/Template_ListTemplates.json b/specification/communication/Communication.Messages/examples/2025-09-01-preview/Template_ListTemplates.json new file mode 100644 index 000000000000..560654b5b278 --- /dev/null +++ b/specification/communication/Communication.Messages/examples/2025-09-01-preview/Template_ListTemplates.json @@ -0,0 +1,35 @@ +{ + "title": "Gets a list of templates", + "operationId": "TemplateOperations_ListTemplates", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "channelId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sample_shipping_confirmation", + "language": "en_US", + "status": "approved", + "kind": "whatsApp", + "content": [ + { + "type": "BODY", + "text": "Your package has been shipped. It will be delivered in {{1}} business days." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/communication/Communication.Messages/models.tsp b/specification/communication/Communication.Messages/models.tsp index 380f5b8c8d3b..28d843127969 100644 --- a/specification/communication/Communication.Messages/models.tsp +++ b/specification/communication/Communication.Messages/models.tsp @@ -291,6 +291,19 @@ model InteractiveNotificationContent extends NotificationContent { interactiveMessage: InteractiveMessage; } +@added(Versions.c2025_09_01_Preview) +@doc("A request to send a read receipt update from Business to User.") +model ReadReceiptContent { + @doc("The id of the message this read receipt refers to.") + messageId: string; + + @doc("The Channel Registration ID for the Business Identifier.") + channelRegistrationId: uuid; + + @doc("Whether this status update includes a typing indicator. This field defaults to false when not provided.") + typingIndicator?: boolean; +} + @added(Versions.c2025_01_15_Preview) @doc("The Interactive message content to which user can read and respond.") model InteractiveMessage { @@ -651,6 +664,16 @@ model Notifications { id: string; } +@resource("messages/readreceipts") +@doc("A notification.") +model ReadReceipts { + @key + @visibility(Lifecycle.Read) + @invisible(Lifecycle) // The ID is only used as a key parameter. + @doc("The ID is only used as a key parameter.") + id: string; +} + @resource("messages/channels") @doc("A communication channel.") model CommunicationChannel { @@ -737,6 +760,14 @@ model NotificationMessagesSendRequestBody { body: NotificationContent; } +@added(Versions.c2025_09_01_Preview) +@doc("Read Receipt send request body.") +model ReadReceiptSendRequestBody { + @doc("Details of the read receipt update to send.") + @bodyRoot + readReceiptContent: ReadReceiptContent; +} + @added(Versions.c2025_04_01_Preview) @doc("The options of the outbound delivery strategy for messages sent by participants in a conversation.") union OutboundDeliveryStrategyKind { @@ -1082,4 +1113,8 @@ enum Versions { @doc("Azure Communication Messages 2025-04-01-preview api version") @useDependency(Azure.Core.Versions.v1_0_Preview_2) c2025_04_01_Preview: "2025-04-01-preview", + + @doc("Azure Communication Messages 2025-09-01-preview api version") + @useDependency(Azure.Core.Versions.v1_0_Preview_2) + c2025_09_01_Preview: "2025-09-01-preview", } diff --git a/specification/communication/Communication.Messages/routes.tsp b/specification/communication/Communication.Messages/routes.tsp index 2c0be7694ba1..728fa91306e2 100644 --- a/specification/communication/Communication.Messages/routes.tsp +++ b/specification/communication/Communication.Messages/routes.tsp @@ -40,6 +40,19 @@ interface NotificationMessagesOperations { >; } +interface ReadReceiptsOperations { + #suppress "@azure-tools/typespec-azure-core/no-response-body" "" + @tag("ReadReceipts") + @added(Versions.c2025_09_01_Preview) + @action("send") + @doc("Sends a read receipt update from Business to User.") + send is Operations.ResourceCollectionAction< + ReadReceipts, + ReadReceiptSendRequestBody, + AcceptedResponse + >; +} + interface StreamOperations { @tag("Stream") @doc("Download the Media payload from a User to Business message.") diff --git a/specification/communication/Communication.Messages/tspconfig.yaml b/specification/communication/Communication.Messages/tspconfig.yaml index d6f11c5f7a5a..1b06dec29b27 100644 --- a/specification/communication/Communication.Messages/tspconfig.yaml +++ b/specification/communication/Communication.Messages/tspconfig.yaml @@ -29,8 +29,8 @@ options: clear-output-folder: true model-namespace: false emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" - namespace: Azure.Communication.Messages save-inputs: true + namespace: Azure.Communication.Messages flavor: azure "@azure-typespec/http-client-csharp": emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/communicationservicesmessages.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/communicationservicesmessages.json new file mode 100644 index 000000000000..961774ada2a9 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/communicationservicesmessages.json @@ -0,0 +1,3239 @@ +{ + "swagger": "2.0", + "info": { + "title": "CommunicationMessagesClient", + "version": "2025-09-01-preview", + "description": "Azure Communication Messages Service", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "description": "The communication resource, for example https://my-resource.communication.azure.com", + "required": true, + "type": "string", + "format": "uri", + "x-ms-skip-url-encoding": true + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "AadOauth2Auth": [ + "https://communication.azure.com/.default" + ] + }, + { + "ApiKeyAuth": [] + } + ], + "securityDefinitions": { + "AadOauth2Auth": { + "type": "oauth2", + "description": "The Azure Active Directory OAuth2 Flow", + "flow": "accessCode", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://communication.azure.com/.default": "" + }, + "tokenUrl": "https://login.microsoftonline.com/common/oauth2/token" + }, + "ApiKeyAuth": { + "type": "apiKey", + "name": "Authorization", + "in": "header" + } + }, + "tags": [ + { + "name": "Template" + }, + { + "name": "Notifications" + }, + { + "name": "ReadReceipts" + }, + { + "name": "Stream" + }, + { + "name": "ConversationAdministration" + }, + { + "name": "ConversationThread" + } + ], + "paths": { + "/messages/channels/{channelId}/templates": { + "get": { + "operationId": "TemplateOperations_ListTemplates", + "tags": [ + "Template" + ], + "description": "List all templates for given Azure Communication Services channel", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "channelId", + "in": "path", + "description": "The registration ID of the channel.", + "required": true, + "type": "string", + "format": "uuid" + }, + { + "name": "maxPageSize", + "in": "query", + "description": "Number of objects to return per page.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedMessageTemplateItem" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets a list of templates": { + "$ref": "./examples/Template_ListTemplates.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/messages/conversations": { + "get": { + "operationId": "ConversationThreadOperations_ListConversations", + "tags": [ + "ConversationThread" + ], + "description": "Retrieves list of conversations.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "maxPageSize", + "in": "query", + "description": "Number of objects to return per page.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "participantId", + "in": "query", + "description": "The participant user ID", + "required": false, + "type": "string" + }, + { + "name": "channelId", + "in": "query", + "description": "The id of channel", + "required": false, + "type": "string", + "format": "uuid" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedConversation" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Retrieves list of conversations": { + "$ref": "./examples/ConversationThread_ListConversations.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + }, + "post": { + "operationId": "ConversationAdministrationOperations_CreateConversation", + "tags": [ + "ConversationAdministration" + ], + "description": "Creates a new conversation. This is only for create operation.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateConversationRequest" + } + } + ], + "responses": { + "201": { + "description": "The request has succeeded and a new resource has been created as a result.", + "schema": { + "$ref": "#/definitions/CommunicationConversation" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Creates a new conversation": { + "$ref": "./examples/ConversationAdministration_CreateConversation.json" + } + } + } + }, + "/messages/conversations/{conversationId}": { + "get": { + "operationId": "ConversationAdministrationOperations_GetConversation", + "tags": [ + "ConversationAdministration" + ], + "description": "Gets the details of a specific conversation.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "conversationId", + "in": "path", + "description": "The conversation ID.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/CommunicationConversation" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets the details of a specific conversation": { + "$ref": "./examples/ConversationAdministration_GetConversation.json" + } + } + }, + "delete": { + "operationId": "ConversationAdministrationOperations_DeleteConversation", + "tags": [ + "ConversationAdministration" + ], + "description": "Deletes a specific conversation.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "conversationId", + "in": "path", + "description": "The conversation ID.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. ", + "headers": { + "Repeatability-Result": { + "type": "string", + "description": "Indicates whether the repeatable request was accepted or rejected.", + "enum": [ + "accepted", + "rejected" + ], + "x-ms-enum": { + "name": "RepeatabilityResult", + "modelAsString": false, + "values": [ + { + "name": "accepted", + "value": "accepted", + "description": "If the request was accepted and the server guarantees that the server state reflects a single execution of the operation." + }, + { + "name": "rejected", + "value": "rejected", + "description": "If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid\nor because the Repeatability-First-Sent value was outside the range of values held by the server." + } + ] + } + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Deletes a specific conversation": { + "$ref": "./examples/ConversationAdministration_DeleteConversation.json" + } + } + } + }, + "/messages/conversations/{conversationId}:terminate": { + "post": { + "operationId": "ConversationAdministrationOperations_TerminateConversation", + "tags": [ + "ConversationAdministration" + ], + "description": "Terminates a specific conversation.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "conversationId", + "in": "path", + "description": "The conversation ID.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "headers": { + "Repeatability-Result": { + "type": "string", + "description": "Indicates whether the repeatable request was accepted or rejected.", + "enum": [ + "accepted", + "rejected" + ], + "x-ms-enum": { + "name": "RepeatabilityResult", + "modelAsString": false, + "values": [ + { + "name": "accepted", + "value": "accepted", + "description": "If the request was accepted and the server guarantees that the server state reflects a single execution of the operation." + }, + { + "name": "rejected", + "value": "rejected", + "description": "If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid\nor because the Repeatability-First-Sent value was outside the range of values held by the server." + } + ] + } + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Terminates a specific conversation": { + "$ref": "./examples/ConversationAdministration_TerminateConversation.json" + } + } + } + }, + "/messages/conversations/{conversationId}:analyze": { + "post": { + "operationId": "ConversationThreadOperations_AnalyzeConversation", + "tags": [ + "ConversationThread" + ], + "description": "Get AI Analysis of a conversation.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "conversationId", + "in": "path", + "description": "The conversation ID.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/GetConversationThreadAnalysisResult" + }, + "headers": { + "Repeatability-Result": { + "type": "string", + "description": "Indicates whether the repeatable request was accepted or rejected.", + "enum": [ + "accepted", + "rejected" + ], + "x-ms-enum": { + "name": "RepeatabilityResult", + "modelAsString": false, + "values": [ + { + "name": "accepted", + "value": "accepted", + "description": "If the request was accepted and the server guarantees that the server state reflects a single execution of the operation." + }, + { + "name": "rejected", + "value": "rejected", + "description": "If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid\nor because the Repeatability-First-Sent value was outside the range of values held by the server." + } + ] + } + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get AI Analysis of a conversation": { + "$ref": "./examples/ConversationThread_AnalyzeConversation.json" + } + } + } + }, + "/messages/conversations/{conversationId}/messages": { + "get": { + "operationId": "ConversationThreadOperations_ListMessages", + "tags": [ + "ConversationThread" + ], + "description": "Retrieves list of conversation messages.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "conversationId", + "in": "path", + "description": "The conversation ID.", + "required": true, + "type": "string" + }, + { + "name": "maxPageSize", + "in": "query", + "description": "Number of objects to return per page.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "participantId", + "in": "query", + "description": "The participant user ID", + "required": false, + "type": "string" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PagedConversationMessageItem" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Retrieves list of conversation messages": { + "$ref": "./examples/ConversationThread_ListMessages.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/messages/conversations/{conversationId}/messages:send": { + "post": { + "operationId": "ConversationThreadOperations_SendMessage", + "tags": [ + "ConversationThread" + ], + "description": "Sends a conversation message from Business to User.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "conversationId", + "in": "path", + "description": "The conversation ID.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/ConversationThreadSendRequestBody" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/SendConversationMessageResult" + }, + "headers": { + "Repeatability-Result": { + "type": "string", + "description": "Indicates whether the repeatable request was accepted or rejected.", + "enum": [ + "accepted", + "rejected" + ], + "x-ms-enum": { + "name": "RepeatabilityResult", + "modelAsString": false, + "values": [ + { + "name": "accepted", + "value": "accepted", + "description": "If the request was accepted and the server guarantees that the server state reflects a single execution of the operation." + }, + { + "name": "rejected", + "value": "rejected", + "description": "If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid\nor because the Repeatability-First-Sent value was outside the range of values held by the server." + } + ] + } + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Sends a conversation message from Business to User": { + "$ref": "./examples/ConversationThread_SendMessage.json" + } + } + } + }, + "/messages/conversations/{conversationId}/participants:add": { + "post": { + "operationId": "ConversationThreadOperations_AddParticipants", + "tags": [ + "ConversationThread" + ], + "description": "Adds participants to a specific conversation.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "conversationId", + "in": "path", + "description": "The conversation ID.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/AddParticipantsRequestBody" + } + ], + "responses": { + "207": { + "description": "Successful", + "schema": { + "$ref": "#/definitions/AddParticipantsResult" + }, + "headers": { + "Repeatability-Result": { + "type": "string", + "description": "Indicates whether the repeatable request was accepted or rejected.", + "enum": [ + "accepted", + "rejected" + ], + "x-ms-enum": { + "name": "RepeatabilityResult", + "modelAsString": false, + "values": [ + { + "name": "accepted", + "value": "accepted", + "description": "If the request was accepted and the server guarantees that the server state reflects a single execution of the operation." + }, + { + "name": "rejected", + "value": "rejected", + "description": "If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid\nor because the Repeatability-First-Sent value was outside the range of values held by the server." + } + ] + } + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Adds participants to a specific conversation": { + "$ref": "./examples/ConversationThread_AddParticipants.json" + } + } + } + }, + "/messages/conversations/{conversationId}/participants:remove": { + "post": { + "operationId": "ConversationThreadOperations_RemoveParticipants", + "tags": [ + "ConversationThread" + ], + "description": "remove a participant from a conversation", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "conversationId", + "in": "path", + "description": "The conversation ID.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/RemoveParticipantsRequestBody" + } + ], + "responses": { + "207": { + "description": "Successful", + "schema": { + "$ref": "#/definitions/RemoveParticipantsResult" + }, + "headers": { + "Repeatability-Result": { + "type": "string", + "description": "Indicates whether the repeatable request was accepted or rejected.", + "enum": [ + "accepted", + "rejected" + ], + "x-ms-enum": { + "name": "RepeatabilityResult", + "modelAsString": false, + "values": [ + { + "name": "accepted", + "value": "accepted", + "description": "If the request was accepted and the server guarantees that the server state reflects a single execution of the operation." + }, + { + "name": "rejected", + "value": "rejected", + "description": "If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid\nor because the Repeatability-First-Sent value was outside the range of values held by the server." + } + ] + } + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "remove a participant from a conversation": { + "$ref": "./examples/ConversationThread_RemoveParticipants.json" + } + } + } + }, + "/messages/notifications:send": { + "post": { + "operationId": "NotificationMessagesOperations_Send", + "tags": [ + "Notifications" + ], + "description": "Sends a notification message from Business to User.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/NotificationMessagesSendRequestBody" + } + ], + "responses": { + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "schema": { + "$ref": "#/definitions/SendMessageResult" + }, + "headers": { + "Repeatability-Result": { + "type": "string", + "description": "Indicates whether the repeatable request was accepted or rejected.", + "enum": [ + "accepted", + "rejected" + ], + "x-ms-enum": { + "name": "RepeatabilityResult", + "modelAsString": false, + "values": [ + { + "name": "accepted", + "value": "accepted", + "description": "If the request was accepted and the server guarantees that the server state reflects a single execution of the operation." + }, + { + "name": "rejected", + "value": "rejected", + "description": "If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid\nor because the Repeatability-First-Sent value was outside the range of values held by the server." + } + ] + } + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Sends a notification message - Interactive Button": { + "$ref": "./examples/NotificationMessages_SendButtonInteractiveMessage.json" + }, + "Sends a notification message - Interactive List": { + "$ref": "./examples/NotificationMessages_SendListInteractiveMessage.json" + }, + "Sends a notification message - Interactive Url": { + "$ref": "./examples/NotificationMessages_SendUrlInteractiveMessage.json" + }, + "Sends a notification message - Reaction": { + "$ref": "./examples/NotificationMessages_SendReaction.json" + }, + "Sends a notification message - Sticker": { + "$ref": "./examples/NotificationMessages_SendSticker.json" + }, + "Sends a notification message - Template": { + "$ref": "./examples/NotificationMessages_SendTemplate.json" + }, + "Sends a notification message - audio": { + "$ref": "./examples/NotificationMessages_SendAudio.json" + }, + "Sends a notification message - document": { + "$ref": "./examples/NotificationMessages_SendDocument.json" + }, + "Sends a notification message - image": { + "$ref": "./examples/NotificationMessages_SendImage.json" + }, + "Sends a notification message - text": { + "$ref": "./examples/NotificationMessages_SendText.json" + }, + "Sends a notification message - video": { + "$ref": "./examples/NotificationMessages_SendVideo.json" + } + } + } + }, + "/messages/readreceipts:send": { + "post": { + "operationId": "ReadReceiptsOperations_Send", + "tags": [ + "ReadReceipts" + ], + "description": "Sends a read receipt update from Business to User.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId" + }, + { + "$ref": "#/parameters/Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + }, + { + "$ref": "#/parameters/ReadReceiptSendRequestBody" + } + ], + "responses": { + "202": { + "description": "The request has been accepted for processing, but processing has not yet completed.", + "headers": { + "Repeatability-Result": { + "type": "string", + "description": "Indicates whether the repeatable request was accepted or rejected.", + "enum": [ + "accepted", + "rejected" + ], + "x-ms-enum": { + "name": "RepeatabilityResult", + "modelAsString": false, + "values": [ + { + "name": "accepted", + "value": "accepted", + "description": "If the request was accepted and the server guarantees that the server state reflects a single execution of the operation." + }, + { + "name": "rejected", + "value": "rejected", + "description": "If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid\nor because the Repeatability-First-Sent value was outside the range of values held by the server." + } + ] + } + }, + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Sends a read receipt": { + "$ref": "./examples/NotificationMessages_SendReadReceipt.json" + } + } + } + }, + "/messages/streams/{id}": { + "get": { + "operationId": "StreamOperations_GetMedia", + "tags": [ + "Stream" + ], + "description": "Download the Media payload from a User to Business message.", + "produces": [ + "application/octet-stream", + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "id", + "in": "path", + "description": "The stream ID.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/Azure.Core.ClientRequestIdHeader" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "type": "file" + }, + "headers": { + "x-ms-client-request-id": { + "type": "string", + "format": "uuid", + "description": "An opaque, globally-unique, client-generated string identifier for the request." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Download media": { + "$ref": "./examples/Stream_GetMedia.json" + } + } + } + } + }, + "definitions": { + "ActionBindings": { + "type": "object", + "description": "Binding actions to the interactive message.", + "properties": { + "kind": { + "$ref": "#/definitions/MessageActionBindingKind", + "description": "Kind of the MessageActionBinding." + } + }, + "discriminator": "kind", + "required": [ + "kind" + ] + }, + "ActionGroup": { + "type": "object", + "description": "The Action Group content.", + "properties": { + "title": { + "type": "string", + "description": "Title of the ActionGroup." + }, + "items": { + "type": "array", + "description": "Array of items in ActionGroup.", + "items": { + "$ref": "#/definitions/ActionGroupItem" + } + } + }, + "required": [ + "title", + "items" + ] + }, + "ActionGroupContent": { + "type": "object", + "description": "The action content of type ActionGroup.", + "properties": { + "title": { + "type": "string", + "description": "Title of the actionGroup content." + }, + "groups": { + "type": "array", + "description": "Set or group of actions.", + "items": { + "$ref": "#/definitions/ActionGroup" + } + } + }, + "required": [ + "title", + "groups" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageContent" + } + ], + "x-ms-discriminator-value": "group" + }, + "ActionGroupItem": { + "type": "object", + "description": "The Action group item in the content.", + "properties": { + "id": { + "type": "string", + "description": "Id of the Item." + }, + "title": { + "type": "string", + "description": "Title of the Item." + }, + "description": { + "type": "string", + "description": "Description of the Item." + } + }, + "required": [ + "id", + "title", + "description" + ] + }, + "AddParticipantsOptions": { + "type": "object", + "description": "Request payload for adding participants to a conversation.", + "properties": { + "participants": { + "type": "array", + "description": "List of participants to add.", + "items": { + "$ref": "#/definitions/ConversationParticipant" + } + } + }, + "required": [ + "participants" + ] + }, + "AddParticipantsResult": { + "type": "object", + "description": "Response for the add participants operation.", + "properties": { + "invalidParticipants": { + "type": "array", + "description": "List of Ids with Errors if failed to be added", + "items": { + "$ref": "#/definitions/UpdateParticipantsResult" + } + } + }, + "required": [ + "invalidParticipants" + ] + }, + "AudioConversationMessageContent": { + "type": "object", + "description": "A request to send an audio conversation message.", + "properties": { + "mediaUri": { + "type": "string", + "format": "uri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image" + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/ConversationMessageContent" + } + ], + "x-ms-discriminator-value": "audio" + }, + "AudioNotificationContent": { + "type": "object", + "description": "A request to send an audio notification.", + "properties": { + "mediaUri": { + "type": "string", + "format": "uri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image" + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/NotificationContent" + } + ], + "x-ms-discriminator-value": "audio" + }, + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + } + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "Azure.Core.uuid": { + "type": "string", + "format": "uuid", + "description": "Universally Unique Identifier" + }, + "BotContact": { + "type": "object", + "description": "Bot Contact.", + "properties": { + "botAppId": { + "type": "string", + "description": "Bot App Id of the Bot Contact." + } + }, + "required": [ + "botAppId" + ], + "allOf": [ + { + "$ref": "#/definitions/Contact" + } + ], + "x-ms-discriminator-value": "bot" + }, + "ButtonContent": { + "type": "object", + "description": "The message content of type Button information.", + "properties": { + "id": { + "type": "string", + "description": "Unique Id of the button content." + }, + "title": { + "type": "string", + "description": "Title of the button content." + } + }, + "required": [ + "id", + "title" + ] + }, + "ButtonSetContent": { + "type": "object", + "description": "The message content of type ButtonSet/ List of buttons information.", + "properties": { + "buttons": { + "type": "array", + "description": "Unique Id of the button content.", + "items": { + "$ref": "#/definitions/ButtonContent" + } + } + }, + "required": [ + "buttons" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageContent" + } + ], + "x-ms-discriminator-value": "buttonSet" + }, + "CommunicationContact": { + "type": "object", + "description": "Communication Contact.", + "allOf": [ + { + "$ref": "#/definitions/Contact" + } + ], + "x-ms-discriminator-value": "communication" + }, + "CommunicationConversation": { + "type": "object", + "description": "A conversation.", + "properties": { + "id": { + "type": "string", + "description": "The conversation ID.", + "readOnly": true + }, + "topic": { + "type": "string", + "description": "The conversation topic." + }, + "deliveryChannelIds": { + "type": "array", + "description": "List of delivery channel IDs.", + "items": { + "type": "string" + } + }, + "outboundDeliveryStrategy": { + "$ref": "#/definitions/OutboundDeliveryStrategyKind", + "description": "Outbound delivery strategy for the conversation." + }, + "participants": { + "type": "array", + "description": "List of participants involved in the conversation.", + "items": { + "$ref": "#/definitions/ConversationParticipant" + } + } + }, + "required": [ + "id" + ] + }, + "CommunicationMessageKind": { + "type": "string", + "description": "The type of message.", + "enum": [ + "text", + "image", + "image_v0", + "document", + "video", + "audio", + "template", + "sticker", + "reaction", + "interactive" + ], + "x-ms-enum": { + "name": "CommunicationMessageKind", + "modelAsString": true, + "values": [ + { + "name": "text", + "value": "text", + "description": "Text message type." + }, + { + "name": "image", + "value": "image", + "description": "Image message type." + }, + { + "name": "image_v0", + "value": "image_v0", + "description": "Image message type. Legacy image type for `MediaNotificationContent` which is being deprecated" + }, + { + "name": "document", + "value": "document", + "description": "Document message type." + }, + { + "name": "video", + "value": "video", + "description": "Video message type." + }, + { + "name": "audio", + "value": "audio", + "description": "Audio message type." + }, + { + "name": "template", + "value": "template", + "description": "Template message type." + }, + { + "name": "sticker", + "value": "sticker", + "description": "Sticker message type." + }, + { + "name": "reaction", + "value": "reaction", + "description": "Reaction message type." + }, + { + "name": "interactive", + "value": "interactive", + "description": "Interactive Actionable message type." + } + ] + } + }, + "CommunicationMessagesChannel": { + "type": "string", + "description": "The type of the communication messages channel.", + "enum": [ + "whatsApp" + ], + "x-ms-enum": { + "name": "CommunicationMessagesChannel", + "modelAsString": true, + "values": [ + { + "name": "whatsApp", + "value": "whatsApp", + "description": "The WhatsApp communication messages channel type." + } + ] + } + }, + "Contact": { + "type": "object", + "description": "Details of an external platform contact.", + "properties": { + "id": { + "type": "string", + "description": "External platform identifier." + }, + "kind": { + "$ref": "#/definitions/MessagePlatformKind", + "description": "Type of message platform (e.g., WhatsApp)." + } + }, + "discriminator": "kind", + "required": [ + "id", + "kind" + ] + }, + "ConversationMessageContent": { + "type": "object", + "description": "Details of the conversation message content.", + "properties": { + "kind": { + "$ref": "#/definitions/CommunicationMessageKind", + "description": "The type discriminator describing a message type." + } + }, + "discriminator": "kind", + "required": [ + "kind" + ] + }, + "ConversationMessageItem": { + "type": "object", + "description": "The conversation message as returned from the service.", + "properties": { + "id": { + "type": "string", + "description": "Message ID.", + "readOnly": true + }, + "sequenceId": { + "type": "integer", + "format": "int64", + "description": "Message sequence ID." + }, + "message": { + "$ref": "#/definitions/ConversationMessageContent", + "description": "Payload of a threaded conversation message." + }, + "senderDisplayName": { + "type": "string", + "description": "The display name of the message sender." + }, + "senderCommunicationIdentifier": { + "type": "string", + "description": "The communication identifier of the message sender." + }, + "createdOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the message is sent." + } + }, + "required": [ + "id", + "message", + "senderCommunicationIdentifier", + "createdOn" + ] + }, + "ConversationParticipant": { + "type": "object", + "description": "Advanced Messaging conversation participant.", + "properties": { + "id": { + "type": "string", + "description": "Participant Identifier.", + "readOnly": true + }, + "displayName": { + "type": "string", + "description": "Participant display name." + }, + "kind": { + "$ref": "#/definitions/ParticipantKind", + "description": "The type discriminator describing a participant type." + } + }, + "discriminator": "kind", + "required": [ + "id", + "kind" + ] + }, + "CreateConversationRequest": { + "type": "object", + "description": "Request payload for creating a conversation.", + "properties": { + "conversation": { + "$ref": "#/definitions/CommunicationConversation", + "description": "The conversation details.", + "x-ms-mutability": [ + "create" + ] + }, + "initialMessage": { + "$ref": "#/definitions/Message", + "description": "An initial message within the conversation." + } + }, + "required": [ + "conversation" + ] + }, + "DocumentConversationMessageContent": { + "type": "object", + "description": "A request to send a document conversation message.", + "properties": { + "caption": { + "type": "string", + "description": "Optional text content." + }, + "fileName": { + "type": "string", + "description": "Optional name for the file." + }, + "mediaUri": { + "type": "string", + "format": "uri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image" + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/ConversationMessageContent" + } + ], + "x-ms-discriminator-value": "document" + }, + "DocumentMessageContent": { + "type": "object", + "description": "The message content of type document information.", + "properties": { + "mediaUri": { + "type": "string", + "format": "uri", + "description": "MediaUri of the media content." + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageContent" + } + ], + "x-ms-discriminator-value": "document" + }, + "DocumentNotificationContent": { + "type": "object", + "description": "A request to send a document notification.", + "properties": { + "caption": { + "type": "string", + "description": "Optional text content." + }, + "fileName": { + "type": "string", + "description": "Optional name for the file." + }, + "mediaUri": { + "type": "string", + "format": "uri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image" + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/NotificationContent" + } + ], + "x-ms-discriminator-value": "document" + }, + "ExternalConversationParticipant": { + "type": "object", + "description": "External conversation participant.", + "properties": { + "contacts": { + "type": "array", + "description": "List of external platform identifiers for the participant.", + "items": { + "$ref": "#/definitions/Contact" + } + } + }, + "required": [ + "contacts" + ], + "allOf": [ + { + "$ref": "#/definitions/ConversationParticipant" + } + ], + "x-ms-discriminator-value": "external" + }, + "GetConversationThreadAnalysisResult": { + "type": "object", + "description": "Result of the get conversation messages AI Analysis operation.", + "properties": { + "summary": { + "type": "string", + "description": "The AI summary of the conversation messages." + } + }, + "required": [ + "summary" + ] + }, + "ImageConversationMessageContent": { + "type": "object", + "description": "A request to send an image conversation message.", + "properties": { + "caption": { + "type": "string", + "description": "Optional text content." + }, + "mediaUri": { + "type": "string", + "format": "uri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image" + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/ConversationMessageContent" + } + ], + "x-ms-discriminator-value": "image" + }, + "ImageMessageContent": { + "type": "object", + "description": "The message content of type image information.", + "properties": { + "mediaUri": { + "type": "string", + "format": "uri", + "description": "MediaUri of the media content." + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageContent" + } + ], + "x-ms-discriminator-value": "image" + }, + "ImageNotificationContent": { + "type": "object", + "description": "A request to send an image notification.", + "properties": { + "caption": { + "type": "string", + "description": "Optional text content." + }, + "mediaUri": { + "type": "string", + "format": "uri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image" + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/NotificationContent" + } + ], + "x-ms-discriminator-value": "image" + }, + "InteractiveMessage": { + "type": "object", + "description": "The Interactive message content to which user can read and respond.", + "properties": { + "header": { + "$ref": "#/definitions/MessageContent", + "description": "Gets or Sets Header content. Supports the following types:text, images etc." + }, + "body": { + "$ref": "#/definitions/TextMessageContent", + "description": "Gets or Sets Message body content. Emojis, markdown, and links are supported." + }, + "footer": { + "$ref": "#/definitions/TextMessageContent", + "description": "Gets or Sets Message footer content. Emojis, markdown, and links are supported." + }, + "action": { + "$ref": "#/definitions/ActionBindings", + "description": "The binding object to get or set Action which describes options user have to respond to message." + } + }, + "required": [ + "body", + "action" + ] + }, + "InteractiveNotificationContent": { + "type": "object", + "description": "A request to send an Interactive message notification.", + "properties": { + "interactiveMessage": { + "$ref": "#/definitions/InteractiveMessage", + "description": "The interactive message content." + } + }, + "required": [ + "interactiveMessage" + ], + "allOf": [ + { + "$ref": "#/definitions/NotificationContent" + } + ], + "x-ms-discriminator-value": "interactive" + }, + "InternalConversationParticipant": { + "type": "object", + "description": "Internal conversation participant.", + "properties": { + "contact": { + "$ref": "#/definitions/Contact", + "description": "The internal platform identifiers for the participant." + } + }, + "required": [ + "contact" + ], + "allOf": [ + { + "$ref": "#/definitions/ConversationParticipant" + } + ], + "x-ms-discriminator-value": "internal" + }, + "LinkContent": { + "type": "object", + "description": "The message content of type Url information.", + "properties": { + "title": { + "type": "string", + "description": "Title of the url content." + }, + "url": { + "type": "string", + "format": "uri", + "description": "The url in the content." + } + }, + "required": [ + "title", + "url" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageContent" + } + ], + "x-ms-discriminator-value": "url" + }, + "MediaNotificationContent": { + "type": "object", + "description": "@deprecated A request to send an image notification.", + "properties": { + "content": { + "type": "string", + "description": "Optional text content." + }, + "mediaUri": { + "type": "string", + "format": "uri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image" + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/NotificationContent" + } + ], + "x-ms-discriminator-value": "image_v0" + }, + "Message": { + "type": "object", + "description": "Details of a message.", + "properties": { + "content": { + "type": "string", + "description": "Content of the message." + } + }, + "required": [ + "content" + ] + }, + "MessageActionBindingKind": { + "type": "string", + "description": "The Kind of interactive message channel action binding like WhatsAppListAction.", + "enum": [ + "whatsAppListAction", + "whatsAppButtonAction", + "whatsAppUrlAction" + ], + "x-ms-enum": { + "name": "MessageActionBindingKind", + "modelAsString": true, + "values": [ + { + "name": "whatsAppListAction", + "value": "whatsAppListAction", + "description": "The WhatsApp List action binding kind." + }, + { + "name": "whatsAppButtonAction", + "value": "whatsAppButtonAction", + "description": "The WhatsApp Button action binding kind." + }, + { + "name": "whatsAppUrlAction", + "value": "whatsAppUrlAction", + "description": "The WhatsApp Url action binding kind." + } + ] + } + }, + "MessageContent": { + "type": "object", + "description": "The message content object used to create interactive messages components.", + "properties": { + "kind": { + "$ref": "#/definitions/MessageContentKind", + "description": "Kind of MessageContent." + } + }, + "discriminator": "kind", + "required": [ + "kind" + ] + }, + "MessageContentKind": { + "type": "string", + "description": "The kind of Interactive message content.", + "enum": [ + "text", + "image", + "video", + "document", + "group", + "buttonSet", + "url" + ], + "x-ms-enum": { + "name": "MessageContentKind", + "modelAsString": true, + "values": [ + { + "name": "text", + "value": "text", + "description": "The text content type." + }, + { + "name": "image", + "value": "image", + "description": "The image content type." + }, + { + "name": "video", + "value": "video", + "description": "The video content type." + }, + { + "name": "document", + "value": "document", + "description": "The document content type." + }, + { + "name": "group", + "value": "group", + "description": "The ActionSet content type." + }, + { + "name": "buttonSet", + "value": "buttonSet", + "description": "The ButtonSet content type." + }, + { + "name": "url", + "value": "url", + "description": "The Url content type." + } + ] + } + }, + "MessagePlatformKind": { + "type": "string", + "description": "Defines the type of message platform.", + "enum": [ + "communication", + "bot", + "whatsApp" + ], + "x-ms-enum": { + "name": "MessagePlatformKind", + "modelAsString": true, + "values": [ + { + "name": "communication", + "value": "communication", + "description": "Azure Communication platform." + }, + { + "name": "bot", + "value": "bot", + "description": "Bot platform." + }, + { + "name": "whatsApp", + "value": "whatsApp", + "description": "WhatsApp platform." + } + ] + } + }, + "MessageReceipt": { + "type": "object", + "description": "Receipt of the sending one message.", + "properties": { + "messageId": { + "type": "string", + "description": "The message id." + }, + "to": { + "type": "string", + "description": "The native external platform user identifier of the recipient." + } + }, + "required": [ + "messageId", + "to" + ] + }, + "MessageTemplate": { + "type": "object", + "description": "The template object used to create templates.", + "properties": { + "name": { + "type": "string", + "description": "Name of the template." + }, + "language": { + "type": "string", + "description": "The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'." + }, + "values": { + "type": "array", + "description": "The template values.", + "items": { + "$ref": "#/definitions/MessageTemplateValue" + } + }, + "bindings": { + "$ref": "#/definitions/MessageTemplateBindings", + "description": "The binding object to link values to the template specific locations" + } + }, + "required": [ + "name", + "language" + ] + }, + "MessageTemplateBindings": { + "type": "object", + "description": "The binding object to link values to the template specific locations", + "properties": { + "kind": { + "$ref": "#/definitions/MessageTemplateBindingsKind", + "description": "The type discriminator describing a template bindings type." + } + }, + "discriminator": "kind", + "required": [ + "kind" + ] + }, + "MessageTemplateBindingsKind": { + "type": "string", + "description": "The type of the message template.", + "enum": [ + "whatsApp" + ], + "x-ms-enum": { + "name": "MessageTemplateBindingsKind", + "modelAsString": true, + "values": [ + { + "name": "whatsApp", + "value": "whatsApp", + "description": "The WhatsApp template type." + } + ] + } + }, + "MessageTemplateDocument": { + "type": "object", + "description": "The message template's document value information.", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "The (public) URL of the media." + }, + "caption": { + "type": "string", + "description": "The [optional] caption of the media object." + }, + "fileName": { + "type": "string", + "description": "The [optional] filename of the media file." + } + }, + "required": [ + "url" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageTemplateValue" + } + ], + "x-ms-discriminator-value": "document" + }, + "MessageTemplateImage": { + "type": "object", + "description": "The message template's image value information.", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "The (public) URL of the media." + }, + "caption": { + "type": "string", + "description": "The [optional] caption of the media object." + }, + "fileName": { + "type": "string", + "description": "The [optional] filename of the media file." + } + }, + "required": [ + "url" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageTemplateValue" + } + ], + "x-ms-discriminator-value": "image" + }, + "MessageTemplateItem": { + "type": "object", + "description": "The message template as returned from the service.", + "properties": { + "name": { + "type": "string", + "description": "The template's name.", + "readOnly": true + }, + "language": { + "type": "string", + "description": "The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'." + }, + "status": { + "$ref": "#/definitions/MessageTemplateStatus", + "description": "The aggregated template status." + }, + "kind": { + "$ref": "#/definitions/CommunicationMessagesChannel", + "description": "The type discriminator describing a template type." + } + }, + "discriminator": "kind", + "required": [ + "name", + "language", + "status", + "kind" + ] + }, + "MessageTemplateLocation": { + "type": "object", + "description": "The message template's location value information.", + "properties": { + "locationName": { + "type": "string", + "description": "The [Optional] name of the location." + }, + "address": { + "type": "string", + "description": "The [Optional] address of the location." + }, + "latitude": { + "type": "number", + "format": "double", + "description": "The latitude of the location." + }, + "longitude": { + "type": "number", + "format": "double", + "description": "The longitude of the location." + } + }, + "required": [ + "latitude", + "longitude" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageTemplateValue" + } + ], + "x-ms-discriminator-value": "location" + }, + "MessageTemplateQuickAction": { + "type": "object", + "description": "The message template's quick action value information.", + "properties": { + "text": { + "type": "string", + "description": "The [Optional] quick action text" + }, + "payload": { + "type": "string", + "description": "The [Optional] quick action payload" + } + }, + "allOf": [ + { + "$ref": "#/definitions/MessageTemplateValue" + } + ], + "x-ms-discriminator-value": "quickAction" + }, + "MessageTemplateStatus": { + "type": "string", + "description": "The aggregated template status.", + "enum": [ + "approved", + "rejected", + "pending", + "paused" + ], + "x-ms-enum": { + "name": "MessageTemplateStatus", + "modelAsString": true, + "values": [ + { + "name": "approved", + "value": "approved", + "description": "Message template is approved." + }, + { + "name": "rejected", + "value": "rejected", + "description": "Message template is rejected." + }, + { + "name": "pending", + "value": "pending", + "description": "Message template is pending." + }, + { + "name": "paused", + "value": "paused", + "description": "Message template is paused." + } + ] + } + }, + "MessageTemplateText": { + "type": "object", + "description": "The message template's text value information.", + "properties": { + "text": { + "type": "string", + "description": "The text value." + } + }, + "required": [ + "text" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageTemplateValue" + } + ], + "x-ms-discriminator-value": "text" + }, + "MessageTemplateValue": { + "type": "object", + "description": "The class describes a parameter of a template.", + "properties": { + "name": { + "type": "string", + "description": "Template binding reference name" + }, + "kind": { + "$ref": "#/definitions/MessageTemplateValueKind", + "description": "The type discriminator describing a template parameter type." + } + }, + "discriminator": "kind", + "required": [ + "name", + "kind" + ] + }, + "MessageTemplateValueKind": { + "type": "string", + "description": "The type of the template parameter.", + "enum": [ + "text", + "image", + "document", + "video", + "location", + "quickAction" + ], + "x-ms-enum": { + "name": "MessageTemplateValueKind", + "modelAsString": true, + "values": [ + { + "name": "text", + "value": "text", + "description": "The text template parameter type." + }, + { + "name": "image", + "value": "image", + "description": "The image template parameter type." + }, + { + "name": "document", + "value": "document", + "description": "The document template parameter type." + }, + { + "name": "video", + "value": "video", + "description": "The video template parameter type." + }, + { + "name": "location", + "value": "location", + "description": "The location template parameter type." + }, + { + "name": "quickAction", + "value": "quickAction", + "description": "The quick action template parameter type." + } + ] + } + }, + "MessageTemplateVideo": { + "type": "object", + "description": "The message template's video value information.", + "properties": { + "url": { + "type": "string", + "format": "uri", + "description": "The (public) URL of the media." + }, + "caption": { + "type": "string", + "description": "The [optional] caption of the media object." + }, + "fileName": { + "type": "string", + "description": "The [optional] filename of the media file." + } + }, + "required": [ + "url" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageTemplateValue" + } + ], + "x-ms-discriminator-value": "video" + }, + "NotificationContent": { + "type": "object", + "description": "Details of the message to send.", + "properties": { + "channelRegistrationId": { + "$ref": "#/definitions/Azure.Core.uuid", + "description": "The Channel Registration ID for the Business Identifier." + }, + "to": { + "type": "array", + "description": "The native external platform user identifiers of the recipient.", + "items": { + "type": "string" + } + }, + "kind": { + "$ref": "#/definitions/CommunicationMessageKind", + "description": "The type discriminator describing a message type." + } + }, + "discriminator": "kind", + "required": [ + "channelRegistrationId", + "to", + "kind" + ] + }, + "OutboundDeliveryStrategyKind": { + "type": "string", + "description": "The options of the outbound delivery strategy for messages sent by participants in a conversation.", + "enum": [ + "internalOnly", + "allParticipants" + ], + "x-ms-enum": { + "name": "OutboundDeliveryStrategyKind", + "modelAsString": true, + "values": [ + { + "name": "internalOnly", + "value": "internalOnly", + "description": "Delivery strategy for internal only." + }, + { + "name": "allParticipants", + "value": "allParticipants", + "description": "Delivery strategy for all participants." + } + ] + } + }, + "PagedConversation": { + "type": "object", + "description": "Paged collection of Conversation items", + "properties": { + "value": { + "type": "array", + "description": "The Conversation items on this page", + "items": { + "$ref": "#/definitions/CommunicationConversation" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "PagedConversationMessageItem": { + "type": "object", + "description": "Paged collection of ConversationMessageItem items", + "properties": { + "value": { + "type": "array", + "description": "The ConversationMessageItem items on this page", + "items": { + "$ref": "#/definitions/ConversationMessageItem" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "PagedMessageTemplateItem": { + "type": "object", + "description": "Paged collection of MessageTemplateItem items", + "properties": { + "value": { + "type": "array", + "description": "The MessageTemplateItem items on this page", + "items": { + "$ref": "#/definitions/MessageTemplateItem" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "ParticipantKind": { + "type": "string", + "description": "The type of a participant in a threaded conversation.", + "enum": [ + "internal", + "external" + ], + "x-ms-enum": { + "name": "ParticipantKind", + "modelAsString": true, + "values": [ + { + "name": "internal", + "value": "internal", + "description": "A participant internal to Azure Communication Services." + }, + { + "name": "external", + "value": "external", + "description": "A participant on other platforms" + } + ] + } + }, + "ReactionNotificationContent": { + "type": "object", + "description": "A request to send a Reaction notification.", + "properties": { + "emoji": { + "type": "string", + "description": "emoji content like \\uD83D\\uDE00." + }, + "messageId": { + "type": "string", + "description": "ID of the previous message you want to reply to." + } + }, + "required": [ + "emoji", + "messageId" + ], + "allOf": [ + { + "$ref": "#/definitions/NotificationContent" + } + ], + "x-ms-discriminator-value": "reaction" + }, + "ReadReceiptContent": { + "type": "object", + "description": "A request to send a read receipt update from Business to User.", + "properties": { + "messageId": { + "type": "string", + "description": "The id of the message this read receipt refers to." + }, + "channelRegistrationId": { + "$ref": "#/definitions/Azure.Core.uuid", + "description": "The Channel Registration ID for the Business Identifier." + }, + "typingIndicator": { + "type": "boolean", + "description": "Whether this status update includes a typing indicator. This field defaults to false when not provided." + } + }, + "required": [ + "messageId", + "channelRegistrationId" + ] + }, + "RemoveParticipantsOptions": { + "type": "object", + "description": "Request payload for removing participants from a conversation.", + "properties": { + "participantIds": { + "type": "array", + "description": "The participant IDs to remove.", + "items": { + "type": "string" + } + } + }, + "required": [ + "participantIds" + ] + }, + "RemoveParticipantsResult": { + "type": "object", + "description": "Response for the remove participants operation.", + "properties": { + "invalidParticipants": { + "type": "array", + "description": "List of Ids with Errors if failed to be added", + "items": { + "$ref": "#/definitions/UpdateParticipantsResult" + } + } + }, + "required": [ + "invalidParticipants" + ] + }, + "SendConversationMessageOptions": { + "type": "object", + "description": "Request payload for sending a conversation message.", + "properties": { + "request": { + "$ref": "#/definitions/ConversationMessageContent", + "description": "Details of a send conversation message request." + }, + "outboundDeliveryStrategy": { + "$ref": "#/definitions/OutboundDeliveryStrategyKind", + "description": "The options of the outbound delivery strategy for messages sent by participants in a conversation.\r\nSupports internalOnly, allChannels." + } + }, + "required": [ + "request" + ] + }, + "SendConversationMessageResult": { + "type": "object", + "description": "Result of the send conversation message operation.", + "properties": { + "messageId": { + "type": "string", + "description": "A server-generated Advanced Messaging conversation message id." + } + }, + "required": [ + "messageId" + ] + }, + "SendMessageResult": { + "type": "object", + "description": "Result of the send message operation.", + "properties": { + "receipts": { + "type": "array", + "description": "Receipts of the send message operation.", + "items": { + "$ref": "#/definitions/MessageReceipt" + } + } + }, + "required": [ + "receipts" + ] + }, + "StickerNotificationContent": { + "type": "object", + "description": "A request to send a Sticker notification.", + "properties": { + "mediaUri": { + "type": "string", + "format": "uri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image" + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/NotificationContent" + } + ], + "x-ms-discriminator-value": "sticker" + }, + "TemplateConversationMessageContent": { + "type": "object", + "description": "A request to send a template conversation message.", + "properties": { + "template": { + "$ref": "#/definitions/MessageTemplate", + "description": "The template object used to create templates." + } + }, + "required": [ + "template" + ], + "allOf": [ + { + "$ref": "#/definitions/ConversationMessageContent" + } + ], + "x-ms-discriminator-value": "template" + }, + "TemplateNotificationContent": { + "type": "object", + "description": "A request to send a template notification.", + "properties": { + "template": { + "$ref": "#/definitions/MessageTemplate", + "description": "The template object used to create templates." + } + }, + "required": [ + "template" + ], + "allOf": [ + { + "$ref": "#/definitions/NotificationContent" + } + ], + "x-ms-discriminator-value": "template" + }, + "TextConversationMessageContent": { + "type": "object", + "description": "A request to send a text conversation message.", + "properties": { + "content": { + "type": "string", + "description": "Message content." + } + }, + "required": [ + "content" + ], + "allOf": [ + { + "$ref": "#/definitions/ConversationMessageContent" + } + ], + "x-ms-discriminator-value": "text" + }, + "TextMessageContent": { + "type": "object", + "description": "The message content of type text information.", + "properties": { + "text": { + "type": "string", + "description": "The text value." + } + }, + "required": [ + "text" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageContent" + } + ], + "x-ms-discriminator-value": "text" + }, + "TextNotificationContent": { + "type": "object", + "description": "A request to send a text notification.", + "properties": { + "content": { + "type": "string", + "description": "Message content." + } + }, + "required": [ + "content" + ], + "allOf": [ + { + "$ref": "#/definitions/NotificationContent" + } + ], + "x-ms-discriminator-value": "text" + }, + "UpdateParticipantsResult": { + "type": "object", + "description": "Response for the remove participants operation.", + "properties": { + "id": { + "type": "string", + "description": "Participant User Id." + }, + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "Error of the participant operation." + } + }, + "required": [ + "id" + ] + }, + "VideoConversationMessageContent": { + "type": "object", + "description": "A request to send a video conversation message.", + "properties": { + "caption": { + "type": "string", + "description": "Optional text content." + }, + "mediaUri": { + "type": "string", + "format": "uri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image" + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/ConversationMessageContent" + } + ], + "x-ms-discriminator-value": "video" + }, + "VideoMessageContent": { + "type": "object", + "description": "The message content of type video information.", + "properties": { + "mediaUri": { + "type": "string", + "format": "uri", + "description": "MediaUri of the media content." + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/MessageContent" + } + ], + "x-ms-discriminator-value": "video" + }, + "VideoNotificationContent": { + "type": "object", + "description": "A request to send a video notification.", + "properties": { + "caption": { + "type": "string", + "description": "Optional text content." + }, + "mediaUri": { + "type": "string", + "format": "uri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image" + } + }, + "required": [ + "mediaUri" + ], + "allOf": [ + { + "$ref": "#/definitions/NotificationContent" + } + ], + "x-ms-discriminator-value": "video" + }, + "WhatsAppButtonActionBindings": { + "type": "object", + "description": "WhatsApp Binding actions to the interactive message.", + "properties": { + "content": { + "$ref": "#/definitions/ButtonSetContent", + "description": "Action content of Interactive message." + } + }, + "required": [ + "content" + ], + "allOf": [ + { + "$ref": "#/definitions/ActionBindings" + } + ], + "x-ms-discriminator-value": "whatsAppButtonAction" + }, + "WhatsAppContact": { + "type": "object", + "description": "WhatsApp Contact.", + "allOf": [ + { + "$ref": "#/definitions/Contact" + } + ], + "x-ms-discriminator-value": "whatsApp" + }, + "WhatsAppListActionBindings": { + "type": "object", + "description": "WhatsApp List Binding actions to the interactive message.", + "properties": { + "content": { + "$ref": "#/definitions/ActionGroupContent", + "description": "Action content of Interactive message." + } + }, + "required": [ + "content" + ], + "allOf": [ + { + "$ref": "#/definitions/ActionBindings" + } + ], + "x-ms-discriminator-value": "whatsAppListAction" + }, + "WhatsAppMessageButtonSubType": { + "type": "string", + "description": "The WhatsApp button sub type.", + "enum": [ + "quickReply", + "url" + ], + "x-ms-enum": { + "name": "WhatsAppMessageButtonSubType", + "modelAsString": true, + "values": [ + { + "name": "quickReply", + "value": "quickReply", + "description": "The WhatsApp button sub type is quick reply." + }, + { + "name": "url", + "value": "url", + "description": "The WhatsApp button sub type is url." + } + ] + } + }, + "WhatsAppMessageTemplateBindings": { + "type": "object", + "description": "The template bindings for WhatsApp", + "properties": { + "header": { + "type": "array", + "description": "The header template bindings", + "items": { + "$ref": "#/definitions/WhatsAppMessageTemplateBindingsComponent" + } + }, + "body": { + "type": "array", + "description": "The body template bindings", + "items": { + "$ref": "#/definitions/WhatsAppMessageTemplateBindingsComponent" + } + }, + "footer": { + "type": "array", + "description": "The footer template bindings", + "items": { + "$ref": "#/definitions/WhatsAppMessageTemplateBindingsComponent" + } + }, + "buttons": { + "type": "array", + "description": "The button template bindings", + "items": { + "$ref": "#/definitions/WhatsAppMessageTemplateBindingsButton" + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/MessageTemplateBindings" + } + ], + "x-ms-discriminator-value": "whatsApp" + }, + "WhatsAppMessageTemplateBindingsButton": { + "type": "object", + "description": "The template bindings component button for WhatsApp", + "properties": { + "subType": { + "$ref": "#/definitions/WhatsAppMessageButtonSubType", + "description": "The WhatsApp button sub type" + }, + "refValue": { + "type": "string", + "description": "The name of the referenced item in the template values." + } + }, + "required": [ + "subType", + "refValue" + ] + }, + "WhatsAppMessageTemplateBindingsComponent": { + "type": "object", + "description": "The template bindings component for WhatsApp", + "properties": { + "refValue": { + "type": "string", + "description": "The name of the referenced item in the template values." + } + }, + "required": [ + "refValue" + ] + }, + "WhatsAppMessageTemplateItem": { + "type": "object", + "description": "The WhatsApp-specific template response contract", + "properties": { + "content": { + "description": "WhatsApp platform's template content. This is the payload returned from WhatsApp API." + } + }, + "allOf": [ + { + "$ref": "#/definitions/MessageTemplateItem" + } + ], + "x-ms-discriminator-value": "whatsApp" + }, + "WhatsAppUrlActionBindings": { + "type": "object", + "description": "WhatsApp Binding actions to the interactive message.", + "properties": { + "content": { + "$ref": "#/definitions/LinkContent", + "description": "Action content of Interactive message." + } + }, + "required": [ + "content" + ], + "allOf": [ + { + "$ref": "#/definitions/ActionBindings" + } + ], + "x-ms-discriminator-value": "whatsAppUrlAction" + } + }, + "parameters": { + "AddParticipantsRequestBody": { + "name": "options", + "in": "body", + "description": "Details of the payload for adding participants to a conversation.", + "required": true, + "schema": { + "$ref": "#/definitions/AddParticipantsOptions" + }, + "x-ms-parameter-location": "method" + }, + "Azure.Core.ClientRequestIdHeader": { + "name": "x-ms-client-request-id", + "in": "header", + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "required": false, + "type": "string", + "format": "uuid", + "x-ms-parameter-location": "method", + "x-ms-client-name": "clientRequestId" + }, + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + }, + "Azure.Core.RepeatabilityRequestHeaders.repeatabilityFirstSent": { + "name": "Repeatability-First-Sent", + "in": "header", + "description": "Specifies the date and time at which the request was first created.", + "required": false, + "type": "string", + "format": "date-time", + "x-ms-parameter-location": "method", + "x-ms-client-name": "repeatabilityFirstSent" + }, + "Azure.Core.RepeatabilityRequestHeaders.repeatabilityRequestId": { + "name": "Repeatability-Request-ID", + "in": "header", + "description": "An opaque, globally-unique, client-generated string identifier for the request.", + "required": false, + "type": "string", + "x-ms-parameter-location": "method", + "x-ms-client-name": "repeatabilityRequestId" + }, + "ConversationThreadSendRequestBody": { + "name": "options", + "in": "body", + "description": "Details of the conversation message to send.", + "required": true, + "schema": { + "$ref": "#/definitions/SendConversationMessageOptions" + }, + "x-ms-parameter-location": "method" + }, + "NotificationMessagesSendRequestBody": { + "name": "body", + "in": "body", + "description": "Details of the message to send.", + "required": true, + "schema": { + "$ref": "#/definitions/NotificationContent" + }, + "x-ms-parameter-location": "method" + }, + "ReadReceiptSendRequestBody": { + "name": "readReceiptContent", + "in": "body", + "description": "Details of the read receipt update to send.", + "required": true, + "schema": { + "$ref": "#/definitions/ReadReceiptContent" + }, + "x-ms-parameter-location": "method" + }, + "RemoveParticipantsRequestBody": { + "name": "options", + "in": "body", + "description": "Details of the request body for removing participants from a conversation.", + "required": true, + "schema": { + "$ref": "#/definitions/RemoveParticipantsOptions" + }, + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_CreateConversation.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_CreateConversation.json new file mode 100644 index 000000000000..f981075ec6ef --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_CreateConversation.json @@ -0,0 +1,79 @@ +{ + "title": "Creates a new conversation", + "operationId": "ConversationAdministrationOperations_CreateConversation", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "conversation": { + "topic": "Test", + "deliveryChannelIds": [ + "0f0eb78e-a576-1dfc-b414-0f0756de3338" + ], + "outboundDeliveryStrategy": "allParticipants", + "participants": [ + { + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12345678901", + "kind": "whatsApp" + } + ] + }, + { + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid1", + "kind": "communication" + } + } + ] + }, + "initialMessage": { + "content": "I need help" + } + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "201": { + "body": { + "id": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "topic": "Test", + "deliveryChannelIds": [ + "0f0eb78e-a576-1dfc-b414-0f0756de3338" + ], + "outboundDeliveryStrategy": "allParticipants", + "participants": [ + { + "id": "8:acs:uuid2", + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12345678901", + "kind": "whatsApp" + }, + { + "id": "8:acs:uuid2", + "kind": "communication" + } + ] + }, + { + "id": "8:acs:uuid1", + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid1", + "kind": "communication" + } + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_DeleteConversation.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_DeleteConversation.json new file mode 100644 index 000000000000..cf99d91ab1ae --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_DeleteConversation.json @@ -0,0 +1,12 @@ +{ + "title": "Deletes a specific conversation", + "operationId": "ConversationAdministrationOperations_DeleteConversation", + "parameters": { + "api-version": "2025-09-01-preview", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "204": {} + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_GetConversation.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_GetConversation.json new file mode 100644 index 000000000000..efa78437e044 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_GetConversation.json @@ -0,0 +1,47 @@ +{ + "title": "Gets the details of a specific conversation", + "operationId": "ConversationAdministrationOperations_GetConversation", + "parameters": { + "api-version": "2025-09-01-preview", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "id": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "topic": "Test", + "deliveryChannelIds": [ + "0f0eb78e-a576-1dfc-b414-0f0756de3338" + ], + "outboundDeliveryStrategy": "allParticipants", + "participants": [ + { + "id": "8:acs:uuid2", + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12345678901", + "kind": "whatsApp" + }, + { + "id": "8:acs:uuid2", + "kind": "communication" + } + ] + }, + { + "id": "8:acs:uuid1", + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid1", + "kind": "communication" + } + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_TerminateConversation.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_TerminateConversation.json new file mode 100644 index 000000000000..216ff531ef19 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationAdministration_TerminateConversation.json @@ -0,0 +1,12 @@ +{ + "title": "Terminates a specific conversation", + "operationId": "ConversationAdministrationOperations_TerminateConversation", + "parameters": { + "api-version": "2025-09-01-preview", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": {} + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_AddParticipants.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_AddParticipants.json new file mode 100644 index 000000000000..7a03d6b1e73d --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_AddParticipants.json @@ -0,0 +1,39 @@ +{ + "title": "Adds participants to a specific conversation", + "operationId": "ConversationThreadOperations_AddParticipants", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "options": { + "participants": [ + { + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12345678901", + "kind": "whatsApp" + } + ] + }, + { + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid1", + "kind": "communication" + } + } + ] + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "207": { + "body": { + "invalidParticipants": [] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_AnalyzeConversation.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_AnalyzeConversation.json new file mode 100644 index 000000000000..fed3e276f9a0 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_AnalyzeConversation.json @@ -0,0 +1,16 @@ +{ + "title": "Get AI Analysis of a conversation", + "operationId": "ConversationThreadOperations_AnalyzeConversation", + "parameters": { + "api-version": "2025-09-01-preview", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "summary": "The customer needs help." + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_ListConversations.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_ListConversations.json new file mode 100644 index 000000000000..8cbcb28bba10 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_ListConversations.json @@ -0,0 +1,86 @@ +{ + "title": "Retrieves list of conversations", + "operationId": "ConversationThreadOperations_ListConversations", + "parameters": { + "api-version": "2025-09-01-preview", + "maxPageSize": 25, + "channelId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "topic": "Test", + "deliveryChannelIds": [ + "0f0eb78e-a576-1dfc-b414-0f0756de3338" + ], + "outboundDeliveryStrategy": "allParticipants", + "participants": [ + { + "id": "8:acs:uuid2", + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12345678901", + "kind": "whatsApp" + }, + { + "id": "8:acs:uuid2", + "kind": "communication" + } + ] + }, + { + "id": "8:acs:uuid1", + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid1", + "kind": "communication" + } + } + ] + }, + { + "id": "19:111dfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "topic": "Test", + "deliveryChannelIds": [ + "0f0eb78e-a576-1dfc-b414-0f0756de3338" + ], + "outboundDeliveryStrategy": "allParticipants", + "participants": [ + { + "id": "8:acs:uuid3", + "displayName": "Customer", + "kind": "external", + "contacts": [ + { + "id": "12331112222", + "kind": "whatsApp" + }, + { + "id": "8:acs:uuid3", + "kind": "communication" + } + ] + }, + { + "id": "8:acs:uuid3", + "displayName": "Support", + "kind": "internal", + "contact": { + "id": "8:acs:uuid3", + "kind": "communication" + } + } + ] + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_ListMessages.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_ListMessages.json new file mode 100644 index 000000000000..01a7f50385fd --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_ListMessages.json @@ -0,0 +1,39 @@ +{ + "title": "Retrieves list of conversation messages", + "operationId": "ConversationThreadOperations_ListMessages", + "parameters": { + "api-version": "2025-09-01-preview", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "1593108077690", + "sequenceId": 6, + "message": { + "kind": "text", + "content": "My order did not arrive" + }, + "senderDisplayName": "Jane", + "createdOn": "2020-06-25T18:01:17.6900000Z", + "senderCommunicationIdentifier": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + }, + { + "id": "1593107077690", + "sequenceId": 5, + "message": { + "kind": "text", + "content": "Hi I need help" + }, + "senderDisplayName": "Jane", + "createdOn": "2020-06-25T17:44:37.6830000Z", + "senderCommunicationIdentifier": "8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_RemoveParticipants.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_RemoveParticipants.json new file mode 100644 index 000000000000..a0c7ee913abe --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_RemoveParticipants.json @@ -0,0 +1,22 @@ +{ + "title": "remove a participant from a conversation", + "operationId": "ConversationThreadOperations_RemoveParticipants", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "options": { + "participantIds": [ + "8:acs:uuid2" + ] + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "207": { + "body": { + "invalidParticipants": [] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_SendMessage.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_SendMessage.json new file mode 100644 index 000000000000..feaeaadda0cd --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/ConversationThread_SendMessage.json @@ -0,0 +1,24 @@ +{ + "title": "Sends a conversation message from Business to User", + "operationId": "ConversationThreadOperations_SendMessage", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "conversationId": "19:34adfa4f-cedf-4dc0-ba29-b6d1a69ab345@thread.v2", + "options": { + "request": { + "kind": "text", + "content": "I need help" + }, + "outboundDeliveryStrategy": "allParticipants" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "messageId": "1593107077690" + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendAudio.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendAudio.json new file mode 100644 index 000000000000..e10d6793e6ac --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendAudio.json @@ -0,0 +1,29 @@ +{ + "title": "Sends a notification message - audio", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "audio", + "mediaUri": "https://example.com/audio.mp3" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendButtonInteractiveMessage.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendButtonInteractiveMessage.json new file mode 100644 index 000000000000..272fd26eeda0 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendButtonInteractiveMessage.json @@ -0,0 +1,58 @@ +{ + "title": "Sends a notification message - Interactive Button", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "interactive", + "interactiveMessage": { + "header": { + "text": "Test Header", + "kind": "text" + }, + "body": { + "text": "Test Body", + "kind": "text" + }, + "footer": { + "text": "Test Footer", + "kind": "text" + }, + "action": { + "kind": "whatsAppButtonAction", + "content": { + "buttons": [ + { + "id": "cancel", + "title": "Cancel" + }, + { + "id": "agree", + "title": "Agree" + } + ], + "kind": "buttonSet" + } + } + } + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendDocument.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendDocument.json new file mode 100644 index 000000000000..9bb09d88ce81 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendDocument.json @@ -0,0 +1,31 @@ +{ + "title": "Sends a notification message - document", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "document", + "mediaUri": "https://example.com/document.pdf", + "caption": "check out this document!", + "fileName": "fileName.pdf" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendImage.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendImage.json new file mode 100644 index 000000000000..be425a4ee5e3 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendImage.json @@ -0,0 +1,30 @@ +{ + "title": "Sends a notification message - image", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "image", + "mediaUri": "https://example.com/image.jpg", + "caption": "check out this image!" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendListInteractiveMessage.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendListInteractiveMessage.json new file mode 100644 index 000000000000..4595601db8ad --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendListInteractiveMessage.json @@ -0,0 +1,81 @@ +{ + "title": "Sends a notification message - Interactive List", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "interactive", + "interactiveMessage": { + "header": { + "text": "Choose Shipping Option", + "kind": "text" + }, + "body": { + "text": "Which shipping option do you prefer?", + "kind": "text" + }, + "footer": { + "text": "Lucky Shrub: Your gateway to succulents", + "kind": "text" + }, + "action": { + "kind": "whatsAppListAction", + "content": { + "title": "Shipping Options", + "groups": [ + { + "title": "I want it ASAP!", + "items": [ + { + "id": "priority_express", + "title": "Priority Mail Express", + "description": "Next Day to 2 Days" + }, + { + "id": "priority_mail", + "title": "Priority Mail", + "description": "1–3 Days" + } + ] + }, + { + "title": "I can wait a bit", + "items": [ + { + "id": "usps_ground_advantage", + "title": "USPS Ground Advantage", + "description": "2–5 Days" + }, + { + "id": "media_mail", + "title": "Media Mail", + "description": "2–8 Days" + } + ] + } + ], + "kind": "group" + } + } + } + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendReaction.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendReaction.json new file mode 100644 index 000000000000..7b556dbd3cf1 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendReaction.json @@ -0,0 +1,30 @@ +{ + "title": "Sends a notification message - Reaction", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "reaction", + "emoji": "<>", + "messageId": "e6265c04-c570-43fd-8be1-74aed7750455" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendReadReceipt.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendReadReceipt.json new file mode 100644 index 000000000000..d4229a19cd02 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendReadReceipt.json @@ -0,0 +1,17 @@ +{ + "title": "Sends a read receipt", + "operationId": "ReadReceiptsOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "readReceiptContent": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "typingIndicator": true + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": {} + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendSticker.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendSticker.json new file mode 100644 index 000000000000..4e7e8f588246 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendSticker.json @@ -0,0 +1,29 @@ +{ + "title": "Sends a notification message - Sticker", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "sticker", + "mediaUri": "https://www.luckyshrub.com/assets/animated-smiling-plant.webp" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendTemplate.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendTemplate.json new file mode 100644 index 000000000000..2e17803b0215 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendTemplate.json @@ -0,0 +1,55 @@ +{ + "title": "Sends a notification message - Template", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "template", + "template": { + "name": "example", + "language": "en", + "values": [ + { + "name": "userName", + "kind": "text", + "text": "John Doe" + }, + { + "name": "orderNumber", + "kind": "text", + "text": "12345" + } + ], + "bindings": { + "body": [ + { + "refValue": "userName" + }, + { + "refValue": "orderNumber" + } + ], + "kind": "whatsApp" + } + } + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendText.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendText.json new file mode 100644 index 000000000000..97c9da99ac7b --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendText.json @@ -0,0 +1,29 @@ +{ + "title": "Sends a notification message - text", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "text", + "content": "Text message through CPM" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendUrlInteractiveMessage.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendUrlInteractiveMessage.json new file mode 100644 index 000000000000..28f8347e9397 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendUrlInteractiveMessage.json @@ -0,0 +1,50 @@ +{ + "title": "Sends a notification message - Interactive Url", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "interactive", + "interactiveMessage": { + "header": { + "text": "Test Header", + "kind": "text" + }, + "body": { + "text": "Test Body", + "kind": "text" + }, + "footer": { + "text": "Test Footer", + "kind": "text" + }, + "action": { + "kind": "whatsAppUrlAction", + "content": { + "title": "Test Url", + "url": "https://example.com/audio.mp3", + "kind": "url" + } + } + } + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendVideo.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendVideo.json new file mode 100644 index 000000000000..3825df8d5ecb --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/NotificationMessages_SendVideo.json @@ -0,0 +1,30 @@ +{ + "title": "Sends a notification message - video", + "operationId": "NotificationMessagesOperations_Send", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "body": { + "channelRegistrationId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "to": [ + "14250000000" + ], + "kind": "video", + "mediaUri": "https://example.com/video.mp4", + "caption": "check out this video!" + }, + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "202": { + "body": { + "receipts": [ + { + "messageId": "320fc2a1-4c4b-4387-9c1a-bd38b57795de", + "to": "14250000000" + } + ] + } + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/Stream_GetMedia.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/Stream_GetMedia.json new file mode 100644 index 000000000000..c2f67ed699cb --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/Stream_GetMedia.json @@ -0,0 +1,15 @@ +{ + "title": "Download media", + "operationId": "StreamOperations_GetMedia", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "id": "d19e68ec-bdd6-4a50-8dfb-cbb1642df6ab", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": "" + } + } +} diff --git a/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/Template_ListTemplates.json b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/Template_ListTemplates.json new file mode 100644 index 000000000000..560654b5b278 --- /dev/null +++ b/specification/communication/data-plane/Messages/preview/2025-09-01-preview/examples/Template_ListTemplates.json @@ -0,0 +1,35 @@ +{ + "title": "Gets a list of templates", + "operationId": "TemplateOperations_ListTemplates", + "parameters": { + "api-version": "2025-09-01-preview", + "content-type": "application/json", + "channelId": "0f0eb78e-a576-1dfc-b414-0f0756de3338", + "endpoint": "https://my-resource.communication.azure.com" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "sample_shipping_confirmation", + "language": "en_US", + "status": "approved", + "kind": "whatsApp", + "content": [ + { + "type": "BODY", + "text": "Your package has been shipped. It will be delivered in {{1}} business days." + }, + { + "type": "FOOTER", + "text": "This message is from an unverified business." + } + ] + } + ], + "nextLink": null + } + } + } +} diff --git a/specification/communication/data-plane/Messages/readme.md b/specification/communication/data-plane/Messages/readme.md index d25c9e1ce7b7..4d7249a2fc7d 100644 --- a/specification/communication/data-plane/Messages/readme.md +++ b/specification/communication/data-plane/Messages/readme.md @@ -26,7 +26,7 @@ These are the global settings for the communicationservices. ```yaml openapi-type: data-plane -tag: package-2025-04-01-preview +tag: package-2025-09-01-preview ``` ### Tag: package-2023-08-24-preview @@ -84,6 +84,17 @@ title: Azure Communication Services ``` +### Tag: package-2025-09-01-preview + +These settings apply only when `--tag=package-2025-09-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-2025-09-01-preview' +input-file: + - preview/2025-09-01-preview/communicationservicesmessages.json +title: + Azure Communication Services +``` + ``` yaml suppressions: - code: LroExtension