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

# leaveSpace

> Leave a Space in this Network as the signed-in member. The removal finishes in
the background. The only Host of a Space cannot leave it, a member cannot
leave a Space they are paying for until they cancel, and a Limited Member
cannot leave a Space while they hold an active paid subscription.

**Required scope:** `write:memberships`



**mutation** `leaveSpace(input: LeaveSpaceInput!): LeaveSpacePayload`

## Arguments

**`input`**: `LeaveSpaceInput!` (required)

Parameters for LeaveSpace

## Returns

`LeaveSpacePayload`

**`clientMutationId`**: `String`

A unique identifier for the client performing the mutation.

---

**`errors`**: `[String!]!`

---

**`outcome`**: `MembershipOutcome`

---

**`space`**: `Space`

## Examples

```graphql Mutation
mutation LeaveSpace($input: LeaveSpaceInput!) {
  leaveSpace(input: $input) {
    clientMutationId
    errors
    outcome
    space {
      archived
      avatarDarkModeUrl
      avatarUrl
      bookmarkedAt
      brandingImages {
        imageType
        url
      }
      createdAt
    }
  }
}
```

```json Variables
{
  "input": {
    "spaceId": "id"
  }
}
```

```json Response
{
  "data": {
    "leaveSpace": {
      "clientMutationId": "string",
      "errors": [
        "string"
      ],
      "outcome": "ADDED",
      "space": {
        "archived": true,
        "avatarDarkModeUrl": "string",
        "avatarUrl": "string",
        "bookmarkedAt": "value",
        "brandingImages": [
          {
            "imageType": "AVATAR",
            "url": "string"
          }
        ],
        "createdAt": "value"
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.