> ## 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.

# Leave Workspace

> Allows the current user to leave the workspace. Requires `workspace-users-write`.

# Leave Workspace

Remove **your own** user account from a workspace.

## Authentication & Scope

Requires the `workspace-users-write` ability. Only the authenticated user can leave; admins cannot use this endpoint to kick others (see [Remove Workspace User](./remove-workspace-user)).

## Request

```http theme={null}
POST /open/workspaces/{workspaceId}/leave HTTP/1.1
Host: api.opnform.com
Authorization: Bearer <token>
```

### Path Parameters

| Parameter   | Type   | Description                 |
| ----------- | ------ | --------------------------- |
| workspaceId | number | ID of the workspace to quit |

Request body is empty.

## Response

`204 No Content` – You successfully left the workspace.

`403 Forbidden` – Token lacks `workspace-users-write` or you aren't a member.


## OpenAPI

````yaml post /open/workspaces/{workspaceId}/leave
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}/leave:
    post:
      tags:
        - Workspace Users
      summary: Leave Workspace
      description: >-
        Allows the current user to leave the workspace. Requires
        `workspace-users-write`.
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Left workspace
        '403':
          description: Forbidden
      security:
        - bearerAuth: []
components:
  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)

````