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

# Update table

> Update the name, enhancement context, or schema of an existing table.

## Path parameters

<ParamField path="table_id" type="string" required>
  The unique identifier of the table.
</ParamField>

## Request body

All fields are optional. Only provided fields are updated.

<ParamField body="name" type="string">
  New name for the table.
</ParamField>

<ParamField body="enhancement_context" type="string">
  Updated context for AI enhancement operations.
</ParamField>

<ParamField body="schema_id" type="string">
  Assign a different schema to the table. The schema must belong to your company.
</ParamField>

## Response

Returns the full updated table object (same shape as [Get table](/api-reference/tables/get)).

<RequestExample>
  ```typescript TypeScript theme={null}
  const updated = await client.tables.update("tbl_abc123", {
    name: "Updated Catalog Name",
    enhancement_context: "Focus on technical specifications",
  });
  ```

  ```python Python theme={null}
  updated = client.tables.update(
      "tbl_abc123",
      name="Updated Catalog Name",
      enhancement_context="Focus on technical specifications",
  )
  ```

  ```bash cURL theme={null}
  curl -X PATCH "https://hub.banditshq.com/api/v1/tables/tbl_abc123" \
    -H "Authorization: Bearer lasso_..." \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Updated Catalog Name",
      "enhancement_context": "Focus on technical specifications"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "tbl_abc123",
    "name": "Q1 Product Catalog",
    "schema_id": "schema_xyz789",
    "status": "completed",
    "progress": 100,
    "total_rows": 42,
    "source_type": "files",
    "additional_context": null,
    "enhancement_context": "Focus on technical specifications",
    "error_message": null,
    "files": [
      { "name": "catalog.pdf", "path": "company_123/file_xyz/catalog.pdf", "size": 1048576 }
    ],
    "created_at": "2025-03-10T14:30:00.000Z",
    "updated_at": "2025-03-10T15:45:00.000Z"
  }
  ```
</ResponseExample>
