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

# Leave workspace

> Removes you from a workspace.

You can leave any workspace you're a member of — except one you own. Owners have to either delete the workspace (`DELETE /workspaces/:id`) or transfer ownership first (currently dashboard-only).



## OpenAPI

````yaml /openapi.json post /workspaces/{workspaceId}/leave
openapi: 3.0.0
info:
  title: Postbreeze API
  description: >-
    Public REST API for scheduling and managing social posts. Authenticate every
    request with `Authorization: Bearer pb_live_…`. All endpoints are scoped to
    a single workspace; an API key issued for workspace A cannot access
    workspace B.
  version: 1.0.0
  contact: {}
servers:
  - url: http://localhost:4100/api/v1
security:
  - bearer: []
tags: []
paths:
  /workspaces/{workspaceId}/leave:
    post:
      tags:
        - Workspaces
      summary: Leave workspace
      description: >-
        Removes you from a workspace.


        You can leave any workspace you're a member of — except one you own.
        Owners have to either delete the workspace (`DELETE /workspaces/:id`) or
        transfer ownership first (currently dashboard-only).
      operationId: WorkspacesController_leave
      parameters:
        - name: workspaceId
          required: true
          in: path
          description: Prefixed cuid of the workspace to leave.
          schema:
            example: ws_01HZX5T2K9Q3RB6N6JZP3RYV0M
            type: string
      responses:
        '201':
          description: Membership removed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  workspaceId:
                    type: string
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 400
                  code:
                    type: string
                    example: VALIDATION_FAILED
                  message:
                    type: string
                  requestId:
                    type: string
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 401
                  message:
                    type: string
                    example: Unauthorized
                  requestId:
                    type: string
        '403':
          description: Workspace owners cannot leave their own workspace.
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: API key
      type: http
      description: Your Postbreeze API key

````