# space.highport.manage.register

> 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.register)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.manage.register/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.manage.register/examples)

## Definitions

### `space.highport.manage.register`

**Type**: `procedure`

Register a domain to the caller, or to a space the caller is the authority of, and get the DNS records needed to prove ownership and route traffic.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `domain` | `string` | Yes |  |
| `space` | `string` (at-uri) | No | Register the domain to this space instead of the caller's public repo. Bard must be connected to the space, and the caller must be its authority. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `domain` | `string` | Yes |  |
| `expiresAt` | `string` (datetime) | Yes | An unverified registration is released after this time. |
| `records` | `array` | Yes |  |
| `space` | `string` (at-uri) | No |  |
| `status` | `ref` → `space.highport.defs#domainStatus` | Yes |  |

#### Errors

- **InvalidDomain**: Not a valid, non-reserved, public-suffix-safe domain.
- **DomainTaken**: The domain is taken: registered to a different DID and verified, active or suspended; reserved under a base for a different DID; or released while its wildcard grant is still being retired, which blocks everyone, the previous holder included.
- **DomainDenied**: The domain is on the operator denylist.
- **QuotaExceeded**: This DID has reached its domain limit.
- **AlreadyRegistered**: Already registered to this DID. Use getDomain to get the instructions again.
- **SpaceNotFound**: Bard is not connected to that space. Call connectSpace first.
- **NotSpaceAuthority**: Only the space's authority may register a domain to it.
- **SpaceNotSynced**: Registered, but bard cannot read the space right now, so the domain will not serve until it can.
- **DomainDelegated**: The domain is under a delegation base. Only the base's owner can hand out names there, with reserveDomain.

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Register a domain to the caller, or to a space the caller is the authority of, and get the DNS records needed to prove ownership and route traffic.",
      "errors": [
        {
          "description": "Not a valid, non-reserved, public-suffix-safe domain.",
          "name": "InvalidDomain"
        },
        {
          "description": "The domain is taken: registered to a different DID and verified, active or suspended; reserved under a base for a different DID; or released while its wildcard grant is still being retired, which blocks everyone, the previous holder included.",
          "name": "DomainTaken"
        },
        {
          "description": "The domain is on the operator denylist.",
          "name": "DomainDenied"
        },
        {
          "description": "This DID has reached its domain limit.",
          "name": "QuotaExceeded"
        },
        {
          "description": "Already registered to this DID. Use getDomain to get the instructions again.",
          "name": "AlreadyRegistered"
        },
        {
          "description": "Bard is not connected to that space. Call connectSpace first.",
          "name": "SpaceNotFound"
        },
        {
          "description": "Only the space's authority may register a domain to it.",
          "name": "NotSpaceAuthority"
        },
        {
          "description": "Registered, but bard cannot read the space right now, so the domain will not serve until it can.",
          "name": "SpaceNotSynced"
        },
        {
          "description": "The domain is under a delegation base. Only the base's owner can hand out names there, with reserveDomain.",
          "name": "DomainDelegated"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "domain": {
              "maxLength": 253,
              "type": "string"
            },
            "space": {
              "description": "Register the domain to this space instead of the caller's public repo. Bard must be connected to the space, and the caller must be its authority.",
              "format": "at-uri",
              "type": "string"
            }
          },
          "required": [
            "domain"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "domain": {
              "type": "string"
            },
            "expiresAt": {
              "description": "An unverified registration is released after this time.",
              "format": "datetime",
              "type": "string"
            },
            "records": {
              "items": {
                "ref": "space.highport.defs#dnsInstruction",
                "type": "ref"
              },
              "type": "array"
            },
            "space": {
              "format": "at-uri",
              "type": "string"
            },
            "status": {
              "ref": "space.highport.defs#domainStatus",
              "type": "ref"
            }
          },
          "required": [
            "domain",
            "status",
            "records",
            "expiresAt"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "space.highport.manage.register",
  "lexicon": 1
}
```
