Create, update and delete users via API
You can use the iAdvize API to import your users, create new ones or update them automatically.
Importing or modifying users allows you to automate the management of your users to:
create your users in bulk,
synchronise your users between applications (user provisioning),
automate the creation of a user according to your needs,
update user information (username, password, group, ...),
modify the configuration of your users' communication channels etc.
Pre-requisite: recovery of your GraphQL API keys
API authentication uses temporary and revocable access keys.
Please note that the lifetime of the key is 24 hours
You can generate an access key by calling the url mentioned in this link with a user email and a password. See more about GraphQL authentification.
Create a user
Description of mutation field
To create a new user via the GraphQL API, you can enter all the fields below - only those with a star are required:
Informations | Descriptions |
---|---|
avatar* | Avatar’s URL |
channels
| Configuration of user communication channel(s) |
countryPreferences*
| Date format:
User’s interface language (ISO format) User’s language (ISO format) Time format:
User’s timezone: Example: "Europe/Paris" |
email* | User email |
externalId | Id representing the user in the client’s system |
firstName | User first name |
groupId | Groups are used to partition information and user exchanges in the iAdvize administration. For more information on user groups, please see the following documentation: Help Center - Use the user groups |
lastName* | User last name |
password* | User password (that he will change on first connection) |
projectIds* | Projects assigned to the user, determining which projects the user can manage conversations for roleIds* |
roleIds* | If you don’t know which role to pick, please see the following documentation: Help Center - Choose the right role for the user account
|
skillIds | Skills can be managed after user creation through |
userName* | Displayed under the user’s avatar in the chatbox |
Examples of user creation
Update a user
Use the mutation "userUpdate
" instead of "userCreate
". All the fields in the Create a user part are editable except for the userId field. However, this field is mandatory in the mutation to ensure that the correct user is modified.
In this mutation, only the fields to be modified must be filled in. Fields that are not filled in won’t be updated.
Delete a user
You will need the userId in 6 digit format.
Here is an example of a GraphQL query to delete the user with userId XXXXXX:
If all goes well, here's the response you'll get from the GraphQL API:
Last updated