Update a conversation
const url = 'https://chat.work.optidata.cloud/api/chats/36';const form = new FormData();form.append('name', 'example');form.append('description', 'example');form.append('icon', 'file');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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=@fileRenames 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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Numeric id of the conversation.
Request Bodyrequired
Section titled “Request Bodyrequired”object
New icon. Requires a multipart/form-data request.
object
New icon. Requires a multipart/form-data request.
Examplegenerated
{ "name": "example", "description": "example", "icon": "binary"}Responses
Section titled “ Responses ”The conversation was updated.
Minimal acknowledgement returned by several write operations.
object
Example
{ "success": true}Missing, malformed or expired authentication key.
Authentication failures — and a few permission denials — use an error
key rather than message.
object
Examples
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.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "This action is unauthorized."}The resource does not exist, or does not belong to the given conversation.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "No query results for model [App\\Models\\Chat\\Chat] 99999999"}The request body or query string failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The content field is required.", "errors": { "content": [ "The content field is required." ] }}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}