# Manage the availability of your users with the iAdvize API

## Overview

Managing the availability of your users through the API can meet several integration use cases:

* Synchronize your users' availability between several tools,
* Modify the availability of your users on the different channels according to the current activity,
* View the availability of your users and the number of conversations in progress on each channel in real time.

## Prerequisites

API authentication uses temporary and revocable access keys (tokens). Please note that the lifetime of the key is 24 hours.

To generate your access key, please refer to [this section](https://docs.iadvize.dev/~/changes/39J6v2tWi3Ms7Me1qEFP/technologies/api-and-webhooks/graphql-api/authentication).

## Steps to follow <a href="#how-to-proceed" id="how-to-proceed"></a>

### **Check the availability of a user** <a href="#id-2-check-the-availability-of-a-user" id="id-2-check-the-availability-of-a-user"></a>

The [UserAvailability](https://docs.iadvize.dev/~/changes/39J6v2tWi3Ms7Me1qEFP/technologies/api-and-webhooks/graphql-api/reference) object is available in the user resource in our GraphQL API and allows you to consult the availability and occupation of a user for each channel (chat, call, video, third party channels).

For each channel, the [UserChannelAvailability](https://docs.iadvize.dev/~/changes/39J6v2tWi3Ms7Me1qEFP/technologies/api-and-webhooks/graphql-api/reference) object allows you to know:

* if the channel is activated for this user,
* whether the user is currently available on this channel,
* the number of conversations in progress on this channel, for this user,
* the number of simultaneous contacts allowed on this channel, for this user.

The [UserPresence](https://docs.iadvize.dev/~/changes/39J6v2tWi3Ms7Me1qEFP/technologies/api-and-webhooks/graphql-api/reference) object also lets you know if the user is connected to the solution or not.

### **Changing the status of a user** <a href="#id-3-changing-the-status-of-a-user" id="id-3-changing-the-status-of-a-user"></a>

The **userAvailabilityStatusUpdate** resource is available in our GraphQL API and allows you to modify in real time the availability of a user (available/unavailable) for each channel (chat, call, video, third-party channels).

{% hint style="info" %}
The webhook user.availability.updated allows you to be informed of each change of status of your users ([webhook reference](https://docs.iadvize.dev/~/changes/39J6v2tWi3Ms7Me1qEFP/technologies/api-and-webhooks/webhooks/reference#user.availability.updated))
{% endhint %}

## Good practices

To discover all the resources available to manage your users and their availability, you can consult our [GraphQL documentation.](https://docs.iadvize.dev/~/changes/39J6v2tWi3Ms7Me1qEFP/technologies/api-and-webhooks/graphql-api)

<br>
