---
title: LanguagesApi
---
## PureCloud::LanguagesApi
All URIs are relative to *https://api.mypurecloud.com*
Method | HTTP request | Description
------------- | ------------- | -------------
|[**delete_language_id**](LanguagesApi.html#delete_language_id) | **DELETE** /api/v2/languages/{languageId} | Delete Language|
|[**get_language_id**](LanguagesApi.html#get_language_id) | **GET** /api/v2/languages/{languageId} | Get language|
|[**get_languages**](LanguagesApi.html#get_languages) | **GET** /api/v2/languages | Get the list of supported languages.|
|[**get_translations**](LanguagesApi.html#get_translations) | **GET** /api/v2/languages/translations | Get all available languages for translation|
|[**get_translations_builtin**](LanguagesApi.html#get_translations_builtin) | **GET** /api/v2/languages/translations/builtin | Get the builtin translation for a language|
|[**get_translations_organization**](LanguagesApi.html#get_translations_organization) | **GET** /api/v2/languages/translations/organization | Get effective translation for an organization by language|
|[**get_translations_users_user_id**](LanguagesApi.html#get_translations_users_user_id) | **GET** /api/v2/languages/translations/users/{userId} | Get effective language translation for a user|
|[**post_languages**](LanguagesApi.html#post_languages) | **POST** /api/v2/languages | Create Language|
|[**put_language_id**](LanguagesApi.html#put_language_id) | **PUT** /api/v2/languages/{languageId} | Update Language|
{: class="table table-striped"}
## - delete_language_id(language_id)
Delete Language
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::LanguagesApi.new
language_id = "language_id_example" # String | Language ID
begin
#Delete Language
api_instance.delete_language_id(language_id)
rescue PureCloud::ApiError => e
puts "Exception when calling LanguagesApi->delete_language_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**language_id** | **String**| Language ID |
{: class="table table-striped"}
### Return type
nil (empty response body)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Language**](Language.html) get_language_id(language_id)
Get language
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::LanguagesApi.new
language_id = "language_id_example" # String | Language ID
begin
#Get language
result = api_instance.get_language_id(language_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling LanguagesApi->get_language_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**language_id** | **String**| Language ID |
{: class="table table-striped"}
### Return type
[**Language**](Language.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**LanguageEntityListing**](LanguageEntityListing.html) get_languages(opts)
Get the list of supported languages.
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::LanguagesApi.new
opts = {
page_size: 25, # Integer | Page size
page_number: 1, # Integer | Page number
sort_order: "ASC", # String | Ascending or descending sort order
name: "name_example" # String | Name
}
begin
#Get the list of supported languages.
result = api_instance.get_languages(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling LanguagesApi->get_languages: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
**sort_order** | **String**| Ascending or descending sort order | [optional] [default to ASC]
**name** | **String**| Name | [optional]
{: class="table table-striped"}
### Return type
[**LanguageEntityListing**](LanguageEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**AvailableTranslations**](AvailableTranslations.html) get_translations
Get all available languages for translation
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::LanguagesApi.new
begin
#Get all available languages for translation
result = api_instance.get_translations
p result
rescue PureCloud::ApiError => e
puts "Exception when calling LanguagesApi->get_translations: #{e}"
end
~~~
### Parameters
This endpoint does not need any parameter.
{: class="table table-striped"}
### Return type
[**AvailableTranslations**](AvailableTranslations.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -Hash<String, Object>** get_translations_builtin(language)
Get the builtin translation for a language
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::LanguagesApi.new
language = "language_example" # String | The language of the builtin translation to retrieve
begin
#Get the builtin translation for a language
result = api_instance.get_translations_builtin(language)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling LanguagesApi->get_translations_builtin: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**language** | **String**| The language of the builtin translation to retrieve |
{: class="table table-striped"}
### Return type
**Hash<String, Object>**
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -Hash<String, Object>** get_translations_organization(language)
Get effective translation for an organization by language
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::LanguagesApi.new
language = "language_example" # String | The language of the translation to retrieve for the organization
begin
#Get effective translation for an organization by language
result = api_instance.get_translations_organization(language)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling LanguagesApi->get_translations_organization: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**language** | **String**| The language of the translation to retrieve for the organization |
{: class="table table-striped"}
### Return type
**Hash<String, Object>**
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -Hash<String, Object>** get_translations_users_user_id(user_id)
Get effective language translation for a user
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::LanguagesApi.new
user_id = "user_id_example" # String | The user id
begin
#Get effective language translation for a user
result = api_instance.get_translations_users_user_id(user_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling LanguagesApi->get_translations_users_user_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **String**| The user id |
{: class="table table-striped"}
### Return type
**Hash<String, Object>**
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Language**](Language.html) post_languages(body)
Create Language
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::LanguagesApi.new
body = PureCloud::Language.new # Language | Language
begin
#Create Language
result = api_instance.post_languages(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling LanguagesApi->post_languages: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Language**](Language.html)| Language |
{: class="table table-striped"}
### Return type
[**Language**](Language.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Language**](Language.html) put_language_id(language_id, body)
Update Language
### Example
~~~ruby
# load the gem
require 'purecloud'
# 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::LanguagesApi.new
language_id = "language_id_example" # String | Language ID
body = PureCloud::Language.new # Language | Language
begin
#Update Language
result = api_instance.put_language_id(language_id, body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling LanguagesApi->put_language_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**language_id** | **String**| Language ID |
**body** | [**Language**](Language.html)| Language |
{: class="table table-striped"}
### Return type
[**Language**](Language.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json