# org.atgrp.leaveGroup

Leave a group, deleting the caller's membership, which the group authored. The caller should also delete their confirmation. Requires service auth.

A method (procedure) in the spec for Atmosphere Groups. The page: https://www.atmospheregroups.org/spec/lexicons/org-atgrp-leaveGroup/

- Named in the spec: 5 Roles & Access (https://www.atmospheregroups.org/spec/#roles--access); 13.4 Methods (https://www.atmospheregroups.org/spec/#methods)
- In the spec's repository: https://tangled.org/atmospheregroups.org/spec/blob/0885261c9cd1af80e89908571f926c2d0c71771f/lexicons/org/atgrp/leaveGroup.json
- Published under the same name: https://www.atmospheregroups.org/reference/lexicons/org-atgrp-leaveGroup/, the same schema
- The reference host's version: fyi.opensocial.leaveGroup, https://www.atmospheregroups.org/reference/lexicons/fyi-opensocial-leaveGroup/

## The schema in the spec

```json
{
  "lexicon": 1,
  "id": "org.atgrp.leaveGroup",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "Leave a group, deleting the caller's membership, which the group authored. The caller should also delete their confirmation. Requires service auth.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "group"
          ],
          "properties": {
            "group": {
              "type": "string",
              "format": "did"
            }
          }
        }
      },
      "errors": [
        {
          "name": "GroupNotFound"
        }
      ]
    }
  }
}
```
