# space.highport.manage.connectSpace

> Published by [lexicons.highport.space](https://lexicon.garden/identity/did:plc:ciygg5hma4q7ah2kxaszkyob)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.manage.connectSpace)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.manage.connectSpace/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.manage.connectSpace/examples)

## Definitions

### `space.highport.manage.connectSpace`

**Type**: `procedure`

Connect a space so bard can read and publish the authority's site and tile records from it. Only the authority can call this, with a delegation token it issued. Bard trades the token for a credential, registers for notifications, and pulls the authority's repo. Safe to repeat.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `space` | `string` (at-uri) | Yes | The space, at://{authority}/space/space.highport.sites.space/{skey}. |
| `delegationToken` | `string` | Yes | A delegation token the authority minted for this space. Used once and never stored. |

#### Output

**Encoding**: `application/json`

#### Errors

- **NotSpaceAuthority**: Only the space's authority may connect it.
- **GrantIssuerMismatch**: The delegation token was not issued by the caller.
- **GrantExpired**: The delegation token has expired.
- **GrantRefused**: The space host refused the exchange.
- **AppNotAllowed**: The space does not allow bard access yet. The space is recorded and will sync once it does.
- **SpaceQuotaExceeded**: This identity has reached its limit of connected spaces.
- **SpacesDisabled**: Space support is disabled on this deployment.

## Raw Schema

```json
{
  "id": "space.highport.manage.connectSpace",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "space",
            "delegationToken"
          ],
          "properties": {
            "space": {
              "type": "string",
              "format": "at-uri",
              "description": "The space, at://{authority}/space/space.highport.sites.space/{skey}."
            },
            "delegationToken": {
              "type": "string",
              "description": "A delegation token the authority minted for this space. Used once and never stored."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "NotSpaceAuthority",
          "description": "Only the space's authority may connect it."
        },
        {
          "name": "GrantIssuerMismatch",
          "description": "The delegation token was not issued by the caller."
        },
        {
          "name": "GrantExpired",
          "description": "The delegation token has expired."
        },
        {
          "name": "GrantRefused",
          "description": "The space host refused the exchange."
        },
        {
          "name": "AppNotAllowed",
          "description": "The space does not allow bard access yet. The space is recorded and will sync once it does."
        },
        {
          "name": "SpaceQuotaExceeded",
          "description": "This identity has reached its limit of connected spaces."
        },
        {
          "name": "SpacesDisabled",
          "description": "Space support is disabled on this deployment."
        }
      ],
      "output": {
        "schema": {
          "ref": "space.highport.defs#spaceView",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "description": "Connect a space so bard can read and publish the authority's site and tile records from it. Only the authority can call this, with a delegation token it issued. Bard trades the token for a credential, registers for notifications, and pulls the authority's repo. Safe to repeat."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
