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

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

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

Request Body

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

Request Body

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

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

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

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>",
)