# lol.dids.manage.register

> Published by [ngerakines.me](https://lexicon.garden/identity/did:plc:cbkjy5n7bk3ax2wplmtjofq2)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:cbkjy5n7bk3ax2wplmtjofq2/lol.dids.manage.register)
- [Documentation](https://lexicon.garden/lexicon/did:plc:cbkjy5n7bk3ax2wplmtjofq2/lol.dids.manage.register/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:cbkjy5n7bk3ax2wplmtjofq2/lol.dids.manage.register/examples)

## Definitions

### `lol.dids.manage.register`

**Type**: `procedure`

Register a domain to the calling identity — or, with space, to a space the caller is the authority of — and obtain the DNS records needed to prove ownership and route traffic.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `space` | `string` (at-uri) | No | Register the domain to a space bard is connected to rather than to the caller's public repo. The caller must be the space's authority. |
| `domain` | `string` | Yes |  |

#### Output

**Encoding**: `application/json`

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

#### Errors

- **InvalidDomain**: Not a syntactically valid, non-reserved, public-suffix-safe domain.
- **DomainTaken**: Registered to a different DID and still active.
- **DomainDenied**: On the operator denylist.
- **QuotaExceeded**: This DID has reached its domain limit.
- **AlreadyRegistered**: Already registered to this DID; use getDomain to retrieve instructions.
- **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 currently read the space, so the domain will not serve until it can.

## Raw Schema

```json
{
  "id": "lol.dids.manage.register",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "domain"
          ],
          "properties": {
            "space": {
              "type": "string",
              "format": "at-uri",
              "description": "Register the domain to a space bard is connected to rather than to the caller's public repo. The caller must be the space's authority."
            },
            "domain": {
              "type": "string",
              "maxLength": 253
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "InvalidDomain",
          "description": "Not a syntactically valid, non-reserved, public-suffix-safe domain."
        },
        {
          "name": "DomainTaken",
          "description": "Registered to a different DID and still active."
        },
        {
          "name": "DomainDenied",
          "description": "On the operator denylist."
        },
        {
          "name": "QuotaExceeded",
          "description": "This DID has reached its domain limit."
        },
        {
          "name": "AlreadyRegistered",
          "description": "Already registered to this DID; use getDomain to retrieve instructions."
        },
        {
          "name": "SpaceNotFound",
          "description": "Bard is not connected to that space; call connectSpace first."
        },
        {
          "name": "NotSpaceAuthority",
          "description": "Only the space's authority may register a domain to it."
        },
        {
          "name": "SpaceNotSynced",
          "description": "Registered, but bard cannot currently read the space, so the domain will not serve until it can."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "domain",
            "status",
            "records",
            "expiresAt"
          ],
          "properties": {
            "space": {
              "type": "string",
              "format": "at-uri"
            },
            "domain": {
              "type": "string"
            },
            "status": {
              "ref": "lol.dids.defs#domainStatus",
              "type": "ref"
            },
            "records": {
              "type": "array",
              "items": {
                "ref": "lol.dids.defs#dnsInstruction",
                "type": "ref"
              }
            },
            "expiresAt": {
              "type": "string",
              "format": "datetime",
              "description": "After this time an unverified registration is released."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Register a domain to the calling identity — or, with space, to a space the caller is the authority of — and obtain the DNS records needed to prove ownership and route traffic."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
