# Rename thread div strong 🔨 In Development — This section is still being developed and may change. Update the display name of a thread with validation and authorization checks. Update the display name of a thread with validation and authorization checks. Provides a dedicated endpoint for thread renaming operations. #### Path Parameters **`thread_id`** string required The unique identifier of the thread to rename. #### Request Body **`title`** string required The new display name for the thread. Maximum 200 characters, cannot be empty. Request ```bash curl -X PUT "https://api.freddy.aitronos.com/v1/threads/thread_abc123/rename" \ -H "Authorization: Bearer $FREDDY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "Resolved Billing Issue - Invoice #INV-2025-001" }' ``` ```python import requests response = requests.put( "https://api.freddy.aitronos.com/v1/threads/thread_abc123/rename", headers={"Authorization": f"Bearer {api_key}"}, json={ "title": "Resolved Billing Issue - Invoice #INV-2025-001" } ) result = response.json() print(f"Thread renamed to: {result['newTitle']}") ``` ```javascript const response = await fetch('https://api.freddy.aitronos.com/v1/threads/thread_abc123/rename', { method: 'PUT', headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ title: 'Resolved Billing Issue - Invoice #INV-2025-001' }) }); const result = await response.json(); console.log(`Thread renamed to: ${result.newTitle}`); ``` ## Response 200 OK ```json { "success": true, "threadId": "thread_abc123", "newTitle": "Resolved Billing Issue - Invoice #INV-2025-001", "message": "Thread renamed successfully" } ``` Errors ```json 400 Bad Request { "error": { "message": "Title cannot be empty", "type": "invalid_request_error", "code": "empty_title", "param": "title" } } ``` ```json 404 Not Found { "error": { "message": "Thread not found or access denied", "type": "not_found_error", "code": "thread_not_found" } } ``` ```json 422 Validation Error { "error": { "message": "Title cannot exceed 200 characters", "type": "validation_error", "code": "title_too_long", "param": "title" } } ``` ## Related Resources - [Threads Overview](/docs/documentation/core-concepts/threads-overview) - [Generate AI Name](/docs/api-reference/threads/generate-name) - [Update Thread](/docs/api-reference/threads/update) - [Thread Context Modes](/docs/documentation/core-concepts/thread-context-modes)