# social.colibri.beta.community.join

> Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.community.join)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.community.join/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.community.join/examples)

## Definitions

### `social.colibri.beta.community.join`

**Type**: `procedure`

Admits the requesting user to a community. Joining is an AppView procedure rather than a record the user writes, because admission is what makes the community's spaces readable to them.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `community` | `string` (did) | Yes | The community to join. |
| `invitation` | `string` | No | An invitation code. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `member` | `ref` → `social.colibri.beta.community.defs#memberView` | No | The new member view. Present only when status is joined. |
| `status` | `string` | Yes | The result of the join attempt. |

#### Errors

- **AuthRequired**: The request is missing, malformed, or unverifiable service auth.
- **CommunityNotFound**: No community exists with that DID.
- **InvitationNotFound**: No invitation exists with that code.
- **AlreadyMember**: The requesting user already holds a member record in this community.
- **Banned**: The requesting user is banned from this community.
- **CredentialsUnavailable**: The AppView's stored credentials for this community are missing or unusable.

## Raw Schema

```json
{
  "id": "social.colibri.beta.community.join",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "community"
          ],
          "properties": {
            "community": {
              "type": "string",
              "format": "did",
              "description": "The community to join."
            },
            "invitation": {
              "type": "string",
              "description": "An invitation code."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthRequired",
          "description": "The request is missing, malformed, or unverifiable service auth."
        },
        {
          "name": "CommunityNotFound",
          "description": "No community exists with that DID."
        },
        {
          "name": "InvitationNotFound",
          "description": "No invitation exists with that code."
        },
        {
          "name": "AlreadyMember",
          "description": "The requesting user already holds a member record in this community."
        },
        {
          "name": "Banned",
          "description": "The requesting user is banned from this community."
        },
        {
          "name": "CredentialsUnavailable",
          "description": "The AppView's stored credentials for this community are missing or unusable."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "status"
          ],
          "properties": {
            "member": {
              "ref": "social.colibri.beta.community.defs#memberView",
              "type": "ref",
              "description": "The new member view. Present only when status is joined."
            },
            "status": {
              "type": "string",
              "description": "The result of the join attempt.",
              "knownValues": [
                "joined",
                "pending"
              ]
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Admits the requesting user to a community. Joining is an AppView procedure rather than a record the user writes, because admission is what makes the community's spaces readable to them."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
