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

# Update Workspace

> Update workspace name or icon. Requires `workspaces-write`.

# Update Workspace

Rename a workspace or change its icon.

## Authentication & Scope

Requires the `workspaces-write` ability. The authenticated user must be an **admin** of the workspace.

## Request

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

### Path Parameters

| Parameter   | Type   | Description                          |
| ----------- | ------ | ------------------------------------ |
| workspaceId | number | Numeric identifier of the workspace. |

### Body Parameters

| Field | Type   | Required | Description                            |
| ----- | ------ | -------- | -------------------------------------- |
| name  | string | Yes      | New name of the workspace.             |
| emoji | string | No       | New emoji/icon (leave blank to clear). |

Example:

```json theme={null}
{
  "name": "Marketing Team",
  "emoji": "🚀"
}
```

## Response

`200 OK` – Returns a confirmation plus the updated workspace object.

```json theme={null}
{
  "message": "Workspace updated.",
  "workspace": {
    "id": 1,
    "name": "Marketing Team",
    "icon": "🚀",
    "max_file_size": 25,
    "is_readonly": false
  }
}
```

`403 Forbidden` – Token lacks `workspaces-write` or user lacks permission.


## OpenAPI

````yaml put /open/workspaces/{workspaceId}
openapi: 3.0.1
info:
  title: OpnForm API
  description: API for interacting with OpnForm, primarily used for Zapier integration
  version: 1.0.0
servers:
  - url: https://api.opnform.com
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: Create and manage workspaces.
  - name: Workspace Users
    description: Manage users within a workspace.
  - name: Forms
    description: Manage and retrieve forms.
  - name: Submissions
    description: Access and manage form submissions.
  - name: Integrations
    description: Manage form integrations (webhooks) via API.
  - name: Zapier
    description: Legacy endpoints for the Zapier integration.
paths:
  /open/workspaces/{workspaceId}:
    put:
      tags:
        - Workspaces
      summary: Update Workspace
      description: Update workspace name or icon. Requires `workspaces-write`.
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Workspace'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
        '403':
          description: Forbidden
      security:
        - bearerAuth: []
components:
  schemas:
    Workspace:
      type: object
      properties:
        id:
          type: number
          description: The unique identifier for the workspace.
          example: 1
          readOnly: true
        name:
          type: string
          description: The name of the workspace.
          example: My Marketing Team
        icon:
          type: string
          description: The emoji or icon representing the workspace.
          example: 🚀
        settings:
          type: object
          description: General settings for the workspace.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Personal Access Token
      x-bearer-scopemap:
        workspaces-read: Read access to workspaces
        workspaces-write: Write access to workspaces
        workspace-users-read: Read access to workspace users
        workspace-users-write: Write access to workspace users
        forms-read: Read access to forms
        forms-write: Write access to forms
        manage-integrations: Manage form integrations (webhooks)

````