User Sync API
API for synchronizing user data.
POST /v1/user-sync
This endpoint is used to sync a user you have with the Wazper algorithm.
When it is called, it will run the Wazper algorithm to try to find the colleagues of that user.
Endpoint URL
The endpoint URL ishttps://api.wazper.com/v1/user-sync
HTTP Method
POST
Headers
Header | Type | Required | Description |
---|---|---|---|
X-API-Key | String | Yes | Your Wazper API Key. |
Content-Type | String | Yes | Must be application/json . |
Accept | String | No | Recommended application/json . |
Request Body
The request body must be a JSON object containing a user
object.
User Object Fields:
Field | Type | Required | Description |
---|---|---|---|
email | String | Yes | The user’s email address. This is used as the primary identifier for creating or updating the user. |
country | String | Yes | The user’s country. This needs to be a country name, if you are using the API, you need to provide this Information accurately to get accurate results. |
firstName | String | No | The user’s first name. |
lastName | String | No | The user’s last name. |
name | String | No | The user’s full name. If firstName and lastName are provided, they will be concatenated if name is not. |
jobTitle | String | No | The user’s job title. |
inviteLink | String | No | A custom invite link for the user. If not provided, the client’s default invite link may be used. (in the case where you have an invitation link per user that can be used by his colleagues). |
Example Request (cURL)
Success Response (202 Accepted)
The response indicates that the request has been accepted for processing. The actual user synchronization and webhook trigger happen asynchronously.
Error Responses
-
400 Bad Request - User Email Required:
-
400 Bad Request - User IP/Country Required:
-
400 Bad Request - API Key Not Linked:
-
401 Unauthorized - API Key Required:
-
401 Unauthorized - Invalid API Key:
-
401 Unauthorized - Invalid Organization:
-
402 Payment Required - No Credits:
-
500 Internal Server Error:
Notes
- This API will run the Wazper algorithm to find the colleagues of the user.
- If the user has a personal email address (gmail, outlook, etc..) the algorithm will not run for him.
- You are only billed a credit when more than 1 colleague is found.
- You need to handle the
country
recognition using the IP of the user for example and pass the name of the country to the API.
Authorizations
Body
Response
Request accepted for asynchronous processing.
The response is of type object
.