# social.colibri.beta.bridge.install

> Connects a bridge to a community by its handle or DID, for bridges that set up rooms with commands in the channels they can use. Writes a registration with no linked or open channels.

- Kind: procedure
- Authority: bridge.beta.colibri.social
- Lexicon: 1
- Published by [colibri.social](https://lexicon.garden/identity/did:plc:mprdjqjluoswa7awzggaggj3), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.install)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.install/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.install/analytics)

## Procedure (`social.colibri.beta.bridge.install`)

Type: procedure · POST

### Input (application/json)

- `bridge` (string · at-identifier, required): The bridge's handle or DID.
- `community` (string · did, required): The community to connect the bridge to.

### Output (application/json)

- `registration` (ref, required): The registration.
  - Reference: `social.colibri.beta.bridge.defs#registrationView`

### Errors

- `AuthRequired`: The request is missing, malformed, or unverifiable service auth.
- `Forbidden`: The caller lacks the community.manage permission.
- `CommunityNotFound`: No community exists at the given DID.
- `BridgeNotFound`: The handle or DID does not resolve to an identity.
- `AlreadyRegistered`: This bridge is already installed in this community.
- `CredentialsUnavailable`: The AppView cannot act as the community because its stored credentials are missing or unusable.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Connects a bridge to a community by its handle or DID, for bridges that set up rooms with commands in the channels they can use. Writes a registration with no linked or open channels.",
      "errors": [
        {
          "description": "The request is missing, malformed, or unverifiable service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller lacks the community.manage permission.",
          "name": "Forbidden"
        },
        {
          "description": "No community exists at the given DID.",
          "name": "CommunityNotFound"
        },
        {
          "description": "The handle or DID does not resolve to an identity.",
          "name": "BridgeNotFound"
        },
        {
          "description": "This bridge is already installed in this community.",
          "name": "AlreadyRegistered"
        },
        {
          "description": "The AppView cannot act as the community because its stored credentials are missing or unusable.",
          "name": "CredentialsUnavailable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "bridge": {
              "description": "The bridge's handle or DID.",
              "format": "at-identifier",
              "type": "string"
            },
            "community": {
              "description": "The community to connect the bridge to.",
              "format": "did",
              "type": "string"
            }
          },
          "required": [
            "community",
            "bridge"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "registration": {
              "description": "The registration.",
              "ref": "social.colibri.beta.bridge.defs#registrationView",
              "type": "ref"
            }
          },
          "required": [
            "registration"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.colibri.beta.bridge.install",
  "lexicon": 1
}
```
