2025.42 Public API / SDK Changes

3 min read

Public API

New Features

tech [experimental] Enable OpenAI V1 endpoint - OpenAI V1 endpoints can now be enabled for experimental purposes. This allows developers to develop using the latest features of OpenAI, read more about it here. To start using V1 endpoints the feature flag FEATURE_FLAG_USE_OPENAI_V1_13819 must be enabled.

New Endpoints

tech POST Create Message Log - Updating the steps section of a message in the chat UI is possible by creating a message log record during a message execution.

image-20251014-132611.png

A view of the updated steps

curl --request POST \
  --url https://api.uat1.unique.app/public/chat/message-log \
  --header 'Authorization: Bearer <api-key>' \
  --header 'content-type: application/json' \
  --header 'x-api-version: 2023-12-06' \
  --header 'x-app-id: <app-id>' \
  --header 'x-company-id: <company-id>' \
  --header 'x-user-id: <user-id>' \
  --data '{
  "messageId": "msg_eqd9xn...9jd0tyyw01",
  "text": "**Title appears in bold text** This is rendered has the body",
  "status": "COMPLETED",
  "order": 0 // Order of this message. It should go from 0 to N
}'

tech PATCH Update Message Log - Updating a message log.

curl --request PATCH \
  --url https://api.uat1.unique.app/public/chat/message-log/message_log_nqn1bgeefrlobnxdx91qkq7pog \
  --header 'Authorization: Bearer <api-key>' \
  --header 'content-type: application/json' \
  --header 'x-api-version: 2023-12-06' \
  --header 'x-app-id: <app-id>' \
  --header 'x-company-id: <company-id>' \
  --header 'x-user-id: <user-id>' \
  --data '{
  "messageId": "msg_eqd9xnedef9jd0tyyw01",
  "text": "**Title appears in bold text** This is rendered has the body",
  "status": "COMPLETED",
  "order": 0 // Order of this message. It should go from 0 to N
}'

tech POST Create Message Execution - Create a message execution.

curl --location 'https://api.uat1.unique.app/public/chat/message-execution/' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'content-type: application/json' \
  --header 'x-api-version: 2023-12-06' \
  --header 'x-app-id: <app-id>' \
  --header 'x-company-id: <company-id>' \
  --header 'x-user-id: <user-id>' \
  --data '{
  "messageId": "msg_eqd9xnedef9jd0tyyw01",
  "chatId": "chat_ie9m7oneexedemauxq4m69fp4", # NOTE: support for this param has been removed starting release .44
  "type": "DEEP_RESEARCH",
}'

tech PATCH Update Message Execution - Update a message execution.

curl --location --request PATCH 'https://api.uat1.unique.app/public/chat/message-execution' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'content-type: application/json' \
  --header 'x-api-version: 2023-12-06' \
  --header 'x-app-id: <app-id>' \
  --header 'x-company-id: <company-id>' \
  --header 'x-user-id: <user-id>' \
  --data '{
  "messageId": "msg_eqd9xnedef9jd0tyyw01",
  "status": "COMPLETED",
  "secondsRemaining": 30,
  "percentageCompleted": 10
}'

tech GET Get Message Execution - Get a message execution.

curl --location 'https://api.uat1.unique.app/public/chat/message-execution?messageId=msg_y9xkuk7otengdz40jueq2wyz' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'content-type: application/json' \
  --header 'x-api-version: 2023-12-06' \
  --header 'x-app-id: <app-id>' \
  --header 'x-company-id: <company-id>' \
  --header 'x-user-id: <user-id>' \
  --data ''\

tech POST Create Message Update Event - Updating the text of a message in the chat UI is possible by creating a message update event. This API can be used for custom streaming to the chat.

The event only changes the text in the UI, it does not update the database.

Example

curl --location --request POST 'https://api.uat1.unique.app/public/chat/messages/msg_d5vi7cb2ij0d5ub0317c7bb5/event' \
--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 '{
    "chatId": "chat_ajkhjhrfjlrknrvrg",
    "text": "Text to stream",
    "originalText": "Original text to stream",
    "references": [],
    "gptRequest": {},
    "debugInfo": {}
}'

SDK

tech Create Message Log - Function to update the steps section of a message in the chat UI. This is possible by creating a message log record during a message execution.

py
msg_log = unique_sdk.MessageLog.create(
    user_id=user_id,
    company_id=company_id,
    messageId="msg_a0jgnt1jrqv1d3uzr450waxw",
    text="Create message log text",
    order=1,
    status="RUNNING",                             # one of "RUNNING", "COMPLETED", "FAILED"
    details={},                                   # NOTE: optional starting release .44, details dictionary
    uncitedReferences={},                         # NOTE: optional starting release .44, references dictionary
    references=[],                                # optional, list of references
)

tech Update Message Log - Function to update a message log.

Example

py
msg_log = unique_sdk.MessageLog.update(
    user_id=user_id,
    company_id=company_id,
    message_log_id="message_log_fd7z7gjljo1z2wu5g6l9q7r9",
    text="Update a message log text",               # optional
    order=1,                                        # optional
    status="RUNNING",                               # NOTE: optional starting release .44, one of "RUNNING", "COMPLETED", "FAILED"  # NOTE: this param is optional starting .44
    details={},                                     # NOTE: optional starting release .44, details dictionary
    uncitedReferences={},                           # NOTE: optional starting release .44, references dictionary
    references=[],                                  # optional, list of references
)

tech Create Message Execution - Create a message execution for a provided messageId and chatId.

Example

py
msg_execution = unique_sdk.MessageExecution.create(
    user_id=user_id,
    company_id=company_id,
    messageId="msg_a0jgnt1jrqv143uzr750waxw",
    chatId="chat_nx21havszl1skchd7544oykh",
    type="DEEP_RESEARCH",
    secondsRemaining=None,                       # NOTE: support for this param has been removed starting release .44
    percentageCompleted=None,                    # NOTE: support for this param has been removed starting release .44
)

tech Get Message Execution - Get a message execution for a provided messageId.

Example

py
msg_execution = unique_sdk.MessageExecution.get(
    user_id=user_id,
    company_id=company_id,
    messageId="msg_a0jgnt1jrqv143uzr750waxw",
)

tech Update Message Execution - Update a message execution for a provided messageId.

Example

py
msg_execution = unique_sdk.MessageExecution.update(
    user_id=user_id,
    company_id=company_id,
    messageId="msg_a0jgnt1jrqv143uzr750waxw",
    status="COMPLETED",                        # NOTE: optional starting release .44, one of: COMPLETED, FAILED
    secondsRemaining=55,                       # optional, number defining the seconds remaining
    percentageCompleted=10,                    # optional, number defining the percentage completed
)

tech Create Message Update Event - Function to create a new message event in a chat. Updating the text of a message in the chat UI is possible by creating a message update event. This function can be used for custom streaming to the chat.

The event only changes the text in the UI, it does not update the database.

Example

py
message = unique_sdk.Message.create_event(
    user_id=user_id,
    company_id=company_id,
    messageId="msg_l4ushn85yqbewpf6tllh2cl7",
    chatId="chat_kc8p3kgkn7393qhgmv5js5nt",
    text="Hello.",                  #optional
    originalText="Hello.",          #optional
    references=[],                  #optional
    gptRequest={}                   #optional
    debugInfo={  "hello": "test" }, #optional
)

Author

Last updated