# org.atgrp.requestJoin

Request to join a group, optionally redeeming an invite. Admits the caller right away when the join policy is open or with a valid invite, and otherwise queues a request. Returns the caller's existing request or membership if they have one. Requires service auth.

A method (procedure) in the Atmosphere Groups standard, as published on the network. The page: https://www.atmospheregroups.org/reference/lexicons/org-atgrp-requestJoin/

- Published at: at://did:plc:4pt2cnpyvfgn5b7uxwn2shwv/com.atproto.lexicon.schema/org.atgrp.requestJoin
- In the spec: https://www.atmospheregroups.org/spec/lexicons/org-atgrp-requestJoin/, the same schema

## The schema as published

```json
{
  "id": "org.atgrp.requestJoin",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "group"
          ],
          "properties": {
            "group": {
              "type": "string",
              "format": "did"
            },
            "invite": {
              "type": "string",
              "format": "at-uri",
              "description": "An invite in the caller's inbox space."
            },
            "message": {
              "type": "string",
              "maxLength": 20000,
              "description": "Shown to the group with the request.",
              "maxGraphemes": 2000
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "GroupNotFound"
        },
        {
          "name": "InvalidInvite"
        },
        {
          "name": "JoinClosed",
          "description": "The group is invite-only."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "status": {
              "type": "string",
              "knownValues": [
                "pending",
                "admitted"
              ]
            },
            "request": {
              "ref": "org.atgrp.defs#joinRequest",
              "type": "ref",
              "description": "Present when pending."
            },
            "membership": {
              "ref": "com.atproto.repo.strongRef#main",
              "type": "ref",
              "description": "Present when admitted."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Request to join a group, optionally redeeming an invite. Admits the caller right away when the join policy is open or with a valid invite, and otherwise queues a request. Returns the caller's existing request or membership if they have one. Requires service auth."
    }
  },
  "lexicon": 1
}
```
