Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


Using this partner API, you can automate the sales, refund or cancellation process under your custom domain.
UChat will offer a training course to show you how to set it up step by step. More details in the below section.
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.

Image Added

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.

Image Added

Note

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

https://www.uchat.com.au/api

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:

https://app.testagency.ai/api

Similarly, all endpoints can be accessed here:

https://www.uchat.com.au/api#/

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