# dev.knotless.revokeSession

> Ends one login to this appview's pages of the account whose session cookie asks, as logging out in that browser or app would: its cookie holds no more. The last of the account's to end revokes the session the appview keeps at its PDS. Answers the logins left, as dev.knotless.listSessions does. Requires the session cookie the pages' login sets, from the pages themselves.

- Kind: procedure
- Authority: knotless.dev
- Lexicon: 1
- Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.revokeSession)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.revokeSession/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.revokeSession/analytics)

## Procedure (`dev.knotless.revokeSession`)

Type: procedure · POST

### Input (application/json)

- `sessionId` (string, required): The login, as dev.knotless.listSessions names it.
  - Constraints: maxLength: 64

### Output (application/json)

- `assistants` (array): The assistants connected over MCP.
  - `items` (ref)
    - Reference: `dev.knotless.listSessions#assistant`
- `sessions` (array, required)
  - `items` (ref)
    - Reference: `dev.knotless.listSessions#session`

### Errors

- `NotFound`: The account has no such login: it ended already.
- `Forbidden`: Sent from a page of another site.
- `AuthenticationRequired`: No account is logged in to the pages, or its login has ended.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Ends one login to this appview's pages of the account whose session cookie asks, as logging out in that browser or app would: its cookie holds no more. The last of the account's to end revokes the session the appview keeps at its PDS. Answers the logins left, as dev.knotless.listSessions does. Requires the session cookie the pages' login sets, from the pages themselves.",
      "errors": [
        {
          "description": "The account has no such login: it ended already.",
          "name": "NotFound"
        },
        {
          "description": "Sent from a page of another site.",
          "name": "Forbidden"
        },
        {
          "description": "No account is logged in to the pages, or its login has ended.",
          "name": "AuthenticationRequired"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "sessionId": {
              "description": "The login, as dev.knotless.listSessions names it.",
              "maxLength": 64,
              "type": "string"
            }
          },
          "required": [
            "sessionId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "assistants": {
              "description": "The assistants connected over MCP.",
              "items": {
                "ref": "dev.knotless.listSessions#assistant",
                "type": "ref"
              },
              "type": "array"
            },
            "sessions": {
              "items": {
                "ref": "dev.knotless.listSessions#session",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "sessions"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Logs one of the logins to this appview's pages out.",
  "id": "dev.knotless.revokeSession",
  "lexicon": 1
}
```
