# dev.knotless.deleteOrg

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

Ends the organization the account logged in to this appview's pages is, as `knotless org delete` does.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.deleteOrg)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.deleteOrg/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.deleteOrg/examples)

## Definitions

### `dev.knotless.deleteOrg`

**Type**: `procedure`

Takes out every member, withdraws every invitation, deletes the organization's space and its dev.knotless.org record. The account and its repositories stay. Requires the session cookie the pages' login sets: the appview acts with the session it keeps for that account. Clients holding their own session call the organization's gateway themselves.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `warning` | `string` | No | Set when the change was made only in part, saying what is left. |

#### Errors

- **InvalidRequest**: The change was refused: by the organization's gateway, or as the account may not make it.
- **AuthenticationRequired**: No account is logged in to the pages, or its session has ended.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Takes out every member, withdraws every invitation, deletes the organization's space and its dev.knotless.org record. The account and its repositories stay. Requires the session cookie the pages' login sets: the appview acts with the session it keeps for that account. Clients holding their own session call the organization's gateway themselves.",
      "errors": [
        {
          "description": "The change was refused: by the organization's gateway, or as the account may not make it.",
          "name": "InvalidRequest"
        },
        {
          "description": "No account is logged in to the pages, or its session has ended.",
          "name": "AuthenticationRequired"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {},
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "warning": {
              "description": "Set when the change was made only in part, saying what is left.",
              "maxLength": 2000,
              "type": "string"
            }
          },
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Ends the organization the account logged in to this appview's pages is, as `knotless org delete` does.",
  "id": "dev.knotless.deleteOrg",
  "lexicon": 1
}
```
