Skip to content

Latest commit

 

History

History
124 lines (83 loc) · 3.19 KB

File metadata and controls

124 lines (83 loc) · 3.19 KB

Keap\Core\V2\UserGroupsApi

All URIs are relative to https://api.keap.com/crm, except if the operation defines another base path.

Method HTTP request Description
getUserGroup() GET /rest/v2/userGroups/{user_group_id} Retrieve a User Group
listUserGroups() GET /rest/v2/userGroups List User Groups

getUserGroup()

getUserGroup($user_group_id): \Keap\Core\V2\Model\UserGroup

Retrieve a User Group

Retrieves a single user group by its ID.

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\UserGroupsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$user_group_id = 'user_group_id_example'; // string

try {
    $result = $apiInstance->getUserGroup($user_group_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserGroupsApi->getUserGroup: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
user_group_id string

Return type

\Keap\Core\V2\Model\UserGroup

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listUserGroups()

listUserGroups(): \Keap\Core\V2\Model\ListUserGroupsResponse

List User Groups

Retrieves a list of all user groups in the application.

Example

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


// Configure OAuth2 access token for authorization: oauth2
$config = Keap\Core\V2\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Keap\Core\V2\Api\UserGroupsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->listUserGroups();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserGroupsApi->listUserGroups: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\Keap\Core\V2\Model\ListUserGroupsResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]