# PureCloudSDK\GreetingsApi

All URIs are relative to *https://api.mypurecloud.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteGreetingId**](GreetingsApi.md#deleteGreetingId) | **DELETE** /api/v2/greetings/{greetingId} | Deletes a Greeting with the given GreetingId
[**getDefaults**](GreetingsApi.md#getDefaults) | **GET** /api/v2/greetings/defaults | Get an Organization&#39;s DefaultGreetingList
[**getGreetingId**](GreetingsApi.md#getGreetingId) | **GET** /api/v2/greetings/{greetingId} | Get a Greeting with the given GreetingId
[**getGreetingIdMedia**](GreetingsApi.md#getGreetingIdMedia) | **GET** /api/v2/greetings/{greetingId}/media | Get media playback URI for this greeting
[**getGreetings**](GreetingsApi.md#getGreetings) | **GET** /api/v2/greetings | Gets an Organization&#39;s Greetings
[**getUserIdGreetings**](GreetingsApi.md#getUserIdGreetings) | **GET** /api/v2/users/{userId}/greetings | Get a list of the User&#39;s Greetings
[**getUserIdGreetingsDefaults**](GreetingsApi.md#getUserIdGreetingsDefaults) | **GET** /api/v2/users/{userId}/greetings/defaults | Grabs the list of Default Greetings given a User&#39;s ID
[**postGreetings**](GreetingsApi.md#postGreetings) | **POST** /api/v2/greetings | Create a Greeting for an Organization
[**postUserIdGreetings**](GreetingsApi.md#postUserIdGreetings) | **POST** /api/v2/users/{userId}/greetings | Creates a Greeting for a User
[**putDefaults**](GreetingsApi.md#putDefaults) | **PUT** /api/v2/greetings/defaults | Update an Organization&#39;s DefaultGreetingList
[**putGreetingId**](GreetingsApi.md#putGreetingId) | **PUT** /api/v2/greetings/{greetingId} | Updates the Greeting with the given GreetingId
[**putUserIdGreetingsDefaults**](GreetingsApi.md#putUserIdGreetingsDefaults) | **PUT** /api/v2/users/{userId}/greetings/defaults | Updates the DefaultGreetingList of the specified User


# **deleteGreetingId**
> \PureCloudSDK\Greeting deleteGreetingId($greetingId)

Deletes a Greeting with the given GreetingId



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$greetingId = "greetingId_example"; // string | Greeting ID

try {
    $result = $api_instance->deleteGreetingId($greetingId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->deleteGreetingId: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **greetingId** | **string**| Greeting ID |

### Return type

[**\PureCloudSDK\Greeting**](../Model/Greeting.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getDefaults**
> \PureCloudSDK\DefaultGreetingList getDefaults()

Get an Organization's DefaultGreetingList



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();

try {
    $result = $api_instance->getDefaults();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->getDefaults: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**\PureCloudSDK\DefaultGreetingList**](../Model/DefaultGreetingList.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getGreetingId**
> \PureCloudSDK\Greeting getGreetingId($greetingId)

Get a Greeting with the given GreetingId



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$greetingId = "greetingId_example"; // string | Greeting ID

try {
    $result = $api_instance->getGreetingId($greetingId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->getGreetingId: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **greetingId** | **string**| Greeting ID |

### Return type

[**\PureCloudSDK\Greeting**](../Model/Greeting.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getGreetingIdMedia**
> \PureCloudSDK\GreetingMediaInfo getGreetingIdMedia($greetingId, $formatId)

Get media playback URI for this greeting



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$greetingId = "greetingId_example"; // string | Greeting ID
$formatId = "wav"; // string | The desired media format.

try {
    $result = $api_instance->getGreetingIdMedia($greetingId, $formatId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->getGreetingIdMedia: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **greetingId** | **string**| Greeting ID |
 **formatId** | **string**| The desired media format. | [optional] [default to wav]

### Return type

[**\PureCloudSDK\GreetingMediaInfo**](../Model/GreetingMediaInfo.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getGreetings**
> \PureCloudSDK\DomainEntityListing getGreetings($pageSize, $pageNumber)

Gets an Organization's Greetings



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$pageSize = 25; // int | Page size
$pageNumber = 1; // int | Page number

try {
    $result = $api_instance->getGreetings($pageSize, $pageNumber);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->getGreetings: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **pageSize** | **int**| Page size | [optional] [default to 25]
 **pageNumber** | **int**| Page number | [optional] [default to 1]

### Return type

[**\PureCloudSDK\DomainEntityListing**](../Model/DomainEntityListing.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getUserIdGreetings**
> \PureCloudSDK\DomainEntityListing getUserIdGreetings($userId, $pageSize, $pageNumber)

Get a list of the User's Greetings



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$userId = "userId_example"; // string | User ID
$pageSize = 25; // int | Page size
$pageNumber = 1; // int | Page number

try {
    $result = $api_instance->getUserIdGreetings($userId, $pageSize, $pageNumber);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->getUserIdGreetings: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **userId** | **string**| User ID |
 **pageSize** | **int**| Page size | [optional] [default to 25]
 **pageNumber** | **int**| Page number | [optional] [default to 1]

### Return type

[**\PureCloudSDK\DomainEntityListing**](../Model/DomainEntityListing.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getUserIdGreetingsDefaults**
> \PureCloudSDK\DefaultGreetingList getUserIdGreetingsDefaults($userId)

Grabs the list of Default Greetings given a User's ID



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$userId = "userId_example"; // string | User ID

try {
    $result = $api_instance->getUserIdGreetingsDefaults($userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->getUserIdGreetingsDefaults: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **userId** | **string**| User ID |

### Return type

[**\PureCloudSDK\DefaultGreetingList**](../Model/DefaultGreetingList.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **postGreetings**
> \PureCloudSDK\DefaultGreetingList postGreetings($body)

Create a Greeting for an Organization



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$body = new \PureCloudSDK\Greeting(); // \PureCloudSDK\Greeting | The Greeting to create

try {
    $result = $api_instance->postGreetings($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->postGreetings: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**\PureCloudSDK\Greeting**](../Model/\PureCloudSDK\Greeting.md)| The Greeting to create |

### Return type

[**\PureCloudSDK\DefaultGreetingList**](../Model/DefaultGreetingList.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **postUserIdGreetings**
> \PureCloudSDK\Greeting postUserIdGreetings($userId, $body)

Creates a Greeting for a User



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$userId = "userId_example"; // string | User ID
$body = new \PureCloudSDK\Greeting(); // \PureCloudSDK\Greeting | The Greeting to create

try {
    $result = $api_instance->postUserIdGreetings($userId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->postUserIdGreetings: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **userId** | **string**| User ID |
 **body** | [**\PureCloudSDK\Greeting**](../Model/\PureCloudSDK\Greeting.md)| The Greeting to create |

### Return type

[**\PureCloudSDK\Greeting**](../Model/Greeting.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **putDefaults**
> \PureCloudSDK\DefaultGreetingList putDefaults($body)

Update an Organization's DefaultGreetingList



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$body = new \PureCloudSDK\DefaultGreetingList(); // \PureCloudSDK\DefaultGreetingList | The updated defaultGreetingList

try {
    $result = $api_instance->putDefaults($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->putDefaults: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**\PureCloudSDK\DefaultGreetingList**](../Model/\PureCloudSDK\DefaultGreetingList.md)| The updated defaultGreetingList |

### Return type

[**\PureCloudSDK\DefaultGreetingList**](../Model/DefaultGreetingList.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **putGreetingId**
> \PureCloudSDK\Greeting putGreetingId($greetingId, $body)

Updates the Greeting with the given GreetingId



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$greetingId = "greetingId_example"; // string | Greeting ID
$body = new \PureCloudSDK\Greeting(); // \PureCloudSDK\Greeting | The updated Greeting

try {
    $result = $api_instance->putGreetingId($greetingId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->putGreetingId: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **greetingId** | **string**| Greeting ID |
 **body** | [**\PureCloudSDK\Greeting**](../Model/\PureCloudSDK\Greeting.md)| The updated Greeting |

### Return type

[**\PureCloudSDK\Greeting**](../Model/Greeting.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **putUserIdGreetingsDefaults**
> \PureCloudSDK\DefaultGreetingList putUserIdGreetingsDefaults($userId, $body)

Updates the DefaultGreetingList of the specified User



### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: PureCloud Auth
PureCloudSDK\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new PureCloudSDK\Api\GreetingsApi();
$userId = "userId_example"; // string | User ID
$body = new \PureCloudSDK\DefaultGreetingList(); // \PureCloudSDK\DefaultGreetingList | The updated defaultGreetingList

try {
    $result = $api_instance->putUserIdGreetingsDefaults($userId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GreetingsApi->putUserIdGreetingsDefaults: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **userId** | **string**| User ID |
 **body** | [**\PureCloudSDK\DefaultGreetingList**](../Model/\PureCloudSDK\DefaultGreetingList.md)| The updated defaultGreetingList |

### Return type

[**\PureCloudSDK\DefaultGreetingList**](../Model/DefaultGreetingList.md)

### Authorization

[PureCloud Auth](../../README.md#PureCloud Auth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

