2025.36 Public API / SDK Changes — Unique AI Documentation

2025.36 Public API / SDK Changes

Public API

New Endpoints

techPATCH Update a File - API to update a file.

Currently, the following updates are supported:

Body

Example

curl --location --request PATCH 'https://api.uat1.unique.app/public/chat/content/cont_qbkb7pjbo9utjowjyv3qej2z' \
--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 '{
    "title": "research.pdf",
    "ownerId": "scope_kgx251ererfrrm8u56ct91"
}'

techDELETE Delete a File - API to delete a file. If the file is part of a chat, the chatId also needs do be set.

Query params:

Example

curl --location --request DELETE 'https://api.uat1.unique.app/public/chat/content/cont_rhm1a82w3cy3lcjap8c14kp3?chatId=chat_yb4pmz6jfnzdzxb9raw90me0' \
--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'

techDELETE Delete a Folder - API to delete a folder. If the folder is not empty or if the user has no WRITE access, the delete will fail.

If recursive is set to true, the endpoint also deletes its subfolders and its contents, behaving exactly like the rm -rf. In case a subfolder has no write access, that folder is considered as failed to delete and the deletion continues with the other subfolders. At the end, the endpoint returns a list of successFolders and failedFolders.

Query params:

Example

curl --location --request DELETE 'https://api.uat1.unique.app/public/chat/folder/scope_rhm1a82w3cy3lcjap8c14kp3?recursive=true' \
--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'

SDK

tech Update a File (Compatible with release >.36) - Update a file specified by its contentId.

Currently, the following updates are supported:

Example

Move a file to a folder and update its title.

py

unique_sdk.Content.update(
    user_id=user_id,
    company_id=company_id,
    contentId="cont_ok2343q5owbce80w78hudawu5",
    ownerId="scope_e68yz5asho7glfh7c7d041el",
    title="Review.txt"
)

tech Delete a File (Compatible with release >.36) - Delete a file by its contentId. When deleting by id, if the file is part of a chat, the chatId also needs do be set. If both contentId and filePath are provided, filePath is ignored.

Example

Delete a file from a chat.

py

unique_sdk.Content.delete(
    user_id=user_id,
    company_id=company_id,
    contentId="cont_ok2343q5owbce80w78hudawu5",
    chatId="chat_v3xfa7liv876h89vuiibus1"
)

tech Delete a Folder(Compatible with release >.36) - Given a scopeId or folderPath, the function deletes the folder. If the folder is not empty or if the user has no WRITE access, the delete will fail.

If recursive is set to true, the function also deletes its subfolders and its contents, behaving exactly like the rm -rf. In case a subfolder has no write access, that folder is considered as failed to delete and the function continues with the other subfolders. At the end, the function returns a list of successFolders and failedFolders.

Example

Delete recursively by scope id:

py

unique_sdk.Folder.delete(
   user_id=user_id,
   company_id=company_id,
   scopeId="scope_w78wfn114va9o22s13r03yq",
   recursive=True
)

Delete by path (non-recursive):

py

unique_sdk.Folder.delete(
   user_id=user_id,
   company_id=company_id,
   folderPath="/Company/Atlas/Due Dilligence/Arch",
)

Check out Unique SDK on PyPI: https://pypi.org/project/unique_sdk/ .

| Author | |