---
title: GreetingsApi
---
## PureCloud::GreetingsApi
All URIs are relative to *https://api.mypurecloud.com*
Method | HTTP request | Description
------------- | ------------- | -------------
|[**delete_greeting_id**](GreetingsApi.html#delete_greeting_id) | **DELETE** /api/v2/greetings/{greetingId} | Deletes a Greeting with the given GreetingId|
|[**get_defaults**](GreetingsApi.html#get_defaults) | **GET** /api/v2/greetings/defaults | Get an Organization's DefaultGreetingList|
|[**get_greeting_id**](GreetingsApi.html#get_greeting_id) | **GET** /api/v2/greetings/{greetingId} | Get a Greeting with the given GreetingId|
|[**get_greeting_id_media**](GreetingsApi.html#get_greeting_id_media) | **GET** /api/v2/greetings/{greetingId}/media | Get media playback URI for this greeting|
|[**get_greetings**](GreetingsApi.html#get_greetings) | **GET** /api/v2/greetings | Gets an Organization's Greetings|
|[**get_user_id_greetings**](GreetingsApi.html#get_user_id_greetings) | **GET** /api/v2/users/{userId}/greetings | Get a list of the User's Greetings|
|[**get_user_id_greetings_defaults**](GreetingsApi.html#get_user_id_greetings_defaults) | **GET** /api/v2/users/{userId}/greetings/defaults | Grabs the list of Default Greetings given a User's ID|
|[**post_greetings**](GreetingsApi.html#post_greetings) | **POST** /api/v2/greetings | Create a Greeting for an Organization|
|[**post_user_id_greetings**](GreetingsApi.html#post_user_id_greetings) | **POST** /api/v2/users/{userId}/greetings | Creates a Greeting for a User|
|[**put_defaults**](GreetingsApi.html#put_defaults) | **PUT** /api/v2/greetings/defaults | Update an Organization's DefaultGreetingList|
|[**put_greeting_id**](GreetingsApi.html#put_greeting_id) | **PUT** /api/v2/greetings/{greetingId} | Updates the Greeting with the given GreetingId|
|[**put_user_id_greetings_defaults**](GreetingsApi.html#put_user_id_greetings_defaults) | **PUT** /api/v2/users/{userId}/greetings/defaults | Updates the DefaultGreetingList of the specified User|
{: class="table table-striped"}
## -[**Greeting**](Greeting.html) delete_greeting_id(greeting_id)
Deletes a Greeting with the given GreetingId
### 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::GreetingsApi.new
greeting_id = "greeting_id_example" # String | Greeting ID
begin
#Deletes a Greeting with the given GreetingId
result = api_instance.delete_greeting_id(greeting_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->delete_greeting_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**greeting_id** | **String**| Greeting ID |
{: class="table table-striped"}
### Return type
[**Greeting**](Greeting.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**DefaultGreetingList**](DefaultGreetingList.html) get_defaults
Get an Organization's DefaultGreetingList
### 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::GreetingsApi.new
begin
#Get an Organization's DefaultGreetingList
result = api_instance.get_defaults
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->get_defaults: #{e}"
end
~~~
### Parameters
This endpoint does not need any parameter.
{: class="table table-striped"}
### Return type
[**DefaultGreetingList**](DefaultGreetingList.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Greeting**](Greeting.html) get_greeting_id(greeting_id)
Get a Greeting with the given GreetingId
### 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::GreetingsApi.new
greeting_id = "greeting_id_example" # String | Greeting ID
begin
#Get a Greeting with the given GreetingId
result = api_instance.get_greeting_id(greeting_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->get_greeting_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**greeting_id** | **String**| Greeting ID |
{: class="table table-striped"}
### Return type
[**Greeting**](Greeting.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**GreetingMediaInfo**](GreetingMediaInfo.html) get_greeting_id_media(greeting_id, opts)
Get media playback URI for this greeting
### 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::GreetingsApi.new
greeting_id = "greeting_id_example" # String | Greeting ID
opts = {
format_id: "WAV" # String | The desired format (WAV, etc.)
}
begin
#Get media playback URI for this greeting
result = api_instance.get_greeting_id_media(greeting_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->get_greeting_id_media: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**greeting_id** | **String**| Greeting ID |
**format_id** | **String**| The desired format (WAV, etc.) | [optional] [default to WAV]
{: class="table table-striped"}
### Return type
[**GreetingMediaInfo**](GreetingMediaInfo.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**DomainEntityListing**](DomainEntityListing.html) get_greetings(opts)
Gets an Organization's Greetings
### 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::GreetingsApi.new
opts = {
page_size: 25, # Integer | Page size
page_number: 1 # Integer | Page number
}
begin
#Gets an Organization's Greetings
result = api_instance.get_greetings(opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->get_greetings: #{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]
{: class="table table-striped"}
### Return type
[**DomainEntityListing**](DomainEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**DomainEntityListing**](DomainEntityListing.html) get_user_id_greetings(user_id, opts)
Get a list of the User's Greetings
### 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::GreetingsApi.new
user_id = "user_id_example" # String | User ID
opts = {
page_size: 25, # Integer | Page size
page_number: 1 # Integer | Page number
}
begin
#Get a list of the User's Greetings
result = api_instance.get_user_id_greetings(user_id, opts)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->get_user_id_greetings: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **String**| User ID |
**page_size** | **Integer**| Page size | [optional] [default to 25]
**page_number** | **Integer**| Page number | [optional] [default to 1]
{: class="table table-striped"}
### Return type
[**DomainEntityListing**](DomainEntityListing.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**DefaultGreetingList**](DefaultGreetingList.html) get_user_id_greetings_defaults(user_id)
Grabs the list of Default Greetings given a User's ID
### 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::GreetingsApi.new
user_id = "user_id_example" # String | User ID
begin
#Grabs the list of Default Greetings given a User's ID
result = api_instance.get_user_id_greetings_defaults(user_id)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->get_user_id_greetings_defaults: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **String**| User ID |
{: class="table table-striped"}
### Return type
[**DefaultGreetingList**](DefaultGreetingList.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**DefaultGreetingList**](DefaultGreetingList.html) post_greetings(body)
Create a Greeting for an Organization
### 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::GreetingsApi.new
body = PureCloud::Greeting.new # Greeting | The Greeting to create
begin
#Create a Greeting for an Organization
result = api_instance.post_greetings(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->post_greetings: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Greeting**](Greeting.html)| The Greeting to create |
{: class="table table-striped"}
### Return type
[**DefaultGreetingList**](DefaultGreetingList.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Greeting**](Greeting.html) post_user_id_greetings(user_id, body)
Creates a Greeting 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::GreetingsApi.new
user_id = "user_id_example" # String | User ID
body = PureCloud::Greeting.new # Greeting | The Greeting to create
begin
#Creates a Greeting for a User
result = api_instance.post_user_id_greetings(user_id, body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->post_user_id_greetings: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **String**| User ID |
**body** | [**Greeting**](Greeting.html)| The Greeting to create |
{: class="table table-striped"}
### Return type
[**Greeting**](Greeting.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**DefaultGreetingList**](DefaultGreetingList.html) put_defaults(body)
Update an Organization's DefaultGreetingList
### 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::GreetingsApi.new
body = PureCloud::DefaultGreetingList.new # DefaultGreetingList | The updated defaultGreetingList
begin
#Update an Organization's DefaultGreetingList
result = api_instance.put_defaults(body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->put_defaults: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**DefaultGreetingList**](DefaultGreetingList.html)| The updated defaultGreetingList |
{: class="table table-striped"}
### Return type
[**DefaultGreetingList**](DefaultGreetingList.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**Greeting**](Greeting.html) put_greeting_id(greeting_id, body)
Updates the Greeting with the given GreetingId
### 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::GreetingsApi.new
greeting_id = "greeting_id_example" # String | Greeting ID
body = PureCloud::Greeting.new # Greeting | The updated Greeting
begin
#Updates the Greeting with the given GreetingId
result = api_instance.put_greeting_id(greeting_id, body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->put_greeting_id: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**greeting_id** | **String**| Greeting ID |
**body** | [**Greeting**](Greeting.html)| The updated Greeting |
{: class="table table-striped"}
### Return type
[**Greeting**](Greeting.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## -[**DefaultGreetingList**](DefaultGreetingList.html) put_user_id_greetings_defaults(user_id, body)
Updates the DefaultGreetingList of the specified 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::GreetingsApi.new
user_id = "user_id_example" # String | User ID
body = PureCloud::DefaultGreetingList.new # DefaultGreetingList | The updated defaultGreetingList
begin
#Updates the DefaultGreetingList of the specified User
result = api_instance.put_user_id_greetings_defaults(user_id, body)
p result
rescue PureCloud::ApiError => e
puts "Exception when calling GreetingsApi->put_user_id_greetings_defaults: #{e}"
end
~~~
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user_id** | **String**| User ID |
**body** | [**DefaultGreetingList**](DefaultGreetingList.html)| The updated defaultGreetingList |
{: class="table table-striped"}
### Return type
[**DefaultGreetingList**](DefaultGreetingList.html)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json