Public API Documentation
2 min read
Overview
We provide interactive API documentation that allows you to explore all available endpoints of the Public API and try them out directly in your browser. This API is available for enterprise customers who have opted in to the feature.
What You Can Do
Explore Endpoints - Browse all available API operations
Try It Out - Execute API calls directly from the documentation
View Examples - See request and response payloads for each endpoint
Understand the Schema - Review all data models and their properties
How to Access
Open your backend host URL and add /public/swagger. This is the same URL as the Public URL.
Examples:
https://api.<your-suffix>.unique.app/public/swaggerhttps://gateway.unique.app/public/swaggerhttps://gateway.us.unique.app/public/swagger
Authentication
To use the Public API, you need to authenticate with a Personal API Key and provide identifying headers.
Generate a Personal API Key
Check the Public API documentation to find out more about how to create a Personal Key: Personal API Key .
Required Headers
All API requests require the following headers. All the header values can be retrieved as shown in the Personal API Key documentation.
Header | Description |
|---|---|
Api Key | Your Personal API Key |
App Id | Your Application ID |
User Id | Your user ID |
Company Id | Your company ID |
Api Version | The version of the API to be used - see API Version |
Try It Out in Swagger UI
To test the API using the Swagger documentation:
Open the Swagger UI at your environment's URL
Click the "Authorize" button at the top of the page
Fill in all 4 authentication values (as per the documentation above):
API Key - Enter your Personal API Key
Click "Authorize"
App Id - Enter your application ID
Click "Authorize"
User Id - Enter your user ID
Click "Authorize"
Company Id - Enter your company ID
Click "Authorize"
Click “x” to close the “Authorize” menu.
Navigate to the endpoint you want to test
Click "Try it out"
Fill in the required parameter values
Click "Execute" to send the request
Example request (curl)
curl --location --request GET 'https://<base-url>/public/chat/space/<space-id>' \
--header 'x-user-id: <user-id>' \
--header 'x-company-id: <company-id>' \
--header 'Authorization: Bearer <api-key>' \
--header 'x-app-id: <app-id>' \
--header 'x-api-version: 2023-12-06'API Version
The current API version is 2023-12-06. This needs to be passed via the x-api-version header otherwise calls to the API will result in a 404 - not found errors.