---
title: WebChatApi
---
:::error
**The Ruby SDK is deprecated as of 9/16/2020**
The Genesys Cloud Ruby SDK (v96.0.0) will be frozen at its current version level. Any new enhancements to our API or bug fixes will not be backported. If you do need to take advantage of new features or bug fixes outside the Genesys Cloud Ruby SDK, you will need to use the Genesys Cloud REST endpoints directly. More information can be found in the [Official Announcement](https://developer.mypurecloud.com/forum/t/announcement-genesys-cloud-ruby-sdk-end-of-life/8850).
:::
## PureCloud::WebChatApi
All URIs are relative to *https://api.mypurecloud.com*
Method | Description
------------- | ------------- | -------------
[**delete_webchat_deployment**](WebChatApi.html#delete_webchat_deployment) | Delete a WebChat deployment
[**delete_webchat_guest_conversation_member**](WebChatApi.html#delete_webchat_guest_conversation_member) | Remove a member from a chat conversation
[**delete_webchat_settings**](WebChatApi.html#delete_webchat_settings) | Remove WebChat deployment settings
[**get_webchat_deployment**](WebChatApi.html#get_webchat_deployment) | Get a WebChat deployment
[**get_webchat_deployments**](WebChatApi.html#get_webchat_deployments) | List WebChat deployments
[**get_webchat_guest_conversation_mediarequest**](WebChatApi.html#get_webchat_guest_conversation_mediarequest) | Get a media request in the conversation
[**get_webchat_guest_conversation_mediarequests**](WebChatApi.html#get_webchat_guest_conversation_mediarequests) | Get all media requests to the guest in the conversation
[**get_webchat_guest_conversation_member**](WebChatApi.html#get_webchat_guest_conversation_member) | Get a web chat conversation member
[**get_webchat_guest_conversation_members**](WebChatApi.html#get_webchat_guest_conversation_members) | Get the members of a chat conversation.
[**get_webchat_guest_conversation_message**](WebChatApi.html#get_webchat_guest_conversation_message) | Get a web chat conversation message
[**get_webchat_guest_conversation_messages**](WebChatApi.html#get_webchat_guest_conversation_messages) | Get the messages of a chat conversation.
[**get_webchat_settings**](WebChatApi.html#get_webchat_settings) | Get WebChat deployment settings
[**patch_webchat_guest_conversation_mediarequest**](WebChatApi.html#patch_webchat_guest_conversation_mediarequest) | Update a media request in the conversation, setting the state to ACCEPTED/DECLINED/ERRORED
[**post_webchat_deployments**](WebChatApi.html#post_webchat_deployments) | Create WebChat deployment
[**post_webchat_guest_conversation_member_messages**](WebChatApi.html#post_webchat_guest_conversation_member_messages) | Send a message in a chat conversation.
[**post_webchat_guest_conversation_member_typing**](WebChatApi.html#post_webchat_guest_conversation_member_typing) | Send a typing-indicator in a chat conversation.
[**post_webchat_guest_conversations**](WebChatApi.html#post_webchat_guest_conversations) | Create an ACD chat conversation from an external customer.
[**put_webchat_deployment**](WebChatApi.html#put_webchat_deployment) | Update a WebChat deployment
[**put_webchat_settings**](WebChatApi.html#put_webchat_settings) | Update WebChat deployment settings
{: class="table table-striped"}
## delete_webchat_deployment(deployment_id)
DEPRECATED
Delete a WebChat deployment
Wraps DELETE /api/v2/webchat/deployments/{deploymentId}
Requires ANY permissions:
* webchat:deployment:delete
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
deployment_id = "deployment_id_example" # String | Deployment Id
begin
#Delete a WebChat deployment
api_instance.delete_webchat_deployment(deployment_id)
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->delete_webchat_deployment: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**deployment_id** | **String**| Deployment Id | |
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## delete_webchat_guest_conversation_member(conversation_id, member_id)
Remove a member from a chat conversation
Wraps DELETE /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
conversation_id = "conversation_id_example" # String | conversationId
member_id = "member_id_example" # String | memberId
begin
#Remove a member from a chat conversation
api_instance.delete_webchat_guest_conversation_member(conversation_id, member_id)
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->delete_webchat_guest_conversation_member: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**conversation_id** | **String**| conversationId | |
**member_id** | **String**| memberId | |
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## delete_webchat_settings
Remove WebChat deployment settings
Wraps DELETE /api/v2/webchat/settings
Requires ANY permissions:
* webchat:deployment:delete
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
begin
#Remove WebChat deployment settings
api_instance.delete_webchat_settings
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->delete_webchat_settings: #{e}"
end
```
### Parameters
This endpoint does not need any parameter.
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatDeployment**](WebChatDeployment.html) get_webchat_deployment(deployment_id)
DEPRECATED
Get a WebChat deployment
Wraps GET /api/v2/webchat/deployments/{deploymentId}
Requires ANY permissions:
* webchat:deployment:read
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
deployment_id = "deployment_id_example" # String | Deployment Id
begin
#Get a WebChat deployment
result = api_instance.get_webchat_deployment(deployment_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->get_webchat_deployment: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**deployment_id** | **String**| Deployment Id | |
{: class="table table-striped"}
### Return type
[**WebChatDeployment**](WebChatDeployment.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatDeploymentEntityListing**](WebChatDeploymentEntityListing.html) get_webchat_deployments
DEPRECATED
List WebChat deployments
Wraps GET /api/v2/webchat/deployments
Requires ANY permissions:
* webchat:deployment:read
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
begin
#List WebChat deployments
result = api_instance.get_webchat_deployments
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->get_webchat_deployments: #{e}"
end
```
### Parameters
This endpoint does not need any parameter.
{: class="table table-striped"}
### Return type
[**WebChatDeploymentEntityListing**](WebChatDeploymentEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatGuestMediaRequest**](WebChatGuestMediaRequest.html) get_webchat_guest_conversation_mediarequest(conversation_id, media_request_id)
Get a media request in the conversation
Wraps GET /api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
conversation_id = "conversation_id_example" # String | conversationId
media_request_id = "media_request_id_example" # String | mediaRequestId
begin
#Get a media request in the conversation
result = api_instance.get_webchat_guest_conversation_mediarequest(conversation_id, media_request_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->get_webchat_guest_conversation_mediarequest: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**conversation_id** | **String**| conversationId | |
**media_request_id** | **String**| mediaRequestId | |
{: class="table table-striped"}
### Return type
[**WebChatGuestMediaRequest**](WebChatGuestMediaRequest.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatGuestMediaRequestEntityList**](WebChatGuestMediaRequestEntityList.html) get_webchat_guest_conversation_mediarequests(conversation_id)
Get all media requests to the guest in the conversation
Wraps GET /api/v2/webchat/guest/conversations/{conversationId}/mediarequests
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
conversation_id = "conversation_id_example" # String | conversationId
begin
#Get all media requests to the guest in the conversation
result = api_instance.get_webchat_guest_conversation_mediarequests(conversation_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->get_webchat_guest_conversation_mediarequests: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**conversation_id** | **String**| conversationId | |
{: class="table table-striped"}
### Return type
[**WebChatGuestMediaRequestEntityList**](WebChatGuestMediaRequestEntityList.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatMemberInfo**](WebChatMemberInfo.html) get_webchat_guest_conversation_member(conversation_id, member_id)
Get a web chat conversation member
Wraps GET /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
conversation_id = "conversation_id_example" # String | conversationId
member_id = "member_id_example" # String | memberId
begin
#Get a web chat conversation member
result = api_instance.get_webchat_guest_conversation_member(conversation_id, member_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->get_webchat_guest_conversation_member: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**conversation_id** | **String**| conversationId | |
**member_id** | **String**| memberId | |
{: class="table table-striped"}
### Return type
[**WebChatMemberInfo**](WebChatMemberInfo.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatMemberInfoEntityList**](WebChatMemberInfoEntityList.html) get_webchat_guest_conversation_members(conversation_id, opts)
Get the members of a chat conversation.
Wraps GET /api/v2/webchat/guest/conversations/{conversationId}/members
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
conversation_id = "conversation_id_example" # String | conversationId
opts = {
page_size: 25, # Integer | The number of entries to return per page, or omitted for the default.
page_number: 1, # Integer | The page number to return, or omitted for the first page.
exclude_disconnected_members: false # BOOLEAN | If true, the results will not contain members who have a DISCONNECTED state.
}
begin
#Get the members of a chat conversation.
result = api_instance.get_webchat_guest_conversation_members(conversation_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->get_webchat_guest_conversation_members: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**conversation_id** | **String**| conversationId | |
**page_size** | **Integer**| The number of entries to return per page, or omitted for the default. | [optional] [default to 25] |
**page_number** | **Integer**| The page number to return, or omitted for the first page. | [optional] [default to 1] |
**exclude_disconnected_members** | **BOOLEAN**| If true, the results will not contain members who have a DISCONNECTED state. | [optional] [default to false] |
{: class="table table-striped"}
### Return type
[**WebChatMemberInfoEntityList**](WebChatMemberInfoEntityList.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatMessage**](WebChatMessage.html) get_webchat_guest_conversation_message(conversation_id, message_id)
Get a web chat conversation message
Wraps GET /api/v2/webchat/guest/conversations/{conversationId}/messages/{messageId}
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
conversation_id = "conversation_id_example" # String | conversationId
message_id = "message_id_example" # String | messageId
begin
#Get a web chat conversation message
result = api_instance.get_webchat_guest_conversation_message(conversation_id, message_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->get_webchat_guest_conversation_message: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**conversation_id** | **String**| conversationId | |
**message_id** | **String**| messageId | |
{: class="table table-striped"}
### Return type
[**WebChatMessage**](WebChatMessage.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatMessageEntityList**](WebChatMessageEntityList.html) get_webchat_guest_conversation_messages(conversation_id, opts)
Get the messages of a chat conversation.
Wraps GET /api/v2/webchat/guest/conversations/{conversationId}/messages
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
conversation_id = "conversation_id_example" # String | conversationId
opts = {
after: "after_example", # String | If available, get the messages chronologically after the id of this message
before: "before_example", # String | If available, get the messages chronologically before the id of this message
sort_order: "ascending", # String | Sort order
max_results: 100 # Integer | Limit the returned number of messages, up to a maximum of 100
}
begin
#Get the messages of a chat conversation.
result = api_instance.get_webchat_guest_conversation_messages(conversation_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->get_webchat_guest_conversation_messages: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**conversation_id** | **String**| conversationId | |
**after** | **String**| If available, get the messages chronologically after the id of this message | [optional] |
**before** | **String**| If available, get the messages chronologically before the id of this message | [optional] |
**sort_order** | **String**| Sort order | [optional] [default to ascending]
**Values**: ascending, descending |
**max_results** | **Integer**| Limit the returned number of messages, up to a maximum of 100 | [optional] [default to 100] |
{: class="table table-striped"}
### Return type
[**WebChatMessageEntityList**](WebChatMessageEntityList.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatSettings**](WebChatSettings.html) get_webchat_settings
Get WebChat deployment settings
Wraps GET /api/v2/webchat/settings
Requires ANY permissions:
* webchat:deployment:read
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
begin
#Get WebChat deployment settings
result = api_instance.get_webchat_settings
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->get_webchat_settings: #{e}"
end
```
### Parameters
This endpoint does not need any parameter.
{: class="table table-striped"}
### Return type
[**WebChatSettings**](WebChatSettings.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatGuestMediaRequest**](WebChatGuestMediaRequest.html) patch_webchat_guest_conversation_mediarequest(conversation_id, media_request_id, body)
Update a media request in the conversation, setting the state to ACCEPTED/DECLINED/ERRORED
Wraps PATCH /api/v2/webchat/guest/conversations/{conversationId}/mediarequests/{mediaRequestId}
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
conversation_id = "conversation_id_example" # String | conversationId
media_request_id = "media_request_id_example" # String | mediaRequestId
body = PureCloud::WebChatGuestMediaRequest.new # WebChatGuestMediaRequest | Request
begin
#Update a media request in the conversation, setting the state to ACCEPTED/DECLINED/ERRORED
result = api_instance.patch_webchat_guest_conversation_mediarequest(conversation_id, media_request_id, body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->patch_webchat_guest_conversation_mediarequest: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**conversation_id** | **String**| conversationId | |
**media_request_id** | **String**| mediaRequestId | |
**body** | [**WebChatGuestMediaRequest**](WebChatGuestMediaRequest.html)| Request | |
{: class="table table-striped"}
### Return type
[**WebChatGuestMediaRequest**](WebChatGuestMediaRequest.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatDeployment**](WebChatDeployment.html) post_webchat_deployments(body)
DEPRECATED
Create WebChat deployment
Wraps POST /api/v2/webchat/deployments
Requires ANY permissions:
* webchat:deployment:create
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
body = PureCloud::WebChatDeployment.new # WebChatDeployment | Deployment
begin
#Create WebChat deployment
result = api_instance.post_webchat_deployments(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->post_webchat_deployments: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**WebChatDeployment**](WebChatDeployment.html)| Deployment | |
{: class="table table-striped"}
### Return type
[**WebChatDeployment**](WebChatDeployment.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatMessage**](WebChatMessage.html) post_webchat_guest_conversation_member_messages(conversation_id, member_id, body)
Send a message in a chat conversation.
Wraps POST /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/messages
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
conversation_id = "conversation_id_example" # String | conversationId
member_id = "member_id_example" # String | memberId
body = PureCloud::CreateWebChatMessageRequest.new # CreateWebChatMessageRequest | Message
begin
#Send a message in a chat conversation.
result = api_instance.post_webchat_guest_conversation_member_messages(conversation_id, member_id, body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->post_webchat_guest_conversation_member_messages: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**conversation_id** | **String**| conversationId | |
**member_id** | **String**| memberId | |
**body** | [**CreateWebChatMessageRequest**](CreateWebChatMessageRequest.html)| Message | |
{: class="table table-striped"}
### Return type
[**WebChatMessage**](WebChatMessage.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatTyping**](WebChatTyping.html) post_webchat_guest_conversation_member_typing(conversation_id, member_id)
Send a typing-indicator in a chat conversation.
Wraps POST /api/v2/webchat/guest/conversations/{conversationId}/members/{memberId}/typing
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
conversation_id = "conversation_id_example" # String | conversationId
member_id = "member_id_example" # String | memberId
begin
#Send a typing-indicator in a chat conversation.
result = api_instance.post_webchat_guest_conversation_member_typing(conversation_id, member_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->post_webchat_guest_conversation_member_typing: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**conversation_id** | **String**| conversationId | |
**member_id** | **String**| memberId | |
{: class="table table-striped"}
### Return type
[**WebChatTyping**](WebChatTyping.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**CreateWebChatConversationResponse**](CreateWebChatConversationResponse.html) post_webchat_guest_conversations(body)
Create an ACD chat conversation from an external customer.
This endpoint will create a new ACD Chat conversation under the specified Chat Deployment. The conversation will begin with a guest member in it (with a role=CUSTOMER) according to the customer information that is supplied. If the guest member is authenticated, the 'memberAuthToken' field should include his JWT as generated by the 'POST /api/v2/signeddata' resource; if the guest member is anonymous (and the Deployment permits it) this field can be omitted. The returned data includes the IDs of the conversation created, along with a newly-create JWT token that you can supply to all future endpoints as authentication to perform operations against that conversation. After successfully creating a conversation, you should connect a websocket to the event stream named in the 'eventStreamUri' field of the response; the conversation is not routed until the event stream is attached.
Wraps POST /api/v2/webchat/guest/conversations
Requires NO permissions:
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
api_instance = PureCloud::WebChatApi.new
body = PureCloud::CreateWebChatConversationRequest.new # CreateWebChatConversationRequest | CreateConversationRequest
begin
#Create an ACD chat conversation from an external customer.
result = api_instance.post_webchat_guest_conversations(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->post_webchat_guest_conversations: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**CreateWebChatConversationRequest**](CreateWebChatConversationRequest.html)| CreateConversationRequest | |
{: class="table table-striped"}
### Return type
[**CreateWebChatConversationResponse**](CreateWebChatConversationResponse.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatDeployment**](WebChatDeployment.html) put_webchat_deployment(deployment_id, body)
DEPRECATED
Update a WebChat deployment
Wraps PUT /api/v2/webchat/deployments/{deploymentId}
Requires ANY permissions:
* webchat:deployment:update
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
deployment_id = "deployment_id_example" # String | Deployment Id
body = PureCloud::WebChatDeployment.new # WebChatDeployment | Deployment
begin
#Update a WebChat deployment
result = api_instance.put_webchat_deployment(deployment_id, body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->put_webchat_deployment: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**deployment_id** | **String**| Deployment Id | |
**body** | [**WebChatDeployment**](WebChatDeployment.html)| Deployment | |
{: class="table table-striped"}
### Return type
[**WebChatDeployment**](WebChatDeployment.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## [**WebChatSettings**](WebChatSettings.html) put_webchat_settings(body)
Update WebChat deployment settings
Wraps PUT /api/v2/webchat/settings
Requires ANY permissions:
* webchat:deployment:update
### Example
```{"language":"ruby"}
# load the gem
require 'purecloudplatformclientv2'
# setup authorization
@secret = ENV['PURECLOUD_SECRET']
@id = ENV['PURECLOUD_CLIENT_ID']
environment = "mypurecloud.com"
@authToken = PureCloud.authenticate_with_client_credentials @id, @secret, environment
PureCloud.configure do |config|
config.access_token = @authToken
end
api_instance = PureCloud::WebChatApi.new
body = PureCloud::WebChatSettings.new # WebChatSettings | webChatSettings
begin
#Update WebChat deployment settings
result = api_instance.put_webchat_settings(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling WebChatApi->put_webchat_settings: #{e}"
end
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**WebChatSettings**](WebChatSettings.html)| webChatSettings | |
{: class="table table-striped"}
### Return type
[**WebChatSettings**](WebChatSettings.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json