Skip to content

Update a conversation

POST
/chats/{chat}
curl --request POST \
--url https://chat.work.optidata.cloud/api/chats/36 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form name=example \
--form description=example \
--form icon=@file

Renames a group, rewrites its description, and optionally replaces its icon. name and description are both required — send the current value for the one you are not changing.

Send the body as multipart/form-data when it carries an icon. Every change posts a system message into the conversation.

chat
required
integer format: int64

Numeric id of the conversation.

object
name
required
string
<= 100 characters
description
required
string
<= 1000 characters
icon

New icon. Requires a multipart/form-data request.

string format: binary

The conversation was updated.

Media typeapplication/json

Minimal acknowledgement returned by several write operations.

object
success
required
boolean
Example
{
"success": true
}

Missing, malformed or expired authentication key.

Media typeapplication/json

Authentication failures — and a few permission denials — use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The caller is not a participant of the conversation, or lacks the role the operation requires.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Exampledenied
{
"message": "This action is unauthorized."
}

The resource does not exist, or does not belong to the given conversation.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplemissing
{
"message": "No query results for model [App\\Models\\Chat\\Chat] 99999999"
}

The request body or query string failed validation.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Validation messages keyed by field name.

object
key
additional properties
Array<string>
Examples
Exampleinvalid
{
"message": "The content field is required.",
"errors": {
"content": [
"The content field is required."
]
}
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}