---
title: "Update ai chat"
method: PATCH
path: "/ai_chats/{id}"
tags: ["Ai chats"]
---

# Update ai chat

`PATCH /ai_chats/{id}`

Update an AI chat's title, notification preferences, or associated company context.

Required permissions:
 - `ai_chat:update`

## Path parameters

- `id` string, required

## Request body

- object — Parameters for UpdateAiChat
  - `current_company_id` string, nullable — The unique identifier of the company to set as context for the AI chat (e.g., "biz_XXXXX").
  - `notification_preference` 'all' | 'none' — The notification preference for an AI chat
  - `title` string, nullable — The new display title for the AI chat thread (e.g., "Help with billing").

## Response `200`

A successful response

- AiChat — An AI-powered chat conversation belonging to a user, with optional scheduled automation.
  - `blended_token_usage` string, required — The total number of tokens consumed across all messages in this conversation.
  - `created_at` string, date-time, required — The datetime the ai chat was created.
  - `id` string, required — The unique identifier for the ai chat.
  - `last_message_at` string, date-time, nullable, required — The timestamp of the most recent message in this conversation. Null if no messages have been sent yet.
  - `message_count` integer, required — The total number of messages exchanged in this conversation.
  - `notification_preference` 'all' | 'none', required — The notification preference for an AI chat
  - `title` string, nullable, required — A short descriptive title for this AI chat conversation. Null if no title has been set.
  - `updated_at` string, date-time, required — The datetime the ai chat was last updated.
  - `user` object, required — The user who owns this AI chat conversation.
    - `id` string, required — The unique identifier for the user.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `422` — Verification required
- `429` — Too many requests
- `500` — Internal server error

---

[API](https://skmtc.net/whop/apis/whop-api.md) · [All operations](https://skmtc.net/whop/apis/whop-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/whop/whop-api/versions/866821546d67/schema)
