RecoupGet a Free AuditFree Audit

API REFERENCE

Update Chat

On this page
PATCH/api/chats

Update a chat room's topic (display name). The chatId is required; the topic field will be updated. Topic must be between 3 and 50 characters.

Authentication

See the authentication guide for API key and account access requirements.

Request

cURL
curl --request PATCH \
  --url 'https://api.recoupable.dev/api/chats' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "chatId": "YOUR_ID",
  "topic": "string"
}'

Request body required

Chat fields to update

application/json

chatIdstringrequired

The unique identifier (UUID) of the chat room to update

format: uuid

topicstringrequired

The new display name for the chat room. Must be between 3 and 50 characters.

minLength: 3 · maxLength: 50

Responses

200Chat updated successfully

application/json

statusstring · enumrequired

Status of the request

Values: "success"

chatobjectrequired

The updated chat room object

Properties for chat
idstringrequired

Chat id.

format: uuid

titlestringrequired

Display title for the chat.

accountIdstringrequired

Owning account for this chat.

format: uuid

sessionIdstringrequired

Session that owns this chat. Combine with id to build the chat URL: /sessions/{sessionId}/chats/{id}.

format: uuid

updatedAtstringrequired

ISO timestamp of the last update.

format: date-time

artistIdstringnullable

Artist account id this chat's session was created in the context of, or null when no artist was associated. Inherited from sessions.artist_id on the owning session.

format: uuid

400Bad request - invalid parameters or validation error

application/json

statusstring · enumrequired

Status of the request

Values: "error"

messagestringrequired

Error message describing what went wrong

401Unauthorized - invalid or missing API key

application/json

errorintegerrequired

format: int32

messagestringrequired
403Forbidden - API key does not have access to this chat

application/json

errorintegerrequired

format: int32

messagestringrequired
404Not found - chat room does not exist

application/json

statusstring · enumrequired

Status of the request

Values: "error"

messagestringrequired

Error message describing what went wrong

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download research.json
View operation source
json
{
  "description": "Update a chat room's topic (display name). The chatId is required; the topic field will be updated. Topic must be between 3 and 50 characters.",
  "requestBody": {
    "description": "Chat fields to update",
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/UpdateChatRequest"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Chat updated successfully",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/UpdateChatResponse"
          }
        }
      }
    },
    "400": {
      "description": "Bad request - invalid parameters or validation error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/UpdateChatErrorResponse"
          }
        }
      }
    },
    "401": {
      "description": "Unauthorized - invalid or missing API key",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Forbidden - API key does not have access to this chat",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Not found - chat room does not exist",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/UpdateChatErrorResponse"
          }
        }
      }
    }
  }
}