All URIs are relative to https://api.keap.com/crm, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| getUserById() | GET /rest/v2/users/{user_id} | Get User |
| getUserInfo() | GET /rest/v2/oauth/connect/userinfo | Retrieve User Info |
| getUserSignature() | GET /rest/v2/users/{user_id}/signature | Get User email signature |
| listPaginatedUsers() | GET /rest/v2/users | List Users |
| updateUser() | PATCH /rest/v2/users/{user_id} | Update User |
getUserById($user_id): \Keap\Core\V2\Model\UserGet User
Retrieves a specific User
<?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\UsersApi(
// 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_id = 'user_id_example'; // string
try {
$result = $apiInstance->getUserById($user_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUserById: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | string |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUserInfo(): \Keap\Core\V2\Model\GetUserInfoResponseRetrieve User Info
Retrieves information for the current authenticated end-user, as outlined by the OpenID Connect specification.
<?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\UsersApi(
// 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->getUserInfo();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUserInfo: ', $e->getMessage(), PHP_EOL;
}This endpoint does not need any parameter.
\Keap\Core\V2\Model\GetUserInfoResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getUserSignature($user_id): stringGet User email signature
Retrieves a HTML snippet that contains the user's email signature.
<?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\UsersApi(
// 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_id = 'user_id_example'; // string
try {
$result = $apiInstance->getUserSignature($user_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->getUserSignature: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | string |
string
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listPaginatedUsers($filter, $order_by, $page_size, $page_token): \Keap\Core\V2\Model\ListUsersPaginatedResponseList Users
Retrieves a list of users
<?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\UsersApi(
// 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
);
$filter = 'filter_example'; // string | Filter to apply, allowed fields are: - (String) `email` - (String) `given_name` - (Boolean) `include_inactive` - (Boolean) `include_partners` - (Set[String]) `user_ids` You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=given_name%3D%3DMary` - `filter=user_ids%3D%3D123%3Bgiven_name%3D%3DSmith`
$order_by = 'order_by_example'; // string | Attribute and direction to order items. One of the following fields: - `create_time` - `email` One of the following directions: - `asc` - `desc`
$page_size = 10; // int | Total number of items to return per page
$page_token = 'page_token_example'; // string | Page token
try {
$result = $apiInstance->listPaginatedUsers($filter, $order_by, $page_size, $page_token);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->listPaginatedUsers: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| filter | string | Filter to apply, allowed fields are: - (String) `email` - (String) `given_name` - (Boolean) `include_inactive` - (Boolean) `include_partners` - (Set[String]) `user_ids` You will need to apply the `==` operator to check the equality of one of the filters with your searched word, in the encoded form `%3D%3D`. For the filters listed above, here are some examples: - `filter=given_name%3D%3DMary` - `filter=user_ids%3D%3D123%3Bgiven_name%3D%3DSmith` | [optional] |
| order_by | string | Attribute and direction to order items. One of the following fields: - `create_time` - `email` One of the following directions: - `asc` - `desc` | [optional] |
| page_size | int | Total number of items to return per page | [optional] |
| page_token | string | Page token | [optional] |
\Keap\Core\V2\Model\ListUsersPaginatedResponse
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateUser($user_id, $update_user_request, $update_mask): \Keap\Core\V2\Model\UserUpdate User
Updates information on a specific User
<?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\UsersApi(
// 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_id = 'user_id_example'; // string
$update_user_request = new \Keap\Core\V2\Model\UpdateUserRequest(); // \Keap\Core\V2\Model\UpdateUserRequest
$update_mask = NULL; // mixed | An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped.
try {
$result = $apiInstance->updateUser($user_id, $update_user_request, $update_mask);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->updateUser: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| user_id | string | ||
| update_user_request | \Keap\Core\V2\Model\UpdateUserRequest | ||
| update_mask | mixed | An optional list of properties to be updated. If set, only the provided properties will be updated and others will be skipped. | [optional] |
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]