User Management
The purpose of this page is to explain how to set up a fully operational “telephony” user (with the Wazo API), having the following features/properties:
- Voicemail enabled
- Forward enabled
- Credentials for API usage
- One or more lines (including extensions and SIP endpoints) created
- One or more created DID numbers that allow(s) receiving calls
- Member of a ring groups
- …
Want more information about the user's API, consult the API documentation.
Create User (the new way)
To help developers quickly create users and easily understand the information needed, the user creation process has been revamped. This allows developers to use one single endpoint, instead of having to call many endpoints. Also, relations and complete validation/rollback are handled on the server-side:
- the attachments (the link between the user and their related resources)
- the rollback in case of errors (if one of the resource creations fails)
Warning: If needed, the following resources must be created before user creation:
- Switchboards
- Groups
- Functions Keys Templates
Below is the only step to create the user.
A Single POST
Request
- Create the “telephony” user and all the required resources needed to be fully operational
(API Reference):
Voilà! The user and related resources will be created from this single endpoint. If the payload is not right, nothing will be created and you will receive a complete error message.
POST /users
Create User (the old way)
The Wazo REST API historically provides HTTP endpoints helping developers to manage resources at a very low level (i.e. developers manage the resources, one by one). For example: to create a fully operational “telephony” user, developers must query various endpoints (and so many resources) in a specific order:
- /users
- /lines
- /extensions
- /voicemails
- …
The following requests must be made in the specific chronological order:
User
- Create the core of the “telephony” user
(API Reference):
POST /users
Line(s)
-
Create line (API Reference):
POST /lines
-
Attach the line to the user (API Reference):
PUT /users/<user_id>/lines/<line_id>
SIP Endpoint(s)
-
Create SIP endpoint (API Reference):
POST /endpoints/sip
-
Attach trunk to SIP endpoint (API Reference):
POST /trunks/<trunk_id>/endpoints/sip/<sip_uuid>
-
Attach endpoint to line (API Reference):
PUT /lines/<line_id>/endpoints/sip/<endpoint_uuid>
Extension(s)
-
Create extension (API Reference):
POST /extensions
-
Attach extension to line (API Reference):
PUT /lines/<line_id>/extensions/<extension_id>
Voicemail(s)
-
Create voicemail (API Reference):
POST /voicemails
-
Attach voicemail to user (API Reference):
PUT /users/<user_id>/voicemails/<voicemail_id>
Forward(s)
- Define all forwards for user (remove existing user’s forwards)
(API Reference):
PUT /users/<user_id>/forwards
Fallback(s)
- Define all fallbacks for user (remove existing user’s fallbacks)
(API Reference):
PUT /users/<user_id>/fallbacks
Agent(s)
-
Create agent (API Reference):
POST /agents
-
Attach agent to user (API Reference):
PUT /users/<user_id>/agents/<agent_id>
Group(s) ( including ring group(s) )
- Create group having some users as members (including the new user)
(API Reference):
POST /groups
OR
- Define existing groups for user (this will detach any existing groups already attached to the
user)
(API Reference):
PUT /users/<user_id>/groups
OR
- Define some users as members (including the new user) (this will detach existing members already
attached to the group)
(API Reference):
PUT /groups/<group_uuid>/members/users
Incall(s)
-
Create an incall with ‘user’ as a destination (API Reference):
POST /incalls
-
Create an extension, having the context used for the incalls (API Reference):
POST /extensions
-
Attach the extension(s) to the incall(s) (API Reference):
POST /incalls/<incall_id>/extensions/<extension_id>
Service(s)
- Enable dnd and incallfilter for the user
(API Reference):
PUT /users/<user_id>/services
Switchboard(s)
- Create new switchboard with user as member
(API Reference):
POST /switchboards
OR
-
For each existing switchboard needed to be attached to the user:
-
Retrieve one switchboard with its existing members (API Reference):
GET /switchboards/<switchboard_uuid>
-
Define members (existing+new user) for the switchboard (erase existing members) (API Reference):
PUT /switchboards/<switchboard_uuid>/members/users
-
Queue(s)
- Create a queue with user as member
(API Reference):
POST /queues
OR
-
For each existing switchboard needed to be attached to the user:
-
Retrieve one queue with the existing members (API Reference):
GET /queue/<queue_id>
-
Associate queue to the user (API Reference):
PUT /queues/<queue_id>/members/users/<user_id>
-
Function Key(s)
- Define the func keys for user (erase existing ones already in place for the user)
(API Reference):
PUT /users/<user_id>/funckeys
OR
- Attach a template of func keys to the user
(API Reference):
PUT /users/<user_id>/funckeys/templates/<template_id>