instruction
stringlengths
81
221
input
stringlengths
50
1.19k
output
stringlengths
525
3.61k
Provide a Python example that uses the GET /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the wrap-up for this conversation communication.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId provisional = False # bool | Indicates if the wrap-up code is provisional. (optional) (default to False) try: # Get the wrap-up for this conversation communication. api_response = api_instance.get_conversations_call_participant_communication_wrapup(conversation_id, participant_id, communication_id, provisional=provisional) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_call_participant_communication_wrapup: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Apply wrap-up for this conversation communication
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId body = PureCloudPlatformClientV2.WrapupInput() # WrapupInput | Wrap-up (optional) try: # Apply wrap-up for this conversation communication api_instance.post_conversations_call_participant_communication_wrapup(conversation_id, participant_id, communication_id, body=body) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_call_participant_communication_wrapup: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult Genesys Cloud Python SDK.
Genesys describes this as an API used to: Cancel the transfer
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId try: # Cancel the transfer api_instance.delete_conversations_call_participant_consult(conversation_id, participant_id) except ApiException as e: print("Exception when calling ConversationsApi->delete_conversations_call_participant_consult: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult Genesys Cloud Python SDK.
Genesys describes this as an API used to: Change who can speak
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.ConsultTransferUpdate() # ConsultTransferUpdate | new speak to try: # Change who can speak api_response = api_instance.patch_conversations_call_participant_consult(conversation_id, participant_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_call_participant_consult: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult Genesys Cloud Python SDK.
Genesys describes this as an API used to: Initiate and update consult transfer
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.ConsultTransfer() # ConsultTransfer | Destination address & initial speak to try: # Initiate and update consult transfer api_response = api_instance.post_conversations_call_participant_consult(conversation_id, participant_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_call_participant_consult: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/agent Genesys Cloud Python SDK.
Genesys describes this as an API used to: Initiate a consult transfer to an agent
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.ConsultTransferToAgent() # ConsultTransferToAgent | Destination agent & initial speak to try: # Initiate a consult transfer to an agent api_response = api_instance.post_conversations_call_participant_consult_agent(conversation_id, participant_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_call_participant_consult_agent: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/external Genesys Cloud Python SDK.
Genesys describes this as an API used to: Initiate a consult transfer to an external contact
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.ConsultTransferToExternal() # ConsultTransferToExternal | Destination address & initial speak to try: # Initiate a consult transfer to an external contact api_response = api_instance.post_conversations_call_participant_consult_external(conversation_id, participant_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_call_participant_consult_external: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult/queue Genesys Cloud Python SDK.
Genesys describes this as an API used to: Initiate a consult transfer to a queue
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.ConsultTransferToQueue() # ConsultTransferToQueue | Destination queue & initial speak to try: # Initiate a consult transfer to a queue api_response = api_instance.post_conversations_call_participant_consult_queue(conversation_id, participant_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_call_participant_consult_queue: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/monitor Genesys Cloud Python SDK.
Genesys describes this as an API used to: Listen in on the conversation from the point of view of a given participant.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId try: # Listen in on the conversation from the point of view of a given participant. api_instance.post_conversations_call_participant_monitor(conversation_id, participant_id) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_call_participant_monitor: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/calls/{conversationId}/participants/{participantId}/replace Genesys Cloud Python SDK.
Genesys describes this as an API used to: Replace this participant with the specified user and/or address
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.TransferRequest() # TransferRequest | Transfer request try: # Replace this participant with the specified user and/or address api_instance.post_conversations_call_participant_replace(conversation_id, participant_id, body) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_call_participant_replace: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/calls/{conversationId}/participants/{participantId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the wrap-up for this conversation participant.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId provisional = False # bool | Indicates if the wrap-up code is provisional. (optional) (default to False) try: # Get the wrap-up for this conversation participant. api_response = api_instance.get_conversations_call_participant_wrapup(conversation_id, participant_id, provisional=provisional) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_call_participant_wrapup: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/calls/{conversationId}/participants/{participantId}/wrapupcodes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of wrapup codes for this conversation participant
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId try: # Get list of wrapup codes for this conversation participant api_response = api_instance.get_conversations_call_participant_wrapupcodes(conversation_id, participant_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_call_participant_wrapupcodes: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/conversations/calls/{conversationId}/recordingstate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a conversation by setting its recording state
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.SetRecordingState() # SetRecordingState | SetRecordingState try: # Update a conversation by setting its recording state api_response = api_instance.put_conversations_call_recordingstate(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->put_conversations_call_recordingstate: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/chats Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get active chat conversations for the logged in user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); try: # Get active chat conversations for the logged in user api_response = api_instance.get_conversations_chats() pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_chats: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/chats Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a web chat conversation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); body = PureCloudPlatformClientV2.CreateWebChatRequest() # CreateWebChatRequest | Create web chat request try: # Create a web chat conversation api_response = api_instance.post_conversations_chats(body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_chats: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/chats/{conversationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get chat conversation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId try: # Get chat conversation api_response = api_instance.get_conversations_chat(conversation_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_chat: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/chats/{conversationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a conversation by disconnecting all of the participants
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.Conversation() # Conversation | Conversation try: # Update a conversation by disconnecting all of the participants api_response = api_instance.patch_conversations_chat(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_chat: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/chats/{conversationId}/communications/{communicationId}/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send a message on behalf of a communication in a chat conversation.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId communication_id = 'communication_id_example' # str | communicationId body = PureCloudPlatformClientV2.CreateWebChatMessageRequest() # CreateWebChatMessageRequest | Message try: # Send a message on behalf of a communication in a chat conversation. api_response = api_instance.post_conversations_chat_communication_messages(conversation_id, communication_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_chat_communication_messages: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/chats/{conversationId}/communications/{communicationId}/typing Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send a typing-indicator on behalf of a communication in a chat conversation.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId communication_id = 'communication_id_example' # str | communicationId try: # Send a typing-indicator on behalf of a communication in a chat conversation. api_response = api_instance.post_conversations_chat_communication_typing(conversation_id, communication_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_chat_communication_typing: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/chats/{conversationId}/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the messages of a chat conversation. The current user must be involved with the conversation to get its messages.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId after = 'after_example' # str | If specified, get the messages chronologically after the id of this message (optional) before = 'before_example' # str | If specified, get the messages chronologically before the id of this message (optional) sort_order = ''ascending'' # str | Sort order (optional) (default to 'ascending') max_results = 100 # int | Limit the returned number of messages, up to a maximum of 100 (optional) (default to 100) try: # Get the messages of a chat conversation. api_response = api_instance.get_conversations_chat_messages(conversation_id, after=after, before=before, sort_order=sort_order, max_results=max_results) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_chat_messages: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/chats/{conversationId}/messages/{messageId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a web chat conversation message. The current user must be involved with the conversation to get its messages.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId message_id = 'message_id_example' # str | messageId try: # Get a web chat conversation message api_response = api_instance.get_conversations_chat_message(conversation_id, message_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_chat_message: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/chats/{conversationId}/participants/{participantId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update conversation participant
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.MediaParticipantRequest() # MediaParticipantRequest | Update request try: # Update conversation participant api_instance.patch_conversations_chat_participant(conversation_id, participant_id, body) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_chat_participant: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/chats/{conversationId}/participants/{participantId}/attributes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the attributes on a conversation participant.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.ParticipantAttributes() # ParticipantAttributes | Participant attributes try: # Update the attributes on a conversation participant. api_response = api_instance.patch_conversations_chat_participant_attributes(conversation_id, participant_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_chat_participant_attributes: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/chats/{conversationId}/participants/{participantId}/communications/{communicationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update conversation participant's communication by disconnecting it.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId body = PureCloudPlatformClientV2.MediaParticipantRequest() # MediaParticipantRequest | Participant try: # Update conversation participant's communication by disconnecting it. api_response = api_instance.patch_conversations_chat_participant_communication(conversation_id, participant_id, communication_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_chat_participant_communication: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/chats/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the wrap-up for this conversation communication.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId provisional = False # bool | Indicates if the wrap-up code is provisional. (optional) (default to False) try: # Get the wrap-up for this conversation communication. api_response = api_instance.get_conversations_chat_participant_communication_wrapup(conversation_id, participant_id, communication_id, provisional=provisional) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_chat_participant_communication_wrapup: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/chats/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Apply wrap-up for this conversation communication
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId body = PureCloudPlatformClientV2.WrapupInput() # WrapupInput | Wrap-up (optional) try: # Apply wrap-up for this conversation communication api_instance.post_conversations_chat_participant_communication_wrapup(conversation_id, participant_id, communication_id, body=body) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_chat_participant_communication_wrapup: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/chats/{conversationId}/participants/{participantId}/replace Genesys Cloud Python SDK.
Genesys describes this as an API used to: Replace this participant with the specified user and/or address
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.TransferRequest() # TransferRequest | Transfer request try: # Replace this participant with the specified user and/or address api_instance.post_conversations_chat_participant_replace(conversation_id, participant_id, body) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_chat_participant_replace: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/chats/{conversationId}/participants/{participantId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the wrap-up for this conversation participant.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId provisional = False # bool | Indicates if the wrap-up code is provisional. (optional) (default to False) try: # Get the wrap-up for this conversation participant. api_response = api_instance.get_conversations_chat_participant_wrapup(conversation_id, participant_id, provisional=provisional) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_chat_participant_wrapup: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/chats/{conversationId}/participants/{participantId}/wrapupcodes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of wrapup codes for this conversation participant
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId try: # Get list of wrapup codes for this conversation participant api_response = api_instance.get_conversations_chat_participant_wrapupcodes(conversation_id, participant_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_chat_participant_wrapupcodes: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/conversations/chats/{conversationId}/recordingstate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a conversation by setting its recording state
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.SetRecordingState() # SetRecordingState | SetRecordingState try: # Update a conversation by setting its recording state api_response = api_instance.put_conversations_chat_recordingstate(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->put_conversations_chat_recordingstate: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/cobrowsesessions Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get active cobrowse conversations for the logged in user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); try: # Get active cobrowse conversations for the logged in user api_response = api_instance.get_conversations_cobrowsesessions() pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_cobrowsesessions: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/cobrowsesessions/{conversationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get cobrowse conversation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId try: # Get cobrowse conversation api_response = api_instance.get_conversations_cobrowsesession(conversation_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_cobrowsesession: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/conversations/cobrowsesessions/{conversationId}/recordingstate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a conversation by setting its recording state
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.SetRecordingState() # SetRecordingState | SetRecordingState try: # Update a conversation by setting its recording state api_response = api_instance.put_conversations_cobrowsesession_recordingstate(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->put_conversations_cobrowsesession_recordingstate: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/emails Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get active email conversations for the logged in user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); try: # Get active email conversations for the logged in user api_response = api_instance.get_conversations_emails() pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_emails: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/emails Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create an email conversation. If the direction of the request is INBOUND, this will create an external conversation with a third party provider. If the direction of the the request is OUTBOUND, this will create a conversation to send outbound emails on behalf of a queue.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); body = PureCloudPlatformClientV2.CreateEmailRequest() # CreateEmailRequest | Create email request try: # Create an email conversation api_response = api_instance.post_conversations_emails(body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_emails: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/emails/agentless Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create an email conversation, per API
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); body = PureCloudPlatformClientV2.AgentlessEmailSendRequestDto() # AgentlessEmailSendRequestDto | Create agentless email request try: # Create an email conversation, per API api_response = api_instance.post_conversations_emails_agentless(body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_emails_agentless: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/emails/{conversationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get email conversation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId try: # Get email conversation api_response = api_instance.get_conversations_email(conversation_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_email: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/emails/{conversationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a conversation by disconnecting all of the participants
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.Conversation() # Conversation | Conversation try: # Update a conversation by disconnecting all of the participants api_response = api_instance.patch_conversations_email(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_email: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/emails/{conversationId}/inboundmessages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send an email to an external conversation. An external conversation is one where the provider is not PureCloud based. This endpoint allows the sender of the external email to reply or send a new message to the existing conversation. The new message will be treated as part of the existing conversation and chained to it.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.InboundMessageRequest() # InboundMessageRequest | Send external email reply try: # Send an email to an external conversation. An external conversation is one where the provider is not PureCloud based. This endpoint allows the sender of the external email to reply or send a new message to the existing conversation. The new message will be treated as part of the existing conversation and chained to it. api_response = api_instance.post_conversations_email_inboundmessages(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_email_inboundmessages: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/emails/{conversationId}/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get conversation messages
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId try: # Get conversation messages api_response = api_instance.get_conversations_email_messages(conversation_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_email_messages: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/emails/{conversationId}/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send an email reply
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.EmailMessage() # EmailMessage | Reply try: # Send an email reply api_response = api_instance.post_conversations_email_messages(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_email_messages: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/emails/{conversationId}/messages/draft Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get conversation draft reply
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId try: # Get conversation draft reply api_response = api_instance.get_conversations_email_messages_draft(conversation_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_email_messages_draft: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/emails/{conversationId}/messages/draft Genesys Cloud Python SDK.
Genesys describes this as an API used to: Reset conversation draft to its initial state and/or auto-fill draft content
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId auto_fill = True # bool | autoFill (optional) discard = True # bool | discard (optional) body = PureCloudPlatformClientV2.DraftManipulationRequest() # DraftManipulationRequest | Draft Manipulation Request (optional) try: # Reset conversation draft to its initial state and/or auto-fill draft content api_response = api_instance.patch_conversations_email_messages_draft(conversation_id, auto_fill=auto_fill, discard=discard, body=body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_email_messages_draft: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/conversations/emails/{conversationId}/messages/draft Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update conversation draft reply
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.EmailMessage() # EmailMessage | Draft try: # Update conversation draft reply api_response = api_instance.put_conversations_email_messages_draft(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->put_conversations_email_messages_draft: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/emails/{conversationId}/messages/draft/attachments/copy Genesys Cloud Python SDK.
Genesys describes this as an API used to: Copy attachments from an email message to the current draft.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.CopyAttachmentsRequest() # CopyAttachmentsRequest | Copy Attachment Request try: # Copy attachments from an email message to the current draft. api_response = api_instance.post_conversations_email_messages_draft_attachments_copy(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_email_messages_draft_attachments_copy: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/conversations/emails/{conversationId}/messages/draft/attachments/{attachmentId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete attachment from draft
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId attachment_id = 'attachment_id_example' # str | attachmentId try: # Delete attachment from draft api_instance.delete_conversations_email_messages_draft_attachment(conversation_id, attachment_id) except ApiException as e: print("Exception when calling ConversationsApi->delete_conversations_email_messages_draft_attachment: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/emails/{conversationId}/messages/{messageId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get conversation message
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId message_id = 'message_id_example' # str | messageId try: # Get conversation message api_response = api_instance.get_conversations_email_message(conversation_id, message_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_email_message: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/emails/{conversationId}/participants/{participantId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update conversation participant
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.MediaParticipantRequest() # MediaParticipantRequest | Update request try: # Update conversation participant api_instance.patch_conversations_email_participant(conversation_id, participant_id, body) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_email_participant: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/emails/{conversationId}/participants/{participantId}/attributes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the attributes on a conversation participant.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.ParticipantAttributes() # ParticipantAttributes | Participant attributes try: # Update the attributes on a conversation participant. api_response = api_instance.patch_conversations_email_participant_attributes(conversation_id, participant_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_email_participant_attributes: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/emails/{conversationId}/participants/{participantId}/communications/{communicationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update conversation participant's communication by disconnecting it.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId body = PureCloudPlatformClientV2.MediaParticipantRequest() # MediaParticipantRequest | Participant try: # Update conversation participant's communication by disconnecting it. api_response = api_instance.patch_conversations_email_participant_communication(conversation_id, participant_id, communication_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_email_participant_communication: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/emails/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the wrap-up for this conversation communication.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId provisional = False # bool | Indicates if the wrap-up code is provisional. (optional) (default to False) try: # Get the wrap-up for this conversation communication. api_response = api_instance.get_conversations_email_participant_communication_wrapup(conversation_id, participant_id, communication_id, provisional=provisional) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_email_participant_communication_wrapup: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/emails/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Apply wrap-up for this conversation communication
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId body = PureCloudPlatformClientV2.WrapupInput() # WrapupInput | Wrap-up (optional) try: # Apply wrap-up for this conversation communication api_instance.post_conversations_email_participant_communication_wrapup(conversation_id, participant_id, communication_id, body=body) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_email_participant_communication_wrapup: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/emails/{conversationId}/participants/{participantId}/replace Genesys Cloud Python SDK.
Genesys describes this as an API used to: Replace this participant with the specified user and/or address
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.TransferRequest() # TransferRequest | Transfer request try: # Replace this participant with the specified user and/or address api_instance.post_conversations_email_participant_replace(conversation_id, participant_id, body) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_email_participant_replace: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/emails/{conversationId}/participants/{participantId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the wrap-up for this conversation participant.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId provisional = False # bool | Indicates if the wrap-up code is provisional. (optional) (default to False) try: # Get the wrap-up for this conversation participant. api_response = api_instance.get_conversations_email_participant_wrapup(conversation_id, participant_id, provisional=provisional) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_email_participant_wrapup: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/emails/{conversationId}/participants/{participantId}/wrapupcodes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of wrapup codes for this conversation participant
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId try: # Get list of wrapup codes for this conversation participant api_response = api_instance.get_conversations_email_participant_wrapupcodes(conversation_id, participant_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_email_participant_wrapupcodes: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/emails/{conversationId}/reconnect Genesys Cloud Python SDK.
Genesys describes this as an API used to: Reconnect the user to the most recently disconnected customer on a fully disconnected email conversation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId try: # Reconnect the user to the most recently disconnected customer on a fully disconnected email conversation api_instance.post_conversations_email_reconnect(conversation_id) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_email_reconnect: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/conversations/emails/{conversationId}/recordingstate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a conversation by setting its recording state
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.SetRecordingState() # SetRecordingState | SetRecordingState try: # Update a conversation by setting its recording state api_response = api_instance.put_conversations_email_recordingstate(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->put_conversations_email_recordingstate: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/emails/{conversationId}/settings Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get emails settings for a given conversation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId try: # Get emails settings for a given conversation api_response = api_instance.get_conversations_email_settings(conversation_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_email_settings: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/faxes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create Fax Conversation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); body = PureCloudPlatformClientV2.FaxSendRequest() # FaxSendRequest | Fax try: # Create Fax Conversation api_response = api_instance.post_conversations_faxes(body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_faxes: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/keyconfigurations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of key configurations data
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); try: # Get a list of key configurations data api_response = api_instance.get_conversations_keyconfigurations() pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_keyconfigurations: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/keyconfigurations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Setup configurations for encryption key creation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); body = PureCloudPlatformClientV2.ConversationEncryptionConfiguration() # ConversationEncryptionConfiguration | Encryption Configuration try: # Setup configurations for encryption key creation api_response = api_instance.post_conversations_keyconfigurations(body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_keyconfigurations: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/keyconfigurations/validate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Validate encryption key configurations without saving it
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); body = PureCloudPlatformClientV2.ConversationEncryptionConfiguration() # ConversationEncryptionConfiguration | Encryption Configuration try: # Validate encryption key configurations without saving it api_response = api_instance.post_conversations_keyconfigurations_validate(body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_keyconfigurations_validate: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/keyconfigurations/{keyconfigurationsId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the encryption key configurations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); keyconfigurations_id = 'keyconfigurations_id_example' # str | Key Configurations Id try: # Get the encryption key configurations api_response = api_instance.get_conversations_keyconfiguration(keyconfigurations_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_keyconfiguration: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/conversations/keyconfigurations/{keyconfigurationsId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the encryption key configurations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); keyconfigurations_id = 'keyconfigurations_id_example' # str | Key Configurations Id body = PureCloudPlatformClientV2.ConversationEncryptionConfiguration() # ConversationEncryptionConfiguration | Encryption key configuration metadata try: # Update the encryption key configurations api_response = api_instance.put_conversations_keyconfiguration(keyconfigurations_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->put_conversations_keyconfiguration: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get active message conversations for the logged in user
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); try: # Get active message conversations for the logged in user api_response = api_instance.get_conversations_messages() pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_messages: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create an outbound messaging conversation. If there is an existing conversation between the remote address and the address associated with the queue specified in createOutboundRequest then the result of this request depends on the state of that conversation and the useExistingConversation field of createOutboundRequest. If the existing conversation is in alerting or connected state, then the request will fail. If the existing conversation is disconnected but still within the conversation window then the request will fail unless useExistingConversation is set to true.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); body = PureCloudPlatformClientV2.CreateOutboundMessagingConversationRequest() # CreateOutboundMessagingConversationRequest | Create outbound messaging conversation try: # Create an outbound messaging conversation. api_response = api_instance.post_conversations_messages(body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_messages: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/agentless Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send an agentless outbound message. Send an agentless (api participant) outbound message using a client credential grant. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. If there is already a connected conversation between the 'fromAddress' and 'toAddress' specified, the 'useExistingActiveConversation' param can be used to barge in to the ongoing conversation.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); body = PureCloudPlatformClientV2.SendAgentlessOutboundMessageRequest() # SendAgentlessOutboundMessageRequest | Create agentless outbound messaging request try: # Send an agentless outbound message api_response = api_instance.post_conversations_messages_agentless(body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_messages_agentless: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messages/cachedmedia Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of cached media items
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) url = 'url_example' # str | URL to search for (optional) try: # Get a list of cached media items api_response = api_instance.get_conversations_messages_cachedmedia(page_size=page_size, page_number=page_number, url=url) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_messages_cachedmedia: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/conversations/messages/cachedmedia/{cachedMediaItemId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Remove a cached media item asychronously
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); cached_media_item_id = 'cached_media_item_id_example' # str | cachedMediaItemId try: # Remove a cached media item asychronously api_instance.delete_conversations_messages_cachedmedia_cached_media_item_id(cached_media_item_id) except ApiException as e: print("Exception when calling ConversationsApi->delete_conversations_messages_cachedmedia_cached_media_item_id: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messages/cachedmedia/{cachedMediaItemId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a cached media item
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); cached_media_item_id = 'cached_media_item_id_example' # str | cachedMediaItemId try: # Get a cached media item api_response = api_instance.get_conversations_messages_cachedmedia_cached_media_item_id(cached_media_item_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_messages_cachedmedia_cached_media_item_id: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messages/{conversationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get message conversation
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId try: # Get message conversation api_response = api_instance.get_conversations_message(conversation_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_message: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/messages/{conversationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a conversation by disconnecting all of the participants
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.Conversation() # Conversation | Conversation try: # Update a conversation by disconnecting all of the participants api_response = api_instance.patch_conversations_message(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_message: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send message. Send message on existing conversation/communication. Only one message body field can be accepted, per request. Example: 1 textBody, 1 mediaId, 1 stickerId, or 1 messageTemplate.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId communication_id = 'communication_id_example' # str | communicationId body = PureCloudPlatformClientV2.AdditionalMessage() # AdditionalMessage | Message use_normalized_message = False # bool | If true, response removes deprecated fields (textBody, media, stickers) (optional) (default to False) try: # Send message api_response = api_instance.post_conversations_message_communication_messages(conversation_id, communication_id, body, use_normalized_message=use_normalized_message) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_message_communication_messages: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create media. See https://developer.genesys.cloud/api/rest/v2/conversations/messaging-media-upload for example usage.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId communication_id = 'communication_id_example' # str | communicationId try: # Create media api_response = api_instance.post_conversations_message_communication_messages_media(conversation_id, communication_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_message_communication_messages_media: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages/media/{mediaId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get media. See https://developer.genesys.cloud/api/rest/v2/conversations/messaging-media-upload for example usage.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId communication_id = 'communication_id_example' # str | communicationId media_id = 'media_id_example' # str | mediaId try: # Get media api_response = api_instance.get_conversations_message_communication_messages_media_media_id(conversation_id, communication_id, media_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_message_communication_messages_media_media_id: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/typing Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send message typing event. Send message typing event for existing conversation/communication.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId communication_id = 'communication_id_example' # str | communicationId body = PureCloudPlatformClientV2.MessageTypingEventRequest() # MessageTypingEventRequest | MessageTypingEvent try: # Send message typing event api_instance.post_conversations_message_communication_typing(conversation_id, communication_id, body) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_message_communication_typing: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/{conversationId}/messages/bulk Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get messages in batch. The path parameter [conversationId] should contain the conversationId of the conversation being filtered. The body should contain the messageId(s) of messages being requested. For example: ["a3069a33b-bbb1-4703-9d68-061d9e9db96e", "55bc6be3-078c-4a49-a4e6-1e05776ed7e8"]
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | use_normalized_message = False # bool | If true, response removes deprecated fields (textBody, media, stickers) (optional) (default to False) body = ['body_example'] # list[str] | messageIds (optional) try: # Get messages in batch api_response = api_instance.post_conversations_message_messages_bulk(conversation_id, use_normalized_message=use_normalized_message, body=body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_message_messages_bulk: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messages/{conversationId}/messages/{messageId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get conversation message
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId message_id = 'message_id_example' # str | messageId use_normalized_message = False # bool | If true, response removes deprecated fields (textBody, media, stickers) (optional) (default to False) try: # Get conversation message api_response = api_instance.get_conversations_message_message(conversation_id, message_id, use_normalized_message=use_normalized_message) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_message_message: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/messages/{conversationId}/participants/{participantId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update conversation participant
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.MediaParticipantRequest() # MediaParticipantRequest | (optional) try: # Update conversation participant api_instance.patch_conversations_message_participant(conversation_id, participant_id, body=body) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_message_participant: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/messages/{conversationId}/participants/{participantId}/attributes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update the attributes on a conversation participant.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.ParticipantAttributes() # ParticipantAttributes | (optional) try: # Update the attributes on a conversation participant. api_response = api_instance.patch_conversations_message_participant_attributes(conversation_id, participant_id, body=body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_message_participant_attributes: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update conversation participant's communication by disconnecting it.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId body = PureCloudPlatformClientV2.MediaParticipantRequest() # MediaParticipantRequest | Participant try: # Update conversation participant's communication by disconnecting it. api_response = api_instance.patch_conversations_message_participant_communication(conversation_id, participant_id, communication_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_message_participant_communication: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the wrap-up for this conversation communication.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId provisional = False # bool | Indicates if the wrap-up code is provisional. (optional) (default to False) try: # Get the wrap-up for this conversation communication. api_response = api_instance.get_conversations_message_participant_communication_wrapup(conversation_id, participant_id, communication_id, provisional=provisional) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_message_participant_communication_wrapup: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Apply wrap-up for this conversation communication
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId communication_id = 'communication_id_example' # str | communicationId body = PureCloudPlatformClientV2.WrapupInput() # WrapupInput | Wrap-up (optional) try: # Apply wrap-up for this conversation communication api_instance.post_conversations_message_participant_communication_wrapup(conversation_id, participant_id, communication_id, body=body) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_message_participant_communication_wrapup: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/{conversationId}/participants/{participantId}/monitor Genesys Cloud Python SDK.
Genesys describes this as an API used to: Listen in on the conversation from the point of view of a given participant.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId try: # Listen in on the conversation from the point of view of a given participant. api_instance.post_conversations_message_participant_monitor(conversation_id, participant_id) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_message_participant_monitor: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/{conversationId}/participants/{participantId}/replace Genesys Cloud Python SDK.
Genesys describes this as an API used to: Replace this participant with the specified user and/or address
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId body = PureCloudPlatformClientV2.TransferRequest() # TransferRequest | Transfer request try: # Replace this participant with the specified user and/or address api_instance.post_conversations_message_participant_replace(conversation_id, participant_id, body) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_message_participant_replace: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messages/{conversationId}/participants/{participantId}/wrapup Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get the wrap-up for this conversation participant.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId provisional = False # bool | Indicates if the wrap-up code is provisional. (optional) (default to False) try: # Get the wrap-up for this conversation participant. api_response = api_instance.get_conversations_message_participant_wrapup(conversation_id, participant_id, provisional=provisional) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_message_participant_wrapup: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messages/{conversationId}/participants/{participantId}/wrapupcodes Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get list of wrapup codes for this conversation participant
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId participant_id = 'participant_id_example' # str | participantId try: # Get list of wrapup codes for this conversation participant api_response = api_instance.get_conversations_message_participant_wrapupcodes(conversation_id, participant_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_message_participant_wrapupcodes: %s\n" % e)```
Provide a Python example that uses the PUT /api/v2/conversations/messages/{conversationId}/recordingstate Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update a conversation by setting its recording state
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); conversation_id = 'conversation_id_example' # str | conversationId body = PureCloudPlatformClientV2.SetRecordingState() # SetRecordingState | SetRecordingState try: # Update a conversation by setting its recording state api_response = api_instance.put_conversations_message_recordingstate(conversation_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->put_conversations_message_recordingstate: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/{integrationId}/inbound/open/event Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send an inbound Open Event Message. Send an inbound event message to an Open Messaging integration. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will either generate a new Conversation, or be a part of an existing conversation. See https://developer.genesys.cloud/api/digital/openmessaging/ for example usage.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); integration_id = 'integration_id_example' # str | integrationId body = PureCloudPlatformClientV2.OpenInboundNormalizedEvent() # OpenInboundNormalizedEvent | NormalizedMessage try: # Send an inbound Open Event Message api_response = api_instance.post_conversations_message_inbound_open_event(integration_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_message_inbound_open_event: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/{integrationId}/inbound/open/message Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send inbound Open Message. Send an inbound message to an Open Messaging integration. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will either generate a new Conversation, or be a part of an existing conversation. See https://developer.genesys.cloud/api/digital/openmessaging/ for example usage.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); integration_id = 'integration_id_example' # str | integrationId body = PureCloudPlatformClientV2.OpenInboundNormalizedMessage() # OpenInboundNormalizedMessage | NormalizedMessage try: # Send inbound Open Message api_response = api_instance.post_conversations_message_inbound_open_message(integration_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_message_inbound_open_message: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messages/{integrationId}/inbound/open/receipt Genesys Cloud Python SDK.
Genesys describes this as an API used to: Send an inbound Open Receipt Message. Send an inbound open Receipt to an Open Messaging integration. In order to call this endpoint you will need OAuth token generated using OAuth client credentials authorized with at least messaging scope. This will either generate a new Conversation, or be a part of an existing conversation. See https://developer.genesys.cloud/api/digital/openmessaging/ for example usage.
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); integration_id = 'integration_id_example' # str | integrationId body = PureCloudPlatformClientV2.OpenInboundNormalizedReceipt() # OpenInboundNormalizedReceipt | NormalizedMessage try: # Send an inbound Open Receipt Message api_response = api_instance.post_conversations_message_inbound_open_receipt(integration_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_message_inbound_open_receipt: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messages/{messageId}/details Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get message
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); message_id = 'message_id_example' # str | messageId use_normalized_message = False # bool | If true, response removes deprecated fields (textBody, media, stickers) (optional) (default to False) try: # Get message api_response = api_instance.get_conversations_message_details(message_id, use_normalized_message=use_normalized_message) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_message_details: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messaging/facebook/app Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get Genesys Facebook App Id
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); try: # Get Genesys Facebook App Id api_response = api_instance.get_conversations_messaging_facebook_app() pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_messaging_facebook_app: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messaging/facebook/permissions Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of Facebook Permissions
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); try: # Get a list of Facebook Permissions api_response = api_instance.get_conversations_messaging_facebook_permissions() pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_messaging_facebook_permissions: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messaging/integrations Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of Integrations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) expand = ['expand_example'] # list[str] | Expand instructions for the return value. (optional) supported_content_id = 'supported_content_id_example' # str | Filter integrations returned based on the supported content ID (optional) messaging_setting_id = 'messaging_setting_id_example' # str | Filter integrations returned based on the setting ID (optional) try: # Get a list of Integrations api_response = api_instance.get_conversations_messaging_integrations(page_size=page_size, page_number=page_number, expand=expand, supported_content_id=supported_content_id, messaging_setting_id=messaging_setting_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_messaging_integrations: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messaging/integrations/facebook Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a list of Facebook Integrations
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); page_size = 25 # int | Page size (optional) (default to 25) page_number = 1 # int | Page number (optional) (default to 1) expand = 'expand_example' # str | Expand instructions for the return value. (optional) supported_content_id = 'supported_content_id_example' # str | Filter integrations returned based on the supported content ID (optional) messaging_setting_id = 'messaging_setting_id_example' # str | Filter integrations returned based on the setting ID (optional) try: # Get a list of Facebook Integrations api_response = api_instance.get_conversations_messaging_integrations_facebook(page_size=page_size, page_number=page_number, expand=expand, supported_content_id=supported_content_id, messaging_setting_id=messaging_setting_id) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_messaging_integrations_facebook: %s\n" % e)```
Provide a Python example that uses the POST /api/v2/conversations/messaging/integrations/facebook Genesys Cloud Python SDK.
Genesys describes this as an API used to: Create a Facebook Integration
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); body = PureCloudPlatformClientV2.FacebookIntegrationRequest() # FacebookIntegrationRequest | FacebookIntegrationRequest try: # Create a Facebook Integration api_response = api_instance.post_conversations_messaging_integrations_facebook(body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->post_conversations_messaging_integrations_facebook: %s\n" % e)```
Provide a Python example that uses the DELETE /api/v2/conversations/messaging/integrations/facebook/{integrationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Delete a Facebook messaging integration
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); integration_id = 'integration_id_example' # str | Integration ID try: # Delete a Facebook messaging integration api_instance.delete_conversations_messaging_integrations_facebook_integration_id(integration_id) except ApiException as e: print("Exception when calling ConversationsApi->delete_conversations_messaging_integrations_facebook_integration_id: %s\n" % e)```
Provide a Python example that uses the GET /api/v2/conversations/messaging/integrations/facebook/{integrationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Get a Facebook messaging integration
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); integration_id = 'integration_id_example' # str | Integration ID expand = 'expand_example' # str | Expand instructions for the return value. (optional) try: # Get a Facebook messaging integration api_response = api_instance.get_conversations_messaging_integrations_facebook_integration_id(integration_id, expand=expand) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->get_conversations_messaging_integrations_facebook_integration_id: %s\n" % e)```
Provide a Python example that uses the PATCH /api/v2/conversations/messaging/integrations/facebook/{integrationId} Genesys Cloud Python SDK.
Genesys describes this as an API used to: Update Facebook messaging integration
```import PureCloudPlatformClientV2 from PureCloudPlatformClientV2.rest import ApiException from pprint import pprint # Configure OAuth2 access token for authorization: PureCloud OAuth PureCloudPlatformClientV2.configuration.access_token = 'your_access_token' # or use get_client_credentials_token(...), get_saml2bearer_token(...), get_code_authorization_token(...) or get_pkce_token(...) # create an instance of the API class api_instance = PureCloudPlatformClientV2.ConversationsApi(); integration_id = 'integration_id_example' # str | Integration ID body = PureCloudPlatformClientV2.FacebookIntegrationUpdateRequest() # FacebookIntegrationUpdateRequest | FacebookIntegrationUpdateRequest try: # Update Facebook messaging integration api_response = api_instance.patch_conversations_messaging_integrations_facebook_integration_id(integration_id, body) pprint(api_response) except ApiException as e: print("Exception when calling ConversationsApi->patch_conversations_messaging_integrations_facebook_integration_id: %s\n" % e)```