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

# Update workspace

> **Plans:** `Free` · `Developer` · `Enterprise`

Updates workspace settings. Requires workspace **admin**. At least one of `name` or `timezone` is required (`timezone` may be `null` to clear). With an API key, `workspaceId` must match the key’s workspace.

**API credits:** 2 (write).



## OpenAPI

````yaml /openapi/openapi.json put /api/v1/workspaces/{workspaceId}
openapi: 3.1.0
info:
  title: Mermail API
  version: 1.0.0
  description: >
    Programmatic Mermail API for scripts, agents, and integrations.


    ## Authentication


    Authorize with an API key from **Settings → API Keys**:


    ```

    x-api-key: sk-proj-…

    ```


    ## Plans


    Each endpoint page shows plan badges (**Public**, **All plans**, or
    **Developer+**). Free can call the core catalog; Developer-gated paths need
    Developer or Enterprise.


    ## Try it


    Every endpoint page includes an interactive playground. Click **Try it**,
    paste your API key into the `x-api-key` field, fill path/query/body fields
    (prefilled from examples), and send a live request to
    `https://console.mermail.app`. You can also copy the generated cURL /
    JavaScript / Python snippet.


    ## Credits


    | Class | Cost |

    | --- | ---: |

    | read | 1 |

    | write | 2 |

    | email_send | 5 |

    | provision | 10 |

    | ai_light | 15 |

    | ai_heavy | 25 |
  contact:
    name: Mermail
    email: contact@mermail.app
    url: https://mermail.app
servers:
  - url: https://console.mermail.app
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Public
    description: No authentication
  - name: Usage
    description: Credits and email quotas
  - name: Workspaces
    description: Workspaces, members, storage
  - name: Domains
    description: Custom email domains (Developer+)
  - name: Mailboxes
    description: Agent inboxes
  - name: Emails
    description: Send, list, search, folders
  - name: AI agent
    description: Mailbox agent chat
  - name: Task triage
    description: Task triagers (all plans)
  - name: RAG
    description: Knowledge documents and recall
  - name: Integrations
    description: Composio, Telegram, push
  - name: Affiliate
    description: Affiliate program
paths:
  /api/v1/workspaces/{workspaceId}:
    put:
      tags:
        - Workspaces
      summary: Update workspace
      description: >-
        **Plans:** `Free` · `Developer` · `Enterprise`


        Updates workspace settings. Requires workspace **admin**. At least one
        of `name` or `timezone` is required (`timezone` may be `null` to clear).
        With an API key, `workspaceId` must match the key’s workspace.


        **API credits:** 2 (write).
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: Workspace id
          schema:
            type: string
          example: ws_01abc
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                  example: Acme Agents
                timezone:
                  type: string
                  nullable: true
                  example: America/New_York
                  description: IANA timezone, or null to clear
            example:
              name: Acme Agents
              timezone: America/New_York
      responses:
        '200':
          description: Updated workspace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Workspace'
              example:
                id: ws_01abc
                name: Acme Agents
                owner_address: '0xabc123def456'
                timezone: America/New_York
                role: admin
                mailbox_count: 2
                storage:
                  provider: harbor_r2
                  status: ready
                  redundancy_enabled: true
                  storage_key_status: ready
                  storage_key_last_error: null
                  space_id: spc_01xyz
                  bucket_id: bkt_01xyz
                  owner_address: '0xabc123def456'
                  has_api_key: true
                  has_service_private_key: true
                  harbor_provisioning_status: ready
                  harbor_last_error: null
                  r2_bucket_name: mermail-ws-01abc
                  r2_provisioning_status: ready
                  r2_last_error: null
                  last_error: null
                created_at: '2026-07-01T12:00:00.000Z'
                updated_at: '2026-07-15T08:00:00.000Z'
        '400':
          description: Validation error (missing fields or invalid timezone)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid timezone
        '401':
          description: Missing, invalid, expired, or revoked API key / token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Unauthorized
        '402':
          description: API credits exhausted for this workspace period
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Invalid request
        '403':
          description: Forbidden — plan gate, wrong workspace, or missing role
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Forbidden
        '429':
          description: Rate limit exceeded (workspace RPM or email send limits)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: Too many requests
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds until the rate limit window resets
      security:
        - apiKeyAuth: []
components:
  schemas:
    Workspace:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        owner_address:
          type: string
        timezone:
          type: string
          nullable: true
        role:
          type: string
          enum:
            - admin
            - member
        mailbox_count:
          type: integer
        storage:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Unauthorized
        code:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key (`sk-proj-…`) from Settings → API Keys. Required for sold API
        calls outside the Mermail console.

````