# social.colibri.beta.bridge.createPairing

> 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.bridge.createPairing)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.createPairing/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mprdjqjluoswa7awzggaggj3/social.colibri.beta.bridge.createPairing/examples)

## Definitions

### `social.colibri.beta.bridge.createPairing`

**Type**: `procedure`

Starts pairing a bridge with a community. Called by the bridge, which shows the returned code to an admin on the other service. A Colibri admin then redeems the code, which proves both sides agreed.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `platform` | `string` | Yes | The service the bridge connects to. |
| `remoteSpace` | `string` | Yes | The id of the server, workspace or network on the other service. |
| `remoteSpaceName` | `string` | Yes | Its name on the other service. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `code` | `string` | Yes | The single-use pairing code. |
| `expiresAt` | `string` (datetime) | Yes | When the code stops working. |

#### Errors

- **AuthRequired**: The request is missing, malformed, or unverifiable service auth.
- **RateLimited**: The bridge sent too many requests. Retry after the interval in the response headers.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Starts pairing a bridge with a community. Called by the bridge, which shows the returned code to an admin on the other service. A Colibri admin then redeems the code, which proves both sides agreed.",
      "errors": [
        {
          "description": "The request is missing, malformed, or unverifiable service auth.",
          "name": "AuthRequired"
        },
        {
          "description": "The bridge sent too many requests. Retry after the interval in the response headers.",
          "name": "RateLimited"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "platform": {
              "description": "The service the bridge connects to.",
              "maxLength": 64,
              "type": "string"
            },
            "remoteSpace": {
              "description": "The id of the server, workspace or network on the other service.",
              "maxLength": 256,
              "type": "string"
            },
            "remoteSpaceName": {
              "description": "Its name on the other service.",
              "maxLength": 128,
              "type": "string"
            }
          },
          "required": [
            "platform",
            "remoteSpace",
            "remoteSpaceName"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "code": {
              "description": "The single-use pairing code.",
              "maxLength": 32,
              "type": "string"
            },
            "expiresAt": {
              "description": "When the code stops working.",
              "format": "datetime",
              "type": "string"
            }
          },
          "required": [
            "code",
            "expiresAt"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "social.colibri.beta.bridge.createPairing",
  "lexicon": 1
}
```
