Unique API Documentation
2 min read
Overview
We provide interactive API documentation that allows you to explore all available endpoints of the Unique 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 Unique API URL.
https://api.<your-suffix>.unique.app/public/swagger
Examples:
https://gateway.unique.app/public/swaggerhttps://gateway.us.unique.app/public/swagger
For the new Unique API, the Swagger URL is different:
https://api.<your-suffix>.unique.app/unique-api/swagger
This URL will be accessible during the migration period. You can compare the 2 API versions by checking the two different Swagger URLs. Authentication works the same for both.
Authentication
To use the Unique API, you need to authenticate with a Personal API Key and provide identifying headers.
Generate a Personal API Key
Check the Personal API Key documentation to find out more about how to create a 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 |
Test 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 old 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.
The new API version is 2026-03-01. By specifying this version you opt in ot use the new version of the API. If the new version has been rolled out on your tenant, the new API will be used by default, no need to change the version. Read more here.