### Full Request Example for User and Group Synchronization Source: https://api.officevibe.com/reference/sync This comprehensive JSON example illustrates a full request body for the Officevibe sync endpoint. It includes settings for alerts and invites, a list of users with custom attributes, group definitions, and the mapping between users and groups. ```json { "settings": { "syncManagerEmail": "manager@foo.bar", "inviteNewUsers": false }, "users": [ { "id": "U0001", "email": "user1@foo.bar", "firstName": "firstname", "lastName": "lastname", "jobTitle": "job1", "imageUrl": "http://...", // For language, options are: English, Français, Español, Deutsch, Português "language": "English", // Optionally add custom attributes by adding the key value pairs to this object. "Gender": "Female" }, { "id": "U0002", "email": "user2@foo.bar", "firstName": "firstname", "lastName": "lastname", "jobTitle": "job2", "imageUrl": null, "language": "English", } ], "groups": [ { "id": "G0001", "name": "group1" }, { "id": "G0002", "name": "group2" } ], "mappings": [ { "groupId": "G0001", "userId": "U0001", "subGroupId": null, "isMember": true, "isManager": true }, { "groupId": "G0001", "userId": "U0002", "subGroupId": null, "isMember": true, "isManager": false }, { "groupId": "G0001", "userId": null, "subGroupId": "G0002", "isMember": null, "isManager": null } ] } ``` -------------------------------- ### HTTP GET Request Example for Office Vibe Groups Source: https://api.officevibe.com/reference/groupsid This snippet demonstrates how to make an HTTP GET request to retrieve groups from the Office Vibe API. It requires a groupId as a query parameter. The output is typically a JSON object containing group information. ```http https://app.officevibe.com/api/v2/groups?groupId=Officevibe ``` -------------------------------- ### Authentication Guide Source: https://api.officevibe.com/reference/index Instructions on how to obtain and use your API key for Officevibe API authentication. ```APIDOC ## Authentication **Important Note**: To use this API, you must not have been migrated to the Workleap platform. For migrated users, a new API is in development. ### 1. Get your API key To access Officevibe API's, you need to get an API key for your company. You can obtain your API key by visiting the following link: https://officevibe.workleap.com/portal/settings/integrations/api/provisioning **Note**: Access to this page requires an Officevibe paid account and administrator privileges. ### 2. Use your API key Include your API key in the `Authorization` header of every request: ``` Authorization: Bearer [your API key] ``` If your request includes a payload, ensure the `Content-Type` header is set to `application/json`. ### 3. Test your API key You can test your API key by making a request to the `/ping` endpoint. A successful request will return an HTTP status code of 200. ### Note on Access To obtain an API key, you must be an Officevibe administrator. If you are not, please contact your Officevibe administrator. ``` -------------------------------- ### HTTP GET Request for Feedback - Officevibe API Source: https://api.officevibe.com/reference/feedbacklist This code snippet demonstrates how to make an HTTP GET request to retrieve feedback conversations from the Officevibe API. It supports optional query parameters for filtering feedback by group name, metric, tone, type, label, and date range. The base URL is https://officevibe.workleap.com/api/v2. ```http https://app.officevibe.com/api/v2/feedback https://app.officevibe.com/api/v2/feedback?groupName=Officevibe&metric=MG-1 ``` -------------------------------- ### GET /feedbackLabels Source: https://api.officevibe.com/reference/feedbacklabels Retrieves a list of custom labels that can be applied to feedbacks. ```APIDOC ## GET /feedbackLabels ### Description This request returns a list of the custom labels that can be added to feedbacks. ### Method GET ### Endpoint /feedbackLabels ### Parameters ### Request Example ```json { "example": "No request body" } ``` ### Response #### Success Response (200) - **isSuccess** (boolean) - Indicates if the request was successful. - **errorMessage** (null) - Contains an error message if the request failed. - **data** (array) - An array of feedback label objects. - **id** (string) - The unique identifier for the label. - **title** (string) - The name of the label. - **color** (string) - The color associated with the label. #### Response Example ```json { "isSuccess": true, "errorMessage": null, "data": [ { "id": "CT-1", "title": "Important", "color": "custom-tag1" }, { "id": "CT-2", "title": "Follow-up", "color": "custom-tag2" } ] } ``` ``` -------------------------------- ### Get User Information - HTTP Request Source: https://api.officevibe.com/reference/usersid This snippet shows how to make an HTTP GET request to retrieve information for a specific user by their email. It requires the user's email as a path parameter. The response will contain the user's profile details if found. ```http https://officevibe.workleap.com/api/v2/users/bob@test.com ``` -------------------------------- ### GET /feedback Source: https://api.officevibe.com/reference/feedbacklist Retrieves feedback conversations based on various filters. ```APIDOC ## GET /feedback ### Description This request returns feedback conversations. You can filter by group name, metric, tone, type, label, and date ranges. ### Method GET ### Endpoint https://officevibe.workleap.com/api/v2/feedback ### Parameters #### Query Parameters - **groupName** (string) - Optional - The name of the group to retrieve feedback. If null, it retrieves feedback for All Company. - **metric** (string) - Optional - Filter the feedback with a specific metric, ex : "MG-1". See documentation below. - **tone** (string) - Optional - Filter the feedback with a specific tone, ex : "FP". See documentation below. - **type** (string) - Optional - Filter the feedback with a specific type, ex : "POLL". See documentation below. - **label** (string) - Optional - Filter the feedback with a specific label, ex : "CT-1". See documentation below. - **fromDate** (string) - Optional - Filter the feedback from a specified creation date. (original feedback) - **toDate** (string) - Optional - Filter the feedback to a specified creation date (original feedback). ### Request Example ```http GET https://officevibe.workleap.com/api/v2/feedback?groupName=Officevibe&metric=MG-1 ``` ### Response #### Success Response (200) - **conversationCount** (integer) - The total number of conversations found. - **conversations** (array) - An array of feedback conversation objects. - **id** (string) - The unique identifier for the conversation. - **creationDate** (string) - The date and time the conversation was created. - **lastModificationDate** (string) - The date and time the conversation was last modified. - **userDisplayName** (string) - The display name of the user. - **userEmail** (string) - The email address of the user. - **questionAsked** (string) - The question that was asked. - **message** (string) - The feedback message content. - **tags** (array) - An array of tags associated with the feedback. - **replies** (array) - An array of replies to the feedback. - **creationDate** (string) - The date and time the reply was created. - **userDisplayName** (string) - The display name of the user who replied. - **userEmail** (string) - The email address of the user who replied. - **message** (string) - The content of the reply. #### Response Example ```json { "conversationCount" : 1, "conversations": [ { "id": "57504457a6cca38a00cfb4f88", "creationDate": "2016-06-02T14:36:07.035Z", "lastModificationDate": "2016-06-02T14:36:07.035Z", "userDisplayName": "Bobby Bob", "userEmail": "bobby@test.com", "questionAsked": "What's on your mind?", "message": "I'm happy", "tags": [ "Suggestion Box" ], "replies": [ { "creationDate": "2016-05-30T20:16:14.633Z", "userDisplayName": "Lea Pres", "userEmail": "lea@test.com", "message": "Ok nice!" } } ] } ``` #### Error Response (400) - An empty JSON object `{}` is returned for bad requests. #### Error Response Example ```json {} ``` ``` -------------------------------- ### GET /groups Source: https://api.officevibe.com/reference/groupsid Retrieves information about a specified group. The group can be identified by its name or ID. ```APIDOC ## GET /groups ### Description This request returns the information of a specified group. ### Method GET ### Endpoint https://officevibe.workleap.com/api/v2/groups ### Parameters #### Query Parameters - **groupId** (string) - Required - The name or id of the group to retrieve. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **isSuccess** (boolean) - Indicates if the request was successful. - **data** (object) - Contains the group information. - **id** (string) - The unique identifier of the group. - **name** (string) - The name of the group. - **groupType** (string) - The type of the group (e.g., "Department"). - **userCount** (integer) - The number of users in the group. - **managerCount** (integer) - The number of managers in the group. - **users** (array) - A list of users belonging to the group. - **email** (string) - The email address of the user. - **firstName** (string) - The first name of the user. - **lastName** (string) - The last name of the user. - **userName** (string) - The username of the user. - **jobTitle** (string) - The job title of the user. - **isGroupManager** (boolean) - Indicates if the user is a group manager. - **isCompanyManager** (boolean) - Indicates if the user is a company manager. - **isAdmin** (boolean) - Indicates if the user is an administrator. #### Response Example ```json { "example": "{\n \"isSuccess\" : true,\n \"data\" : {\n \"id\" : \"9345c237-c166-48ec-af1c-705b9a057be4\",\n \"name\" : \"Officevibe\",\n \"groupType\" : \"Department\",\n \"userCount\" : 0,\n \"managerCount\" : 1,\n \"users\" : \n [\n {\n \"email\" : \"bobboby@test.com\",\n \"firstName\" : \"Bob\",\n \"lastName\" : \"Boby\",\n \"userName\" : \"bobboby\",\n \"jobTitle\" : \"Sales\",\n \"isGroupManager\" : true,\n \"isCompanyManager\" : false,\n \"isAdmin\" : false\n }\n ]\n }\n}" } ``` ``` -------------------------------- ### Retrieve All Users (HTTP) Source: https://api.officevibe.com/reference/users This code snippet demonstrates how to retrieve all users within an organization using the Officevibe API. It is designed for legacy organizations and requires an authorization token. The request is a simple GET request to the /users endpoint. ```http https://officevibe.workleap.com/api/v2/users ``` -------------------------------- ### Retrieve All Groups (HTTP) Source: https://api.officevibe.com/reference/group This code snippet demonstrates how to make an HTTP GET request to the /groups endpoint to retrieve all group information for an organization. Ensure you are using the correct API base URL for Officevibe. ```http https://officevibe.workleap.com/api/v2/groups ``` -------------------------------- ### GET /feedback/{id} Source: https://api.officevibe.com/reference/feedbackid Retrieves the information for a specified feedback item. ```APIDOC ## GET /feedback/{id} ### Description This request returns the information for a specified feedback. ### Method GET ### Endpoint /feedback/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The id of the feedback to retrieve. ### Request Example ```json { "example": "GET https://officevibe.workleap.com/api/v2/feedback/57504457a6cca38a00cfb4f88" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the feedback. - **creationDate** (string) - The date and time the feedback was created. - **lastModificationDate** (string) - The date and time the feedback was last modified. - **userDisplayName** (string) - The display name of the user who provided the feedback. - **userEmail** (string) - The email address of the user who provided the feedback. - **questionAsked** (string) - The question that was asked. - **message** (string) - The content of the feedback message. - **tags** (array) - An array of tags associated with the feedback. - **replies** (array) - An array of replies to the feedback. - **creationDate** (string) - The date and time the reply was created. - **userDisplayName** (string) - The display name of the user who provided the reply. - **userEmail** (string) - The email address of the user who provided the reply. - **message** (string) - The content of the reply message. #### Response Example ```json { "example": "{\n \"id\": \"57504457a6cca38a00cfb4f88,\n \"creationDate\": \"2016-06-02T14:36:07.035Z\",\n \"lastModificationDate\": \"2016-06-02T14:36:07.035Z\",\n \"userDisplayName\": \"Bobby Bob\",\n \"userEmail\": \"bobby@test.com\",\n \"questionAsked\": \"What's on your mind?\",\n \"message\": \"I'm happy\",\n \"tags\": \n \t\t\t[\n \"Suggestion Box\"\n ],\n \"replies\":\n \t\t\t[\n {\n \"creationDate\": \"2016-05-30T20:16:14.633Z\",\n \"userDisplayName\": \"Lea Pres\",\n \"userEmail\": \"lea@test.com\",\n \"message\": \"Ok nice!\"\n }\n\t\t\t]\n}" } ``` ``` -------------------------------- ### GET /groups?groupId Source: https://api.officevibe.com/reference/groupsid Retrieves information for a specified group. This endpoint is only supported for legacy Officevibe organizations. ```APIDOC ## GET /groups?groupId ### Description This request returns the information of a specified group. This endpoint is only supported for legacy Officevibe organisations. ### Method GET ### Endpoint /groups ### Parameters #### Query Parameters - **groupId** (string) - Required - The unique identifier of the group. ### Request Example ```json { "example": "GET /groups?groupId=a1b2c3d4-e5f6-7890-1234-567890abcdef" } ``` ### Response #### Success Response (200) - **groupName** (string) - The name of the group. - **groupId** (string) - The unique identifier of the group. - **IsGroupManager** (boolean) - Indicates whether the user is a manager within the organization. Note: This property does not necessarily apply to the specific group. Please ensure to check the group permissions before relying on this property. #### Response Example ```json { "example": { "groupName": "Marketing Team", "groupId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "IsGroupManager": true } } ``` ``` -------------------------------- ### Retrieve Specific Feedback Information (HTTP) Source: https://api.officevibe.com/reference/feedbackid This code sample demonstrates how to make an HTTP GET request to retrieve the details of a specific feedback item from the Officevibe API. It requires the feedback ID as a path parameter and uses an 'Authorization' header for authentication. The response is expected in JSON format. ```http https://officevibe.workleap.com/api/v2/feedback/57504457a6cca38a00cfb4f88 ``` -------------------------------- ### Get Feedback Labels (HTTP) Source: https://api.officevibe.com/reference/feedbacklabels This request retrieves a list of custom labels that can be added to feedbacks. It requires an Authorization header with a Bearer token. The response includes a success status, an error message (if any), and an array of label objects, each with an ID, title, and color. ```http https://officevibe.workleap.com/api/v2/feedbackLabels ``` -------------------------------- ### GET /ping Source: https://api.officevibe.com/reference/ping Checks if the API is operational. Requires a valid API key for authentication. An invalid key will result in a 401 Unauthorized response. Requests must use TLS 1.2. ```APIDOC ## GET /ping ### Description This endpoint checks the health status of the API. It requires an API key for authentication. If the provided API key is invalid, the API will return a 401 Unauthorized status code. All requests must utilize TLS 1.2 or higher. ### Method GET ### Endpoint /ping ### Parameters #### Query Parameters - **apiKey** (string) - Required - Your Officevibe API key for authentication. ### Request Example ``` GET https://officevibe.workleap.com/api/v2/ping Authorization: Bearer YOUR_API_KEY ``` ### Response #### Success Response (200) - **isSuccess** (boolean) - Indicates whether the API ping was successful. #### Response Example ```json { "isSuccess": true } ``` #### Error Response (401) - **Description**: Unauthorized. Invalid or missing API key. - **Content**: Text plain (empty body) ``` -------------------------------- ### OpenAPI Definition for /ping Endpoint Source: https://api.officevibe.com/reference/ping The OpenAPI 3.1.0 definition for the /ping endpoint. It specifies the API server URL, security scheme using an API key in the header, and the expected responses for GET requests, including success (200), bad request (400), and unauthorized (401) statuses. ```json { "openapi": "3.1.0", "info": { "title": "api-settings", "version": "2" }, "servers": [ { "url": "https://officevibe.workleap.com/api/v2" } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "name": "Authorization", "in": "header", "x-default": "Bearer [[app:key]]" } } }, "security": [ { "sec0": [] } ], "paths": { "/ping": { "get": { "summary": "/ping", "description": "", "operationId": "ping", "responses": { "200": { "description": "200", "content": { "application/json": { "examples": { "Result": { "value": "{\"isSuccess\":true}" } }, "schema": { "type": "object", "properties": { "isSuccess": { "type": "boolean", "example": true, "default": true } } } } } }, "400": { "description": "400", "content": { "application/json": { "examples": { "Result": { "value": "{}" } }, "schema": { "type": "object", "properties": {} } } } }, "401": { "description": "401", "content": { "text/plain": { "examples": { "Result": { "value": "" } } } } } }, "deprecated": false } } }, "x-readme": { "headers": [], "explorer-enabled": false, "proxy-enabled": true }, "x-readme-fauxas": true } ``` -------------------------------- ### GET /groups Source: https://api.officevibe.com/reference/group Retrieves all groups information for the organization. This endpoint is only supported for legacy Officevibe organizations and excludes Smart Groups. ```APIDOC ## GET /groups ### Description Returns all the groups information of the organization. This endpoint is only supported for legacy Officevibe organizations and excludes Smart Groups. ### Method GET ### Endpoint `/groups` ### Parameters #### Query Parameters None #### Path Parameters None #### Request Body None ### Request Example ```http GET https://officevibe.workleap.com/api/v2/groups Authorization: Bearer [[app:key]] ``` ### Response #### Success Response (200) - **isSuccess** (boolean) - Indicates if the request was successful. - **data** (object) - Contains the group information. - **groupCount** (integer) - The total number of groups. - **groups** (array) - A list of group objects. - **id** (string) - The unique identifier for the group. - **name** (string) - The name of the group. - **groupType** (string) - The type of the group (e.g., "Department"). - **userCount** (integer) - The number of users in the group. - **managerCount** (integer) - The number of managers in the group. #### Response Example ```json { "isSuccess" : true, "data" : { "groupCount" : 1, "groups" : [ { "id" : "9345c237-c166-48ec-af1c-705b9a057be4", "name" : "Officevibe", "groupType" : "Department", "userCount" : 10, "managerCount" : 2 } ] } } ``` ``` -------------------------------- ### GET /api/v2/groups Source: https://api.officevibe.com/reference/groupsid Retrieves a list of groups from the Officevibe API. This endpoint can be used to fetch group information based on provided parameters. ```APIDOC ## GET /api/v2/groups ### Description Retrieves a list of groups from the Officevibe API. ### Method GET ### Endpoint /api/v2/groups ### Query Parameters - **groupId** (string) - Optional - The ID of the group to filter by. ### Request Example ```http https://app.officevibe.com/api/v2/groups?groupId=Officevibe ``` ### Response #### Success Response (200) - **groups** (array) - A list of group objects. - **id** (string) - The unique identifier for the group. - **name** (string) - The name of the group. #### Response Example ```json { "groups": [ { "id": "example-group-id", "name": "Example Group" } ] } ``` ``` -------------------------------- ### GET /users Source: https://api.officevibe.com/reference/users Retrieves information about all users in the organization. This endpoint is specifically for legacy Officevibe organizations and only returns users in Active or Inactive states. ```APIDOC ## GET /users ### Description Retrieves information about all users in the organization. This endpoint is specifically for legacy Officevibe organizations and only returns users in Active or Inactive states. ### Method GET ### Endpoint /users ### Parameters #### Query Parameters None #### Request Body None ### Request Example ```http GET https://officevibe.workleap.com/api/v2/users ``` ### Response #### Success Response (200) - **userCount** (integer) - The total number of users returned. - **users** (array) - An array of user objects. - **email** (string) - The email address of the user. - **firstName** (string) - The first name of the user. - **lastName** (string) - The last name of the user. - **userName** (string) - The username of the user. - **jobTitle** (string) - The job title of the user. - **isGroupManager** (boolean) - Indicates if the user is a group manager. - **isCompanyManager** (boolean) - Indicates if the user is a company manager. - **isAdmin** (boolean) - Indicates if the user is an administrator. #### Response Example ```json { "userCount": 1, "users": [ { "email": "bobboby@test.com", "firstName": "Bob", "lastName": "Boby", "userName": "bobboby", "jobTitle": "Sales", "isGroupManager": false, "isCompanyManager": false, "isAdmin": false } ] } ``` #### Error Response (400) - An empty JSON object is returned for bad requests. ``` -------------------------------- ### GET /users/:email Source: https://api.officevibe.com/reference/usersid Retrieves the information for a specified user. This endpoint is only supported for legacy Officevibe organisations and only returns users in the Active or Inactive states. ```APIDOC ## GET /users/{email} ### Description The request returns the information for a specified user. This endpoint is only supported for legacy Officevibe organisations and only returns users in the Active or Inactive states. ### Method GET ### Endpoint https://officevibe.workleap.com/api/v2/users/{email} ### Parameters #### Path Parameters - **email** (string) - Required - The email of the user to retrieve ### Request Example ```json { "example": "Not applicable for GET request" } ``` ### Response #### Success Response (200) - **email** (string) - The email address of the user. - **firstName** (string) - The first name of the user. - **lastName** (string) - The last name of the user. - **userName** (string) - The username of the user. - **jobTitle** (string) - The job title of the user. - **isGroupManager** (boolean) - Indicates if the user is a group manager. - **isCompanyManager** (boolean) - Indicates if the user is a company manager. - **isAdmin** (boolean) - Indicates if the user is an administrator. - **managedGroups** (array) - A list of groups managed by the user. - **memberGroups** (array) - A list of groups the user is a member of. #### Response Example ```json { "example": { "email": "bobboby@test.com", "firstName": "Bob", "lastName": "Boby", "userName": "bobboby", "jobTitle": "Sales", "isGroupManager": false, "isCompanyManager": false, "isAdmin": false, "managedGroups": [], "memberGroups": [ "Officevibe" ] } } ``` ``` -------------------------------- ### Disable Automatic User Invites Source: https://api.officevibe.com/reference/sync This code example shows how to prevent Officevibe from automatically inviting new users upon creation. The `inviteNewUsers` field set to `false` within the `settings` object achieves this, allowing for manual invitations or SSO login. ```json "settings": { "inviteNewUsers": false }, ``` -------------------------------- ### Remove Group Request Example (JSON) Source: https://api.officevibe.com/reference/groupremove This snippet shows an example of a JSON request body to remove a group using the /groups/remove endpoint. It requires a 'groupId' property to identify the group for removal. This endpoint is specific to legacy Officevibe organizations. ```json { "groupId": "My Group" } ``` -------------------------------- ### OpenAPI Definition for Officevibe API Source: https://api.officevibe.com/reference/sync This JSON defines the OpenAPI 3.1.0 specification for the Officevibe API. It includes server information, security schemes (API key authentication), and the `/sync` endpoint. The `/sync` endpoint allows for the synchronization of users, groups, and group relations, with a detailed schema for the request body. ```json { "openapi": "3.1.0", "info": { "title": "api-settings", "version": "2" }, "servers": [ { "url": "https://officevibe.workleap.com/api/v2" } ], "components": { "securitySchemes": { "sec0": { "type": "apiKey", "name": "Authorization", "in": "header", "x-default": "Bearer [[app:key]]" } } }, "security": [ { "sec0": [] } ], "paths": { "/sync": { "post": { "summary": "/sync", "description": "The request will synchronize the company's users, groups and group relations.", "operationId": "sync", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "users", "groups", "mappings" ], "properties": { "settings": { "type": "object", "description": "The synchronization settings.", "required": [ "syncManagerEmail", "inviteNewUsers" ], "properties": { "syncManagerEmail": { "type": "string", "description": "The sync manager's email address", "default": "manager@foo.bar" }, "inviteNewUsers": { "type": "boolean", "description": "Whether to invite new users on creation or not", "default": false } } }, "users": { "type": "array", "description": "The list of users to synchronize, cannot be empty", "items": { "properties": { "id": { "type": "string", "description": "The member's ID", "default": "U001" }, "email": { "type": "string", "description": "The member's email address", "default": "user1@foo.bar" }, "firstName": { "type": "string", "description": "The member's first name", "default": "Foo" }, "lastName": { "type": "string", "description": "The member's last name", "default": "Bar" }, "jobTitle": { "type": "string", "description": "The member's job title", "default": "Job1" }, "imageUrl": { "type": "string", "description": "The member's profile picture", "default": "http://..." }, "language": { "type": "string", "description": "For language, options are: English, Français, Español, Deutsch, Português", "default": "English" }, "Gender": { "type": "string", "description": "Optionally add custom attributes by adding the key value pairs to this object.", "default": "Female" } }, "required": [ "id", "email", "firstName", "lastName", "language" ], "type": "object" } }, "groups": { "type": "array", "description": "The list of groups to synchronize, cannot be empty", "items": { "properties": { "id": { "type": "string", "description": "The group's ID", "default": "G001" }, "name": { "type": "string", "description": "The group's name", "default": "Group1" } }, "required": [ "id" ] } } } } } } } } } } } ``` -------------------------------- ### API Key Authentication Source: https://api.officevibe.com/reference/authentication This section details how to obtain and use your API key for authenticating with the Officevibe API. It outlines the prerequisites and the method for including the key in your requests. ```APIDOC ## Authentication with API Key ### Description To access the Officevibe API, you need an API key. This key must be included in the `Authorization` header of every request. **Important Note:** This API is for users who have *not* been migrated to the Workleap platform. Migrated users will have access to a new API in the future. ### Prerequisites - You must have a paid Officevibe account. - You must be an administrator of your Officevibe account. ### Obtaining Your API Key 1. Navigate to the API provisioning portal: [https://officevibe.workleap.com/portal/settings/integrations/api/provisioning](https://officevibe.workleap.com/portal/settings/integrations/api/provisioning) 2. Follow the on-screen instructions to generate your API key. ### Using Your API Key Include your API key in the `Authorization` header of your requests as a Bearer token: ``` Authorization: Bearer [your_api_key] ``` If your request includes a payload, ensure the `Content-Type` header is set to `application/json`: ``` Content-Type: application/json ``` ### Testing Your API Key To test if your API key is working correctly, make a `GET` request to the `/ping` endpoint. A successful request will return an HTTP 200 status code. ### Endpoint `/ping` ### Method GET ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the API is accessible. ``` -------------------------------- ### Ping API Endpoint to Test Authentication Source: https://api.officevibe.com/reference/index Illustrates how to use the /ping endpoint to test your API key. A successful authentication will result in an HTTP 200 status code. This is a simple way to verify your API key is active and correctly configured. ```http GET /ping Authorization: Bearer [my API key] ``` -------------------------------- ### POST /groups/addUsers Source: https://api.officevibe.com/reference/groupaddemployee Adds users to a specified group. If emails do not match existing users, new users will be created. ```APIDOC ## POST /groups/addUsers ### Description This request adds users to a specified group. This endpoint is only supported for legacy Officevibe organisations. ### Method POST ### Endpoint /groups/addUsers ### Parameters #### Request Body - **groupId** (string) - Required - The group name or id. - **emails** (array) - Required - The user emails. The users will be created if not matched to any existing. - **toManagers** (boolean) - Optional - Add the users to the managers list. Defaults to `false`. - **toMembers** (boolean) - Optional - Add the users to members list. Defaults to `true`. ### Request Example ```json { "groupId": "9345c237-c166-48ec-af1c-705b9a057be4", "emails": [ "bobby@test.com" ], "toManagers": false, "toMembers": true } ``` ### Response #### Success Response (200) - **isSuccess** (boolean) - Indicates if the operation was successful. #### Response Example ```json { "isSuccess": true } ``` ``` -------------------------------- ### Group Hierarchy and User Memberships API Source: https://api.officevibe.com/reference/sync This API allows for the management and retrieval of group hierarchies and user memberships within the Officevibe system. It supports operations related to mapping groups, users, and their membership status. ```APIDOC ## POST /websites/api_officevibe_reference/group-mappings ### Description This endpoint is used to manage group hierarchy and user memberships. It allows for the creation or update of mappings between groups and users, specifying membership and manager roles. ### Method POST ### Endpoint /websites/api_officevibe_reference/group-mappings ### Parameters #### Request Body - **groupHierarchy** (object) - Required - Defines the structure of the group hierarchy. - **mappings** (array) - Required - The list of group hierarchy and their users' memberships, cannot be empty. - **groupId** (string) - Required - The ID of the group being mapped. - **userId** (string) - Required - The ID of the user being mapped. - **subGroupId** (string) - Required - The ID of the group being set as a sub group. - **isMember** (boolean) - Required - If the user is a member of the group or not. - **isManager** (boolean) - Required - If the user is the manager of the group or not ### Request Example ```json { "groupHierarchy": { "mappings": [ { "groupId": "G0001", "userId": "U0001", "subGroupId": "G0002", "isMember": true, "isManager": false } ] } } ``` ### Response #### Success Response (200) - **isSuccess** (boolean) - Indicates if the operation was successful. - **errors** (array) - A list of errors encountered during the operation. #### Response Example ```json { "isSuccess": true, "errors": [] } ``` ``` -------------------------------- ### POST /sync Source: https://api.officevibe.com/reference/sync Synchronizes the company's users, groups, and group relations with Officevibe. This endpoint is crucial for maintaining up-to-date organizational data within the platform. ```APIDOC ## POST /sync ### Description The request will synchronize the company's users, groups and group relations. ### Method POST ### Endpoint https://officevibe.workleap.com/api/v2/sync ### Parameters #### Request Body - **users** (array) - Required - The list of users to synchronize, cannot be empty. - **id** (string) - Required - The member's ID. - **email** (string) - Required - The member's email address. - **firstName** (string) - Required - The member's first name. - **lastName** (string) - Required - The member's last name. - **jobTitle** (string) - Optional - The member's job title. - **imageUrl** (string) - Optional - The member's profile picture. - **language** (string) - Required - For language, options are: English, Français, Español, Deutsch, Português. - **Gender** (string) - Optional - Optionally add custom attributes by adding the key value pairs to this object. - **groups** (array) - Required - The list of groups to synchronize, cannot be empty. - **id** (string) - Required - The group's ID. - **name** (string) - Optional - The group's name. - **mappings** (array) - Required - Group relations to synchronize. - **settings** (object) - Optional - The synchronization settings. - **syncManagerEmail** (string) - Required - The sync manager's email address. - **inviteNewUsers** (boolean) - Required - Whether to invite new users on creation or not. ### Request Example ```json { "settings": { "syncManagerEmail": "manager@foo.bar", "inviteNewUsers": false }, "users": [ { "id": "U001", "email": "user1@foo.bar", "firstName": "Foo", "lastName": "Bar", "jobTitle": "Job1", "imageUrl": "http://...", "language": "English", "Gender": "Female" } ], "groups": [ { "id": "G001", "name": "Group1" } ], "mappings": [ { "groupId": "G001", "userId": "U001" } ] } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the synchronization status. - **message** (string) - A message providing details about the synchronization outcome. #### Response Example ```json { "status": "success", "message": "Synchronization completed successfully." } ``` ``` -------------------------------- ### Define Group Hierarchy and User Mappings Source: https://api.officevibe.com/reference/sync This snippet defines the structure for mapping group hierarchies and user memberships. It specifies required fields like groupId, userId, subGroupId, isMember, and isManager. The 'mappings' field is an array of these mapping objects and cannot be empty. ```JSON { "mappings": { "type": "array", "description": "The list of group hierarchy and their users' memberships, cannot be empty", "items": { "properties": { "groupId": { "type": "string", "description": "The ID of the group being mapped", "default": "G0001" }, "userId": { "type": "string", "description": "The ID of the user being mapped", "default": "U0001" }, "subGroupId": { "type": "string", "description": "The ID of the group being set as a sub group", "default": "G0002" }, "isMember": { "type": "boolean", "description": "If the user is a member of the group or not", "default": true }, "isManager": { "type": "boolean", "description": "If the user is the manager of the group or not", "default": false } }, "required": [ "groupId", "userId", "subGroupId", "isMember", "isManager" ], "type": "object" } } } ``` -------------------------------- ### Add API Key to Authorization Header Source: https://api.officevibe.com/reference/index Demonstrates how to include your API key in the Authorization header for API requests. This is a standard method for authenticating API calls. Ensure your API key is correctly formatted with the 'Bearer' prefix. ```http Authorization: Bearer [my API key] ```