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

# Update Workspace

> Update a workspace's name or icon.

## Authentication & Scope

Requires the `workspaces-write` ability.

## Request

```http theme={null}
PUT /workspaces/1 HTTP/1.1
Host: api.raydocs.com
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "Updated Name",
  "icon": "📈"
}
```

### Path Parameters

| Parameter     | Type    | Required | Description      |
| ------------- | ------- | -------- | ---------------- |
| `workspaceId` | integer | Yes      | The workspace ID |

### Body Parameters

| Parameter | Type   | Required | Description                |
| --------- | ------ | -------- | -------------------------- |
| `name`    | string | No       | New name for the workspace |
| `icon`    | string | No       | New emoji or icon          |

## Response

`200 OK` – The updated workspace.

```json theme={null}
{
  "id": 1,
  "name": "Updated Name",
  "icon": "📈",
  "settings": {},
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-16T09:00:00Z"
}
```

`404 Not Found` – Workspace does not exist or you don't have access.


## OpenAPI

````yaml put /workspaces/{workspaceId}
openapi: 3.0.1
info:
  title: Raydocs API
  description: REST API for document extraction with AI-powered data parsing
  version: 1.0.0
servers:
  - url: https://api.raydocs.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Extraction Templates
    description: Define extraction schemas and settings.
  - name: Extraction Sessions
    description: Manage extraction jobs and documents.
  - name: Batch Operations
    description: Bulk operations on sessions.
  - name: Documents
    description: Upload and manage source documents.
  - name: Workflows
    description: Discover workflow runs and read their public outputs.
  - name: Results
    description: Access extraction results.
paths:
  /workspaces/{workspaceId}:
    put:
      tags:
        - Workspaces
      summary: Update Workspace
      description: Update workspace name or icon. Requires `workspaces-write`.
      operationId: updateWorkspace
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                icon:
                  type: string
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
        '403':
          description: Forbidden
components:
  schemas:
    Workspace:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
        icon:
          type: string
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Personal Access Token created from the Raydocs dashboard.

        Include in the Authorization header: `Bearer <your_token>`

        See [API Keys](/api-reference/api-keys) for token creation and
        management.

````