---
title: "Update copilot chat metadata"
method: PATCH
path: "/api/copilot/chats/{chatId}"
tags: ["Copilot"]
---

# Update copilot chat metadata

`PATCH /api/copilot/chats/{chatId}`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/copilot/chats/{chatId}`
- Auth: API key in cookie `luca.session_token`

Renames a chat. The transcript itself lives in the chat's Durable Object, not here.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Path parameters

- `chatId` string, uuid, required

## Headers

- `Luca-API-Version` '1'

## Request body

- CopilotChatPatch
  - `title` string, required

## Response `200`

ok

- CopilotChat
  - `id` string, uuid, required
  - `title` string, required
  - `scopeType` 'global' | 'lead' | 'campaign' | 'analytics', required
  - `scopeId` string, required
  - `doId` string, required
  - `lastActiveAt` string, required
  - `createdAt` string, required

## Other responses

- `400`: bad request
- `401`: unauthorized
- `404`: not found
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
