diff --git a/config/sidebar/contributingGuide.js b/config/sidebar/contributingGuide.js index f545419d..7c12b0cb 100644 --- a/config/sidebar/contributingGuide.js +++ b/config/sidebar/contributingGuide.js @@ -53,6 +53,7 @@ module.exports = [ items: [ "contributing-guide/chatwoot-apis", "contributing-guide/api-documentation", + "contributing-guide/chatwoot-platform-apis", "contributing-guide/security-reports", "contributing-guide/translation-guidelines", "contributing-guide/community-guidelines", diff --git a/docs/contributing-guide/chatwoot-platform-apis.md b/docs/contributing-guide/chatwoot-platform-apis.md new file mode 100644 index 00000000..a127439f --- /dev/null +++ b/docs/contributing-guide/chatwoot-platform-apis.md @@ -0,0 +1,50 @@ +--- +title: "Chatwoot Platform APIs" +--- + +# Chatwoot Platform APIs + +The Chatwoot Platform APIs allow you to integrate a conversation management interface into your existing software stack. Installation admins can use these APIs to manage users, accounts, and roles. Additionally, these APIs can be used to sync authentication information from external systems into Chatwoot. + +> **Note:** These APIs are available only on `self-hosted` Chatwoot installations. + +## Creating a Platform App + +To create a platform app, follow these steps: + +1. Go to the super admin portal and navigate to `super_admin/platform_apps`. + + ![Super Admin Portal](./images/platform-app/super_admin.png) + +2. Click on the "New platform app" button. + + ![Platform Apps Home](./images/platform-app/platform-home.png) + +3. Fill in the platform app name and click the "Create" button. + + ![Create Platform App](./images/platform-app/platform-create.png) + +4. After creating the platform app, open it to view and copy the access token. + + ![Platform App Access Token](./images/platform-app/platform-access-token.png) + +## Using the Access Token + +The `access_token` is required to authenticate all API requests. Please use the Postman collection to test these APIs. + +### Testing the APIs + +To test the APIs: + +1. Copy the access token from the platform app. +2. Use it in the `Authorization` header of your API requests. + +Here's an example of creating a user using the API: + +![Create User API](./images/platform-app/create-user.png) + +Similarly, you can create `Account` and `Role` entities using the APIs. + +## Reference + +For more detailed information and to test the APIs, refer to our [Postman Collection](https://www.postman.com/chatwoot/workspace/chatwoot-apis/collection/162770-e5451b69-9f97-489b-b352-4ca7d8d82aff). diff --git a/docs/contributing-guide/images/platform-app/create-user.png b/docs/contributing-guide/images/platform-app/create-user.png new file mode 100644 index 00000000..5c434ba5 Binary files /dev/null and b/docs/contributing-guide/images/platform-app/create-user.png differ diff --git a/docs/contributing-guide/images/platform-app/platform-access-token.png b/docs/contributing-guide/images/platform-app/platform-access-token.png new file mode 100644 index 00000000..43a047c9 Binary files /dev/null and b/docs/contributing-guide/images/platform-app/platform-access-token.png differ diff --git a/docs/contributing-guide/images/platform-app/platform-create.png b/docs/contributing-guide/images/platform-app/platform-create.png new file mode 100644 index 00000000..229e05e4 Binary files /dev/null and b/docs/contributing-guide/images/platform-app/platform-create.png differ diff --git a/docs/contributing-guide/images/platform-app/platform-home.png b/docs/contributing-guide/images/platform-app/platform-home.png new file mode 100644 index 00000000..36a168e5 Binary files /dev/null and b/docs/contributing-guide/images/platform-app/platform-home.png differ diff --git a/docs/contributing-guide/images/platform-app/super_admin.png b/docs/contributing-guide/images/platform-app/super_admin.png new file mode 100644 index 00000000..4632d523 Binary files /dev/null and b/docs/contributing-guide/images/platform-app/super_admin.png differ