UChat now allows its users to access its various features and tools using a vast variety of available API endpoints which can be accessed using REST API protocols.
The endpoints use a Bearer token for authorization and operate on https protocol.
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.
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 “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}
API Endpoints
Flow | |
/flow/subflows | Used to fetch all the subflows present in a bot |
/flow/bot-users-count | Provides a count of all bot users present in the bot |
/flow/agents | Fetches a list of all agents available in the workspace |
Flow Tag | |
/flow/tags | Fetches a lis of all the tags available in the bot |
/flow/create-tag | Creates a new tag |
/flow/delete-tag | Deletes an existing tag using tag NS |
/flow/delete-tag-by-name | Deletes an existing tag using tag’s name |
Flow User Field | |
/flow/user-fields | Fetches all the user fields available in the bot |
/flow/create-user-field | Creates a new userfield |
/flow/delete-user-field | Deletes a user field using varNS |
/flow/delete-user-field-by-name | Deletes a user field using userfield name |
Flow Bot Field | |
/flow/bot-fields | Fetches all the bot fields available in the bot |
/flow/create-bot-field | Creates a new botfield |
/flow/set-bot-field | Updates the value of a botfield using varNS |
/flow/set-bot-field-by-name | Updates the value of a botfield using botfield name |
/flow/set-bot-fields | Updates multiple bot fields using varNS |
/flow/set-bot-fields-by-name | Updates multiple botfields using botfield names |
/flow/delete-bot-field | Deletes an existing botfield |
/flow/delete-bot-field-by-name | Deletes an existing botfield using botfield name |
Flow Segments | |
/flow/segments | Fetches a list of all segments available in a flow in a bot |
Flow Custom Event | |
/flow/custom-events | Fetches a list of all custom events in a bot |
/flow/custom-events/summary | Provides a summary of all custom events |
Whatsapp Template | |
/whatsapp-template/list | Fetches a list of all Whatsapp templates available |
/whatsapp-template/create | Creates a new whatsapp template |
/whatsapp-template/delete | Deletes an existing template |
/whatsapp-template/sync | Syncs all templates from Business Manager with UChat |
Subscriber | |
/subscribers | Fetches a list of all subscribed bot users |
/subscriber/get-info | Fetches a specific subscribed bot user using UserNS |
/subscriber/get-info-by-user-id | Fetches a specific subscribed bot user using User ID |
/subscriber/create | Creates a bot user |
/subscriber/update | Updates a bot user |
/subscriber/delete | Deletes a bot user |
/subscriber/add-tag | Adds a tag to a bot user |
/subscriber/add-tags | Add multiple tags to a bot user |
/subscriber/add-tag-by-name | Add a tag by name to a bot user |
/subscriber/add-tags-by-name | Add multiple tags by names to a bot user |
/subscriber/remove-tag | Remove a tag from a bot user |
/subscriber/remove-tags | Remove multiple tags from bot user |
/subscriber/remove-tag-by-name | Remove a tag by name from a bot user |
/subscriber/remove-tags-by-name | Remove multiples tags by names from a bot user |
/subscriber/set-user-field | Update a userfield for a bot user |
/subscriber/set-user-fields | Update multiple user fields for a bot user |
/subscriber/set-user-field-by-name | Update a user field by name for a bot user |
/subscriber/set-user-fields-by-name | Update multiple user fields by name for a bot user |
/subscriber/clear-user-field | Clear a userfield for a bot user |
/subscriber/clear-user-fields | Clear multiple user fields for a bot user |
/subscriber/clear-user-field-by-name | Clear user field by name for a bot user |
/subscriber/clear-user-fields-by-name | Clear multiple user fields by name for a bot user |
/subscriber/pause-bot | Pauses automation for a bot user |
/subscriber/resume-bot | Resumes automation for a bot user |
/subscriber/move-chat-to | Changes the conversation status of a bot user (done, pending etc) |
/subscriber/assign-agent | Assigns an agent to the bot user |
/subscriber/unassign-agent | Removes an agent from a bot user |
/subscriber/log-custom-event | Logs a custom event for the bot user |
/subscriber/chat-messages | Fetches all chat messages for a bot user |
/subscriber/chat-messages-by-mids | Fetches all chat messages by mids for a bot user |
Sending | |
/subscriber/send-main-flow | Sends the main flow to a bot user |
/subscriber/send-sub-flow | Sends a subflow to a bot user |
/subscriber/send-sub-flow-by-flow-name | Sends a subflow by name to a bot user |
/subscriber/send-sub-flow-by-user-id | Sends a subflow to a bot user using their user ID |
/subscriber/broadcast | Sends a broadcast to bot users |
/subscriber/broadcast-by-user-id | Sends a broadcast by user IDs of bot user |
/subscriber/broadcast-by-tag | Sends a broadcast to all users with a specific tag |
/subscriber/broadcast-by-segment | Sends a broadcast to all users with a specific segment |
/subscriber/send-content | Sends content to a bot user |
/subscriber/send-text | Sends a text message to a bot user |
/subscriber/send-sms | Sends an SMS to a bot user |
/subscriber/send-node | Sends a node to a bot user |
/subscriber/send-whatsapp-template | Sends a whatsapp template to a bot user |
Mini Apps | |
/subscriber/app-trigger | Triggers an trigger action of a miniapp installed |
Ecommerce | |
/subscriber/cart | Fetches the cart of a bot user |
/subscriber/empty-cart | Clears the cart of a bot user |
/subscriber/add-to-cart | Adds a product to the cart of a bot user |
/subscriber/remove-from-cart | Removes a product from the cart of a bot user |
/subscriber/cart-paid | Marks the cart of a bot user paid |
/subscriber/update-order-status | Updates the order status of a bot user |
/shop/discount-codes | Fetches all discounts |
/shop/discount-codes/{codeId}/get-info | Fetches a specific discount |
/shop/discount-codes/get-info-by-code | Fetches a specific discount by code |
/shop/discount-codes/create | Create a new discount code |
/shop/discount-codes/{codeId}/update | Updates a discount code |
/shop/discount-codes/{codeId}/delete | Deletes a discount code |
/shop/discount-codes/delete-by-code | Deletes a discount code by code |
/shop/orders | Fetches all orders |
/shop/orders/{orderId}/get-info | Fetch a specific order |
/shop/products | Fetches all products |
/shop/products/{productId}/get-info | Fetches a specific product |
/shop/products/create | Creates a product |
/shop/products/{productId}/update | Updates a specific product |
/shop/products/{productId}/delete | Deletes a specific product |
/shop/product-tags | Fetches all product tags |
/shop/product-tags/{tagId}/get-info | Fetches a specific product tag |
/shop/product-tags/create | Creates a specific product tag |
/shop/product-types/{typeId}/update | Updates a product type |
/shop/product-types/{typeId}/delete | Deletes a product type |
/shop/product-vendors | Fetches all product vendors |
/shop/product-vendors/{vendorId}/get-info | Fetches a specific vendor |
/shop/product-vendors/create | Creates a vendor |
/shop/product-vendors/{vendorId}/update | Updates a specific vendor |
/shop/product-vendors/{vendorId}/delete | Deletes a specific vendor |
/shop/locations | Fetches all locations |
/shop/locations/{locationId}/get-info | Fetches a specific location |
/shop/locations/create | Creates a location |
/shop/locations/{locationId}/update | Updates a location |
/shop/locations/{locationId}/delete | Deletes a specific location |
/shop/products/{productId}/variants | Fetches variants of a specific product |
/shop/products/{productId}/variants/{variantId}/get-info | Fetches a specific variant of a specific product |
/shop/products/{productId}/variants/{variantId}/update | Updates a specific variant of a specific product |
/shop/products/{productId}/variants/{variantId}/delete | Deletes a specific variant of a specific product |
Templates | |
/templates | Fetches all flow templates |
/template/{templateNs}/generate-one-time-link | Generate one time link for a template |
Team Label | |
/team/labels | Fetches all labels |
/flow/create-label | Creates a new label |
/team/delete-label | Deletes an existing label |
/team/delete-label-by-name | Deletes an existing label by name |
Integration | |
/integration/shopify | Fetch, Set, or Delete a shopify integration |
/integration/woocommerce | Fetch, Set or Delete a woocommerce integration |
/integration/openai | Fetch, Set or Delete an OpenAI integration |
/integration/s3storage | Fetch, Set or Delete a S3 Storage integration |
Open AI | |
/openai-embeddings | Fetches all embeddings |
/openai-embeddings/{id}/get-info | Fetching a specific embedding |
/openai-embeddings/create | Creates a new embedding |
/openai-embeddings/{id}/update | Updates a new embedding |
/openai-embeddings/{id}/delete | Deletes an existing embedding |
/openai-embeddings/import | Import Embeddings |
/openai-embeddings/generate | Generate Embeddings |
Workspace | |
/flow-summary | Fetches the summary of flows (users, analytics) |
/flow-agent-summary | Fetches agents summary (analytics) |
/team-bot-users | Fetches bot users irrespective of the bot in the workspace |
/team-flows | Get a list of bots in the workspace |
/team-members | Get a list of members in the workspace |
User | |
/me | Get the current user that generated the token |
Limits
The api has limits of 1000 api calls per hour
Add Comment