# social.colibri.beta.bridge.leave

> Disconnects the calling bridge from a community and deletes its registration, for when the remote space removed the bridge. Messages it already relayed stay.

- 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.leave)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.leave/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.leave/analytics)

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

Type: procedure · POST

### Input (application/json)

- `community` (string · did, required): The community the registration belongs to.
- `registration` (string · tid, required): Record key of the registration.

### Output (application/json)


### Errors

- `AuthRequired`: The request is missing, malformed, or unverifiable service auth.
- `CommunityNotFound`: No community exists at the given DID.
- `RegistrationNotFound`: The community has no bridge registration with that id.
- `Forbidden`: The caller is not the bridge this registration belongs to.
- `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": "Disconnects the calling bridge from a community and deletes its registration, for when the remote space removed the bridge. Messages it already relayed stay.",
      "errors": [
        {
          "description": "The request is missing, malformed, or unverifiable service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "No community exists at the given DID.",
          "name": "CommunityNotFound"
        },
        {
          "description": "The community has no bridge registration with that id.",
          "name": "RegistrationNotFound"
        },
        {
          "description": "The caller is not the bridge this registration belongs to.",
          "name": "Forbidden"
        },
        {
          "description": "The AppView cannot act as the community because its stored credentials are missing or unusable.",
          "name": "CredentialsUnavailable"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "community": {
              "description": "The community the registration belongs to.",
              "format": "did",
              "type": "string"
            },
            "registration": {
              "description": "Record key of the registration.",
              "format": "tid",
              "type": "string"
            }
          },
          "required": [
            "community",
            "registration"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {},
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.colibri.beta.bridge.leave",
  "lexicon": 1
}
```
