UChat Partner API

UChat offers a partner APi for our partners. You will find more details here: https://www.uchat.com.au/partner-api#/

UChat offer different endpoint for our partners, you can easily:

  • Pull more information about the workspace, your plans options, your addon options.

  • Upgrade or downgrade plans

  • Add or remove add ons

  • Enable or disable auto renew


Using this partner API, you can automate the sales, refund or cancellation process under your custom domain.

Creating Your API Token

From your workspace’s dashboard, click on the top-right drop down adjacent to your user profile and then click on API keys tab.

 

 

From here, you can fill in the name for your token, select the workspace and the bot you want to create the token for and manage permissions. Once donce copy your token.

 

 

Note: For Partner API, The token should be created from the Partner workspace (any bot can be used as long as it resides within the partner’s workspace) 

URL & Authentication

The base URL for all api-endpoints will be

 

 

For partners, the base URL will be

 

https://[Partner Custom Domain]/api

 

For example, if the custom domain is “app.testagency.ai” the base url will be:

 

 

Similarly, all endpoints can be accessed here:

 

 

For partners, the white labelled URL will be:

 

https://[Partner Custom Domain]/api

 

UChat uses Bearer Token as authorization protocol hence the following header must be passed for all api-calls for authentication

 

Authorization: Bearer {access token}

Partner API Endpoints

Partner Management

/partner/clients

Fetches all the clients under the Partner domain

/partner/workspaces

Fetches all the workspaces under the Partner domain

/partner/workspace/create

Creates a new workspace under the Partner domain (Also creates a new client)

/partner/workspace/create-for-existing-user

Creates a new workspace for an already existing user

/partner/workspace/{workspaceId}

Fetches Information regarding a specific workspace (using GET) , also is used to delete the said workspace (using DEL)

/partner/workspace/{workspaceId}/update-extra-billing-information

Adds or updates extra billing information to the specific workspace

/partner/workspace/{workspaceId}/list-flows

Fetches specific Flows/bots of within a workspace

/partner/workspace/{workspaceId}/change-plan

Change or update a workspace’s current plan

/partner/workspace/{workspaceId}/add-addon

Add or update a workspace’s addon

/partner/workspace/{workspaceId}/remove-addon

Remove a workspace’s addon

/partner/workspace/{workspaceId}/topup-points

Add points to a workspace

/partner/workspace/{workspaceId}/deduct-points

Deduct or remove points from a workspace

/partner/workspace/{workspaceId}/enable-auto-renew

Enable auto-renew for a workspace

/partner/workspace/{workspaceId}/disable-auto-renew

Disable auto-renew for a workspace

/partner/workspace/{workspaceId}/pause

Pauses a specific workspace

/partner/workspace/{workspaceId}/active

Resumes a specific workspace which was paused

/partner/workspace/{workspaceId}/members

Fetches members of a specific workspace

/partner/workspace/{workspaceId}/invite-member

Send invite to a user to join a workspace

/partner/workspace/{workspaceId}/remove-member

Remove a member from a workspace

/partner/workspace/{workspaceId}/install-template

Installs a template in a specific workspace

/partner/plans

Fetches available plans for the Partner

/partner/addons

Fetches available addons for the Partner

/partner/webhook

Fetches active webhooks for the Partner

/partner/set-webhook

Sets a webhook for a Partner workspace event

/partner/remove-webhook

Removes a webhook for a Partner workspace event

/partner/templates

Fetches all the templates for which Partner has access to