[**Documentation**](index.md)
***
[Documentation](packages.md) / Vonage Users
# Vonage Users SDK for Node.js
 [](https://codecov.io/gh/Vonage/vonage-server-sdk)  [](../../CODE_OF_CONDUCT.md) [](../../LICENSE.TXT)
This is the Vonage Users SDK for Node.js for use with [Vonage APIs](https://www.vonage.com/). To use it you will need a Vonage account. Sign up [for free][signup] at vonage.com.
For full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).
* [Installation](#installation)
* [Usage](#usage)
* [Promises](#promises)
## Installation
### With NPM
```bash
npm install @vonage/users
```
### With Yarn
```bash
yarn add @vonage/users
```
## Usage
The SDK can be used standalone from the main [Vonage Server SDK for Node.js](https://github.com/vonage/vonage-node-sdk)
if you only need to use the Users API. All you need to do
is `require('@vonage/users')`, and use the returned object to create your own
client.
```js
const {Auth} = require('@vonage/auth');
const {User} = require('@vonage/user');
const usersClient = new User(new Auth({
apiKey: API_KEY,
apiSecret: API_SECRET,
applicationId: APP_ID,
privateKey: PRIVATE_KEY_PATH,
}), options);
```
## Promises
Most methods that interact with the Vonage API uses Promises. You can either resolve these yourself, or use `await` to
wait for a response.
```js
const resp = await usersClient.getUser(USER_ID);
usersClient.getUser(USER_ID)
.then(resp => console.log(resp))
.catch(err => console.error(err));
```
## Testing
Run:
```bash
npm run test
```
[signup]: https://dashboard.nexmo.com/sign-up?utm_source=DEV_REL&utm_medium=github&utm_campaign=node-server-sdk
[license]: https://github.com/Vonage/vonage-node-sdk/blob/3.x/LICENSE.txt
## Enumerations
### SortOrder
Defined in: [users/lib/enums/userSort.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/enums/userSort.ts#L4)
Enum representing the sorting order.
#### Enumeration Members
| Enumeration Member | Value | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `ASC` | `"ASC"` | Ascending order. | [users/lib/enums/userSort.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/enums/userSort.ts#L8) |
| `DESC` | `"DESC"` | Descending order. | [users/lib/enums/userSort.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/enums/userSort.ts#L13) |
## Classes
### Users
Defined in: [users/lib/user.ts:93](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/user.ts#L93)
The `Users` class provides methods for managing user data through API requests.
Vonage API responses and requests use `snake_case` for property names, but
this class performs the necessary key transformations to work with
`camelCase` property names in your application.
#### Extends
- [`Client`](Vonage-Server-Client.md#client)
#### Constructors
##### Constructor
```ts
new Users(credentials, options?): Users;
```
Defined in: server-client/dist/lib/client.d.ts:35
Creates a new instance of the Client.
###### Parameters
###### credentials
The authentication credentials or an authentication instance.
[`AuthInterface`](Vonage-Auth.md#authinterface) | [`AuthParams`](Vonage-Auth.md#authparams)
###### options?
[`ConfigParams`](Vonage-Server-Client.md#configparams)
Optional configuration settings for the client.
###### Returns
[`Users`](#users)
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`constructor`](Vonage-Server-Client.md#client#constructor)
#### Properties
##### auth
```ts
protected auth: AuthInterface;
```
Defined in: server-client/dist/lib/client.d.ts:24
The authentication instance responsible for generating authentication headers and query parameters.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`auth`](Vonage-Server-Client.md#client#auth)
##### authType
```ts
protected authType: AuthenticationType = AuthenticationType.JWT;
```
Defined in: [users/lib/user.ts:94](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/user.ts#L94)
The type of authentication used for the client's requests.
###### Overrides
[`Client`](Vonage-Server-Client.md#client).[`authType`](Vonage-Server-Client.md#client#authtype)
##### config
```ts
protected config: ConfigParams;
```
Defined in: server-client/dist/lib/client.d.ts:28
Configuration settings for the client, including default hosts for various services and other request settings.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`config`](Vonage-Server-Client.md#client#config)
##### transformers
```ts
static transformers: object;
```
Defined in: server-client/dist/lib/client.d.ts:11
Static property containing utility transformers.
###### camelCaseObjectKeys
```ts
camelCaseObjectKeys: PartialTransformFunction;
```
###### kebabCaseObjectKeys
```ts
kebabCaseObjectKeys: PartialTransformFunction;
```
###### omit()
```ts
omit: (keys, obj) => TransformedObject;
```
###### Parameters
###### keys
`string`[]
###### obj
[`ObjectToTransform`](Vonage-Server-Client.md#objecttotransform)
###### Returns
[`TransformedObject`](Vonage-Server-Client.md#transformedobject)
###### snakeCaseObjectKeys
```ts
snakeCaseObjectKeys: PartialTransformFunction;
```
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`transformers`](Vonage-Server-Client.md#client#transformers)
#### Methods
##### addAuthenticationToRequest()
```ts
addAuthenticationToRequest(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:43
Adds the appropriate authentication headers or parameters to the request based on the authentication type.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options to which authentication needs to be added.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The request options with the added authentication.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`addAuthenticationToRequest`](Vonage-Server-Client.md#client#addauthenticationtorequest)
##### addBasicAuthToRequest()
```ts
protected addBasicAuthToRequest(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:71
Adds basic authentication headers to the request.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options to which authentication needs to be added.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The request options with the added authentication.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`addBasicAuthToRequest`](Vonage-Server-Client.md#client#addbasicauthtorequest)
##### addJWTToRequest()
```ts
protected addJWTToRequest(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:64
Adds a JWT to the request.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options to which authentication needs to be added.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The request options with the added authentication.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`addJWTToRequest`](Vonage-Server-Client.md#client#addjwttorequest)
##### addQueryKeySecretToRequest()
```ts
protected addQueryKeySecretToRequest(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:57
Adds API key and secret to the request.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options to which authentication needs to be added.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The request options with the added authentication.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`addQueryKeySecretToRequest`](Vonage-Server-Client.md#client#addquerykeysecrettorequest)
##### addQueryKeySecretToRequestBody()
```ts
protected addQueryKeySecretToRequestBody(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:50
Adds API key and secret to the request body.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options to which authentication needs to be added.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The request options with the added authentication.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`addQueryKeySecretToRequestBody`](Vonage-Server-Client.md#client#addquerykeysecrettorequestbody)
##### createUser()
```ts
createUser(user): Promise;
```
Defined in: [users/lib/user.ts:152](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/user.ts#L152)
Creates a new user with the provided user data.
###### Parameters
###### user
[`UserType`](#usertype)
The user data to create a new user.
###### Returns
`Promise`\<[`UserType`](#usertype)\>
A Promise that resolves to the newly created user.
###### Throws
If there is an issue with the request or response.
##### deleteUser()
```ts
deleteUser(userId): Promise;
```
Defined in: [users/lib/user.ts:199](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/user.ts#L199)
Deletes the user with the specified user ID.
###### Parameters
###### userId
`string`
The unique ID of the user to be deleted.
###### Returns
`Promise`\<`void`\>
A Promise that resolves once the user is successfully deleted.
###### Throws
If there is an issue with the request or response, or if the user with the specified ID is not found.
##### getConfig()
```ts
getConfig(): ConfigParams;
```
Defined in: server-client/dist/lib/client.d.ts:36
###### Returns
[`ConfigParams`](Vonage-Server-Client.md#configparams)
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`getConfig`](Vonage-Server-Client.md#client#getconfig)
##### getUser()
```ts
getUser(userId): Promise;
```
Defined in: [users/lib/user.ts:168](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/user.ts#L168)
Retrieves user information for the specified user ID.
###### Parameters
###### userId
`string`
The unique identifier of the user to retrieve.
###### Returns
`Promise`\<[`UserType`](#usertype)\>
A Promise that resolves to the user information for the specified user ID.
###### Throws
If there is an issue with the request or response, or if the user with the specified ID is not found.
##### getUserPage()
```ts
getUserPage(params?): Promise;
```
Defined in: [users/lib/user.ts:134](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/user.ts#L134)
Retrieves a page of users based on the provided parameters, such as pagination and filtering.
###### Parameters
###### params?
[`UserListParameters`](#userlistparameters) = `{}`
Optional parameters to filter and paginate the list of users.
###### Returns
`Promise`\<[`UserPageResponse`](#userpageresponse)\>
A Promise that resolves to a UserPageResponse object containing the user page data.
###### Throws
If there is an issue with the request or response.
##### listAllUsers()
```ts
listAllUsers(params): AsyncGenerator;
```
Defined in: [users/lib/user.ts:102](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/user.ts#L102)
Retrieves a list of users, optionally paginated, based on the provided parameters.
###### Parameters
###### params
[`UserListParameters`](#userlistparameters) = `{}`
Optional parameters to filter and paginate the list of users.
###### Returns
`AsyncGenerator`\<[`UserType`](#usertype), `void` & [`UserType`](#usertype), `undefined`\>
An async generator that yields user objects.
##### parseResponse()
```ts
protected parseResponse(request, response): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:168
Parses the response based on its content type.
###### Type Parameters
###### T
`T`
The expected type of the parsed response data.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options.
###### response
`Response`
The raw response from the request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The parsed response.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`parseResponse`](Vonage-Server-Client.md#client#parseresponse)
##### prepareBody()
```ts
protected prepareBody(request): undefined | string;
```
Defined in: server-client/dist/lib/client.d.ts:158
Prepares the body for the request based on the content type.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The request options.
###### Returns
`undefined` \| `string`
- The prepared request body as a string or undefined.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`prepareBody`](Vonage-Server-Client.md#client#preparebody)
##### prepareRequest()
```ts
protected prepareRequest(request): Promise;
```
Defined in: server-client/dist/lib/client.d.ts:151
Prepares the request with necessary headers, authentication, and query parameters.
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The initial request options.
###### Returns
`Promise`\<[`VetchOptions`](Vonage-Vetch.md#vetchoptions)\>
- The modified request options.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`prepareRequest`](Vonage-Server-Client.md#client#preparerequest)
##### sendDeleteRequest()
```ts
sendDeleteRequest(url): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:78
Sends a DELETE request to the specified URL.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the DELETE request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the DELETE request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendDeleteRequest`](Vonage-Server-Client.md#client#senddeleterequest)
##### sendFormSubmitRequest()
```ts
sendFormSubmitRequest(url, payload?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:86
Sends a POST request with form data to the specified URL.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the POST request.
###### payload?
`Record`\<`string`, `undefined` \| `string`\>
Optional payload containing form data to send with the POST request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the POST request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendFormSubmitRequest`](Vonage-Server-Client.md#client#sendformsubmitrequest)
##### sendGetRequest()
```ts
sendGetRequest(url, queryParams?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:94
Sends a GET request to the specified URL with optional query parameters.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the GET request.
###### queryParams?
Optional query parameters to append to the URL. These should be compatible with Node's URLSearchParams.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the GET request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendGetRequest`](Vonage-Server-Client.md#client#sendgetrequest)
##### sendPatchRequest()
```ts
sendPatchRequest(url, payload?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:104
Sends a PATCH request to the specified URL with an optional payload.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the PATCH request.
###### payload?
Optional payload to be sent as the body of the PATCH request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the PATCH request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendPatchRequest`](Vonage-Server-Client.md#client#sendpatchrequest)
##### sendPostRequest()
```ts
sendPostRequest(url, payload?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:114
Sends a POST request to the specified URL with an optional payload.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the POST request.
###### payload?
Optional payload to be sent as the body of the POST request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the POST request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendPostRequest`](Vonage-Server-Client.md#client#sendpostrequest)
##### sendPutRequest()
```ts
sendPutRequest(url, payload?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:124
Sends a PUT request to the specified URL with an optional payload.
###### Type Parameters
###### T
`T`
###### Parameters
###### url
`string`
The URL endpoint for the PUT request.
###### payload?
Optional payload to be sent as the body of the PUT request.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the PUT request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendPutRequest`](Vonage-Server-Client.md#client#sendputrequest)
##### sendRequest()
```ts
sendRequest(request): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:144
Sends a request adding necessary headers, handling authentication, and parsing the response.
###### Type Parameters
###### T
`T`
###### Parameters
###### request
[`VetchOptions`](Vonage-Vetch.md#vetchoptions)
The options defining the request, including URL, method, headers, and data.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The parsed response from the request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendRequest`](Vonage-Server-Client.md#client#sendrequest)
##### sendRequestWithData()
```ts
sendRequestWithData(
method,
url,
payload?): Promise>;
```
Defined in: server-client/dist/lib/client.d.ts:135
Sends a request with JSON-encoded data to the specified URL using the provided HTTP method.
###### Type Parameters
###### T
`T`
###### Parameters
###### method
The HTTP method to be used for the request (only POST, PATCH, or PUT are acceptable).
[`POST`](Vonage-Vetch.md#httpmethods#post) | [`PUT`](Vonage-Vetch.md#httpmethods#put) | [`PATCH`](Vonage-Vetch.md#httpmethods#patch)
###### url
`string`
The URL endpoint for the request.
###### payload?
Optional payload to be sent as the body of the request, JSON-encoded.
###### Returns
`Promise`\<[`VetchResponse`](Vonage-Vetch.md#vetchresponse)\<`T`\>\>
- The response from the request.
###### Inherited from
[`Client`](Vonage-Server-Client.md#client).[`sendRequestWithData`](Vonage-Server-Client.md#client#sendrequestwithdata)
##### updateUser()
```ts
updateUser(user): Promise;
```
Defined in: [users/lib/user.ts:183](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/user.ts#L183)
Updates the user information for the specified user.
###### Parameters
###### user
[`UserType`](#usertype)
The user object containing the updated information.
###### Returns
`Promise`\<[`UserType`](#usertype)\>
A Promise that resolves to the updated user information.
###### Throws
If there is an issue with the request or response, or if the user with the specified ID is not found.
## Type Aliases
### MessengerChannel
```ts
type MessengerChannel = object;
```
Defined in: [users/lib/types/messengerChannel.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/messengerChannel.ts#L4)
Represents a Messenger channel with an ID.
#### Properties
##### id
```ts
id: string;
```
Defined in: [users/lib/types/messengerChannel.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/messengerChannel.ts#L8)
The unique ID associated with the Messenger channel.
***
### MmsChannel
```ts
type MmsChannel = object;
```
Defined in: [users/lib/types/mmsChannel.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/mmsChannel.ts#L4)
Represents an MMS (Multimedia Messaging Service) channel with a phone number.
#### Properties
##### number
```ts
number: string;
```
Defined in: [users/lib/types/mmsChannel.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/mmsChannel.ts#L8)
The phone number associated with the MMS channel.
***
### PstnChannel
```ts
type PstnChannel = object;
```
Defined in: [users/lib/types/pstnChannel.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/pstnChannel.ts#L4)
Represents a PSTN (Public Switched Telephone Network) channel with a phone number.
#### Properties
##### number
```ts
number: number;
```
Defined in: [users/lib/types/pstnChannel.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/pstnChannel.ts#L8)
The phone number associated with the PSTN channel.
***
### SipChannel
```ts
type SipChannel = object;
```
Defined in: [users/lib/types/sipChannel.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/sipChannel.ts#L4)
Represents a SIP (Session Initiation Protocol) channel with the URI, username, and password.
#### Properties
##### password
```ts
password: string;
```
Defined in: [users/lib/types/sipChannel.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/sipChannel.ts#L18)
The password for authentication with the SIP channel.
##### uri
```ts
uri: string;
```
Defined in: [users/lib/types/sipChannel.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/sipChannel.ts#L8)
The SIP URI associated with the channel.
##### username
```ts
username: string;
```
Defined in: [users/lib/types/sipChannel.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/sipChannel.ts#L13)
The username for authentication with the SIP channel.
***
### SmsChannel
```ts
type SmsChannel = object;
```
Defined in: [users/lib/types/smsChannel.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/smsChannel.ts#L4)
Represents an SMS (Short Message Service) channel with a phone number.
#### Properties
##### number
```ts
number: string;
```
Defined in: [users/lib/types/smsChannel.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/smsChannel.ts#L8)
The phone number associated with the SMS channel.
***
### UserChannelsRequest
```ts
type UserChannelsRequest = object & Omit, "websocket">;
```
Defined in: [users/lib/types/requests/userRequest.ts:27](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/requests/userRequest.ts#L27)
Represents a request to create or update a user's channels.
#### Type declaration
##### websocket
```ts
websocket: WebSocketChannelRequest[];
```
An array of WebSocket channel requests.
#### Remarks
Vonage API's will return information using `snake_case`. This represents the
pure response before the client will transform the keys into `camelCase`.
***
### UserListParameters
```ts
type UserListParameters = object;
```
Defined in: [users/lib/types/parameters/userListParameters.ts:6](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/parameters/userListParameters.ts#L6)
Parameters for listing users.
#### Properties
##### cursor?
```ts
optional cursor: string;
```
Defined in: [users/lib/types/parameters/userListParameters.ts:23](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/parameters/userListParameters.ts#L23)
The cursor to start returning results from. You are not expected to provide this manually,
but to follow the URL provided in _links.next.href or _links.prev.href in the response which contains a cursor
value.
##### name?
```ts
optional name: string;
```
Defined in: [users/lib/types/parameters/userListParameters.ts:28](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/parameters/userListParameters.ts#L28)
Unique name for a user. Example: 'my_user_name'.
##### order?
```ts
optional order: SortOrder;
```
Defined in: [users/lib/types/parameters/userListParameters.ts:16](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/parameters/userListParameters.ts#L16)
The sorting order for the records. Must be one of: 'ASC' (Ascending) or 'DESC' (Descending).
##### pageSize?
```ts
optional pageSize: number;
```
Defined in: [users/lib/types/parameters/userListParameters.ts:11](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/parameters/userListParameters.ts#L11)
The number of records to return in the response. Minimum: 1, Maximum: 100, Default: 10.
Example: 10
***
### UserPageResponse
```ts
type UserPageResponse = object & APILinks;
```
Defined in: [users/lib/types/responses/userPageResponse.ts:11](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/responses/userPageResponse.ts#L11)
Represents a page response containing a list of users.
#### Type declaration
##### \_embedded
```ts
_embedded: object;
```
An object containing an array of user responses.
###### \_embedded.users
```ts
_embedded.users: UserResponse[];
```
##### page\_size
```ts
page_size: number;
```
The number of records returned in this response.
#### Remarks
Vonage API's will return information using `snake_case`. This represents the
pure response before the client will transform the keys into `camelCase`.
***
### UserPropertiesRequest
```ts
type UserPropertiesRequest = object;
```
Defined in: [users/lib/types/requests/userRequest.ts:11](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/requests/userRequest.ts#L11)
Represents a request to create or update a user's properties.
#### Remarks
Vonage API's will return information using `snake_case`. This represents the
pure response before the client will transform the keys into `camelCase`.
#### Properties
##### custom\_data
```ts
custom_data: Record;
```
Defined in: [users/lib/types/requests/userRequest.ts:17](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/requests/userRequest.ts#L17)
Custom key-value pairs associated with the user.
###### Remarks
Data here will not have their properties transformed
***
### UserRequest
```ts
type UserRequest = object & Omit;
```
Defined in: [users/lib/types/requests/userRequest.ts:41](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/requests/userRequest.ts#L41)
Represents a request to create or update a user.
#### Type declaration
##### channels
```ts
channels: UserChannelsRequest;
```
Channels for communication, specifically WebSocket channels.
##### image\_url
```ts
image_url: string;
```
The URL of the user's image.
##### properties
```ts
properties: UserPropertiesRequest;
```
User properties including custom data.
#### Remarks
Vonage API's will return information using `snake_case`. This represents the
pure response before the client will transform the keys into `camelCase`.
***
### UserResponse
```ts
type UserResponse = UserRequest & APILinks;
```
Defined in: [users/lib/types/responses/userResponse.ts:11](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/responses/userResponse.ts#L11)
Represents a response containing user information.
#### Remarks
Vonage API's will return information using `snake_case`. This represents the
pure response before the client will transform the keys into `camelCase`.
***
### UserType
```ts
type UserType = object;
```
Defined in: [users/lib/types/userType.ts:14](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/userType.ts#L14)
Represents a user with various properties and communication channels.
#### Properties
##### channels?
```ts
optional channels: object;
```
Defined in: [users/lib/types/userType.ts:48](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/userType.ts#L48)
Communication channels associated with the user.
###### messenger?
```ts
optional messenger: MessengerChannel[];
```
Messenger channels.
###### mms?
```ts
optional mms: MmsChannel[];
```
MMS (Multimedia Messaging Service) channels.
###### pstn?
```ts
optional pstn: PstnChannel[];
```
PSTN (Public Switched Telephone Network) channels.
###### sip?
```ts
optional sip: SipChannel[];
```
SIP (Session Initiation Protocol) channels.
###### sms?
```ts
optional sms: SmsChannel[];
```
SMS (Short Message Service) channels.
###### vbc?
```ts
optional vbc: VbcChannel[];
```
VBC (Voice Business Communication) channels.
###### viber?
```ts
optional viber: ViberChannel[];
```
Viber channels.
###### websocket?
```ts
optional websocket: WebsocketChannel[];
```
WebSocket channels.
###### whatsapp?
```ts
optional whatsapp: WhatsappChannel[];
```
WhatsApp channels.
##### displayName?
```ts
optional displayName: string;
```
Defined in: [users/lib/types/userType.ts:28](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/userType.ts#L28)
The display name of the user.
##### id?
```ts
optional id: string;
```
Defined in: [users/lib/types/userType.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/userType.ts#L18)
The unique ID associated with the user.
##### imageUrl?
```ts
optional imageUrl: string;
```
Defined in: [users/lib/types/userType.ts:33](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/userType.ts#L33)
The URL of the user's image.
##### name?
```ts
optional name: string;
```
Defined in: [users/lib/types/userType.ts:23](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/userType.ts#L23)
The name of the user.
##### properties?
```ts
optional properties: object;
```
Defined in: [users/lib/types/userType.ts:38](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/userType.ts#L38)
Custom data associated with the user.
###### customData
```ts
customData: Record;
```
Custom key-value pairs for user data.
***
### VbcChannel
```ts
type VbcChannel = object;
```
Defined in: [users/lib/types/vbcChannel.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/vbcChannel.ts#L4)
Represents a VBC (Voice Business Communication) channel with an extension.
#### Properties
##### extension
```ts
extension: string;
```
Defined in: [users/lib/types/vbcChannel.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/vbcChannel.ts#L8)
The extension associated with the VBC channel.
***
### ViberChannel
```ts
type ViberChannel = object;
```
Defined in: [users/lib/types/viberChannel.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/viberChannel.ts#L4)
Represents a Viber channel with a phone number.
#### Properties
##### number
```ts
number: string;
```
Defined in: [users/lib/types/viberChannel.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/viberChannel.ts#L8)
The phone number associated with the Viber channel.
***
### WebsocketChannel
```ts
type WebsocketChannel = object;
```
Defined in: [users/lib/types/websocketChannel.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/websocketChannel.ts#L4)
Represents a WebSocket channel configuration.
#### Properties
##### contentType?
```ts
optional contentType: string;
```
Defined in: [users/lib/types/websocketChannel.ts:13](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/websocketChannel.ts#L13)
Optional content type for WebSocket channel data.
##### headers?
```ts
optional headers: Record;
```
Defined in: [users/lib/types/websocketChannel.ts:18](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/websocketChannel.ts#L18)
Optional headers for WebSocket channel configuration.
##### uri
```ts
uri: string;
```
Defined in: [users/lib/types/websocketChannel.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/websocketChannel.ts#L8)
The WebSocket URI for the channel.
***
### WebSocketChannelRequest
```ts
type WebSocketChannelRequest = object & Omit;
```
Defined in: [users/lib/types/requests/websocketChannelRequest.ts:10](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/requests/websocketChannelRequest.ts#L10)
Represents a request to create or update a WebSocket channel.
#### Type declaration
##### content-type
```ts
content-type: string;
```
The content type associated with the WebSocket channel.
#### Remarks
Vonage API's will return information using `snake_case`. This represents the
pure response before the client will transform the keys into `camelCase`.
***
### WebSocketChannelResponse
```ts
type WebSocketChannelResponse = object & Omit;
```
Defined in: [users/lib/types/responses/websocketChannelResponse.ts:9](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/responses/websocketChannelResponse.ts#L9)
Represents a response containing WebSocket channel information.
#### Type declaration
##### content-type
```ts
content-type: string;
```
The content type associated with the WebSocket channel.
#### Remarks
Vonage API's will return information using `snake_case`. This represents the
pure response before the client will transform the keys into `camelCase`.
***
### WhatsappChannel
```ts
type WhatsappChannel = object;
```
Defined in: [users/lib/types/whatsappChannel.ts:4](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/whatsappChannel.ts#L4)
Represents a WhatsApp channel with a phone number.
#### Properties
##### number
```ts
number: string;
```
Defined in: [users/lib/types/whatsappChannel.ts:8](https://github.com/Vonage/vonage-node-sdk/blob/3846dd78a7cd39b838839d5c93db0b1652c0d168/packages/users/lib/types/whatsappChannel.ts#L8)
The phone number associated with the WhatsApp channel.