> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcargo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update chat

> Update a chat session



## OpenAPI

````yaml https://api.getcargo.io/openapi.json put /ai/chats/{uuid}
openapi: 3.1.0
info:
  title: Cargo API
  version: 1.0.0
  description: Cargo Platform API v1
servers:
  - url: https://api.getcargo.io/v1
    description: Cargo API
security:
  - bearerAuth: []
paths:
  /ai/chats/{uuid}:
    put:
      tags:
        - AI - Chats
      summary: Update chat
      description: Update a chat session
      parameters:
        - in: path
          name: uuid
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
            title: UUID
            description: Chat identifier.
          required: true
          description: Chat identifier.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  anyOf:
                    - type: string
                    - type: 'null'
                  title: Name
                  description: Chat name.
              additionalProperties: false
              title: Request body
              description: Request body schema.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  chat:
                    type: object
                    properties:
                      uuid:
                        type: string
                      slug:
                        type: string
                      workspaceUuid:
                        type: string
                      userUuid:
                        anyOf:
                          - type: string
                          - type: 'null'
                      agentUuid:
                        anyOf:
                          - type: string
                          - type: 'null'
                      releaseUuid:
                        anyOf:
                          - type: string
                          - type: 'null'
                      name:
                        anyOf:
                          - type: string
                          - type: 'null'
                      trigger: {}
                      heartbeat:
                        anyOf:
                          - type: object
                            properties:
                              intervalMinutes:
                                type: integer
                                exclusiveMinimum: 0
                                maximum: 9007199254740991
                              maxMessages:
                                type: integer
                                exclusiveMinimum: 0
                                maximum: 9007199254740991
                              prompt:
                                anyOf:
                                  - type: string
                                    minLength: 1
                                  - type: 'null'
                            required:
                              - intervalMinutes
                              - maxMessages
                              - prompt
                            additionalProperties: false
                          - type: 'null'
                      evaluator:
                        anyOf:
                          - type: object
                            properties:
                              rubric:
                                type: string
                                minLength: 1
                              threshold:
                                type: number
                                minimum: 0
                                maximum: 1
                            required:
                              - rubric
                              - threshold
                            additionalProperties: false
                          - type: 'null'
                      activeStreamUuid:
                        anyOf:
                          - type: string
                          - type: 'null'
                      creditsUsedCount:
                        type: number
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                      deletedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                      lastMessage:
                        anyOf:
                          - type: object
                            properties:
                              uuid:
                                type: string
                              workspaceUuid:
                                type: string
                              agentUuid:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              releaseUuid:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              chatUuid:
                                type: string
                              userUuid:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              status:
                                type: string
                                enum:
                                  - pending
                                  - generating
                                  - success
                                  - error
                                  - cancelling
                                  - cancelled
                              errorMessage:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              type:
                                type: string
                                enum:
                                  - user
                                  - assistant
                              createdAt:
                                type: string
                              updatedAt:
                                type: string
                              finishedAt:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              deletedAt:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                            required:
                              - uuid
                              - workspaceUuid
                              - agentUuid
                              - releaseUuid
                              - chatUuid
                              - userUuid
                              - status
                              - errorMessage
                              - type
                              - createdAt
                              - updatedAt
                              - finishedAt
                              - deletedAt
                            additionalProperties: false
                          - type: 'null'
                    required:
                      - uuid
                      - slug
                      - workspaceUuid
                      - userUuid
                      - agentUuid
                      - releaseUuid
                      - name
                      - trigger
                      - heartbeat
                      - evaluator
                      - activeStreamUuid
                      - creditsUsedCount
                      - createdAt
                      - updatedAt
                      - deletedAt
                      - lastMessage
                    additionalProperties: false
                    title: Chat
                    description: Updated chat details.
                required:
                  - chat
                additionalProperties: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````