2025.52 Public API / SDK Changes — Unique AI Documentation
2025.52 Public API / SDK Changes
Public API
New Endpoints
tech POST Create Space - API to create a new space (assistant).
Body
name(required) - The name of the spacefallbackModule(required) - The fallback module name (must match one of the module names)modules(required) - List of modules to create for the spacename(required) - The name of the moduledescription(optional) - The description of the moduleweight(optional) - The weight/priority of the moduleisExternal(optional) - Whether the module is externalisCustomInstructionEnabled(optional) - Whether custom instruction is enabledconfiguration(optional) - Configuration for the moduletoolDefinition(optional) - Tool definition for the moduleexplanation(optional) - Description of the spacealert(optional) - Alert message for the spacechatUpload(optional) - Chat upload setting (ENABLED|DISABLED)languageModel(optional) - Language model to useisExternal(optional) - Whether the space is externalisPinned(optional) - Whether the space is pinneduiType(optional) - UI type (MAGIC_TABLE|UNIQUE_CUSTOM|TRANSLATION|UNIQUE_AI)settings(optional) - Space settings
Example
curl --location --request POST 'https://api.uat1.unique.app/v1/space' \
--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' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Customer Support Assistant",
"fallbackModule": "UniqueAi",
"modules": [\
{\
"name": "UniqueAi",\
"weight": 10000\
}\
]
}'
tech GET Get Space Access - API to retrieve access entries for a space. Requires manage access to the space.
Path Params
spaceId(required) - The ID of the space
Example
curl --location --request GET 'https://api.uat1.unique.app/v1/space/<space-id>/access' \
--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' \
--header 'Content-Type: application/json'
tech POST Add Space Access - API to add access entries to a space. Requires manage access to the space.
Path Params
spaceId(required) - The ID of the space
Request Body
accessIds(required) - List of access entries to addentityId(required) - The ID of the entity (user or group)entityType(required) - The type of entity (USER|GROUP)type(required) - The type of access (USE|MANAGE|UPLOAD)
Example
curl --location --request POST 'https://api.uat1.unique.app/v1/space/<space-id>/access' \
--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' \
--header 'Content-Type: application/json' \
--data-raw '{
"accessIds": [\
{\
"entityId": "228959553377538182",\
"entityType": "USER",\
"type": "USE"\
}\
]
}'
tech DELETE Delete Space Access - API to remove access entries from a space. Requires manage access to the space.
Path Params
spaceId(required) - The ID of the space
Request Body
accessIds(required) - List of access entry IDs to delete
Example
curl --location --request DELETE 'https://api.uat1.unique.app/v1/space/<space-id>/access' \
--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' \
--header 'Content-Type: application/json' \
--data-raw '{
"accessIds": ["access_yptvsdq8sqjfsxe1ih0mnug7"]
}'
tech GET Get User Groups - API to retrieve groups that a specific user belongs to.
Path Params
userId(required) - The ID of the user
Example
curl --location --request GET 'https://api.uat1.unique.app/v1/users/<user-id>/groups' \
--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' \
--header 'Content-Type: application/json'
Updated Endpoints
tech GET Get Users - Added support for filtering users by userName.
Query Params
skip(optional) - Number of records to skip for pagination (minimum: 0)take(optional) - Number of records to retrieve (minimum: 1, maximum: 1000)email(optional) - Filter users by email addressdisplayName(optional) - Filter users by display nameuserName(optional) - Filter users by user name (new)
Example
curl --location --request GET 'https://api.uat1.unique.app/v1/users?skip=0&take=100&userName=john.doe' \
--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' \
--header 'Content-Type: application/json'
tech POST Content Upsert - Added support for hideInChat in ingestionConfig to control content visibility in chat.
Request Body
input.ingestionConfig.hideInChat(optional) - Boolean flag to hide content from chat view. When set totrue, the content will be filtered out when retrieving content for a chat. Defaults tofalse.
Example
curl --location --request POST 'https://api.uat1.unique.app/v1/content/upsert' \
--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' \
--header 'Content-Type: application/json' \
--data-raw '{
"input": {
"key": "document-key",
"title": "My Document",
"mimeType": "application/pdf",
"ingestionConfig": {
"hideInChat": true
}
},
"chatId": "<chat-id>"
}'
SDK
New Functions
tech Create Space - Create a new space (assistant) with specified configuration including modules, name, and settings.
Example
space = unique_sdk.Space.create_space(
user_id=user_id,
company_id=company_id,
name="Customer Support Assistant",
fallbackModule="UniqueAi",
modules=[\
{\
"name": "UniqueAi",\
"weight": 10000,\
"description": "Main AI module for customer support",\
"isExternal": False,\
"isCustomInstructionEnabled": True,\
"configuration": {},\
"toolDefinition": None,\
}\
],
explanation="AI assistant for handling customer inquiries",
alert="Please note: This assistant may not have access to real-time data",
chatUpload="ENABLED",
languageModel="GPT-4o",
isExternal=False,
isPinned=True,
uiType="UNIQUE_AI",
)
tech Get Space Access - Retrieve access entries for a space. Requires manage access to the space.
Example
access = unique_sdk.Space.get_space_access(
user_id=user_id,
company_id=company_id,
space_id="assistant_hjcdga64bkcjnhu4",
)
tech Add Space Access - Add access entries (users or groups) to a space with USE, MANAGE, or UPLOAD permissions.
Example
result = unique_sdk.Space.add_space_access(
user_id=user_id,
company_id=company_id,
space_id="assistant_hjcdga64bkcjnhu4",
accessIds=[{"entityId": "228959553377538182", "entityType": "USER", "type": "USE"}]
)
tech Delete Space Access- Remove access entries from a space by access entry IDs.
Example
result = unique_sdk.Space.delete_space_access(
user_id=user_id,
company_id=company_id,
space_id="assistant_hjcdga64bkcjnhu4",
accessIds=["access_yptvsdq8sqjfsxe1ih0mnug7"]
)
tech Get User Groups - Retrieve all groups that a specific user belongs to.
Example
user_groups = unique_sdk.User.get_user_groups(
user_id=user_id,
company_id=company_id,
target_user_id="351283829975023795",
)
Updated Functions
tech Get Users - Added userName filter to search users by username.
Example
users = unique_sdk.User.get_users(
user_id=user_id,
company_id=company_id,
userName="john.doe",
)
tech Content Upsert - Added hideInChat parameter in ingestionConfig to control content visibility in chat.
Example
content = unique_sdk.Content.upsert(
user_id=user_id,
company_id=company_id,
input={
"key": "document-key",
"title": "My Document",
"mimeType": "application/pdf",
"ingestionConfig": {
"hideInChat": True
}
},
chatId="<chat-id>",
)