# space.highport.manage.enableDelegation

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

## Definitions

### `space.highport.manage.enableDelegation`

**Type**: `procedure`

Make a registered domain a delegation base, so its owner can reserve names directly under it for other identities. Returns the wildcard record that routes those names. The caller must own the base, and it must be verified or active.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `domain` | `string` | Yes | The base: a domain registered to the caller. |
| `maxNames` | `integer` | No | The most names the base can reserve. Defaults to the deployment's setting; a value above the deployment's ceiling is refused. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `domain` | `string` | Yes |  |
| `status` | `ref` → `space.highport.defs#delegationState` | Yes |  |
| `records` | `array` | Yes | The DNS records to publish: the wildcard traffic record. |
| `probeHostname` | `string` | No | A random name under the base, used to prove the wildcard routes. Absent while the base has no probe. |

#### Errors

- **InvalidDomain**: Not a syntactically valid domain.
- **NotBaseOwner**: No verified or active registration of that domain belongs to the caller.
- **DelegationUnsupported**: This domain cannot be a delegation base. It is registered to a space, is a domain this deployment provides or a name under one, was itself handed out under a base, or sits above or below a domain with delegation turned on. Bases do not nest.
- **MaxNamesAboveLimit**: maxNames is above this deployment's per-base limit.
- **CaaForbidsIssuance**: The base's CAA records do not allow this deployment's certificate issuer, account, or challenge method. The error message names the blocking record.

## Raw Schema

```json
{
  "id": "space.highport.manage.enableDelegation",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "domain"
          ],
          "properties": {
            "domain": {
              "type": "string",
              "maxLength": 253,
              "description": "The base: a domain registered to the caller."
            },
            "maxNames": {
              "type": "integer",
              "minimum": 1,
              "description": "The most names the base can reserve. Defaults to the deployment's setting; a value above the deployment's ceiling is refused."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "InvalidDomain",
          "description": "Not a syntactically valid domain."
        },
        {
          "name": "NotBaseOwner",
          "description": "No verified or active registration of that domain belongs to the caller."
        },
        {
          "name": "DelegationUnsupported",
          "description": "This domain cannot be a delegation base. It is registered to a space, is a domain this deployment provides or a name under one, was itself handed out under a base, or sits above or below a domain with delegation turned on. Bases do not nest."
        },
        {
          "name": "MaxNamesAboveLimit",
          "description": "maxNames is above this deployment's per-base limit."
        },
        {
          "name": "CaaForbidsIssuance",
          "description": "The base's CAA records do not allow this deployment's certificate issuer, account, or challenge method. The error message names the blocking record."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "domain",
            "records",
            "status"
          ],
          "properties": {
            "domain": {
              "type": "string"
            },
            "status": {
              "ref": "space.highport.defs#delegationState",
              "type": "ref"
            },
            "records": {
              "type": "array",
              "items": {
                "ref": "space.highport.defs#dnsInstruction",
                "type": "ref"
              },
              "description": "The DNS records to publish: the wildcard traffic record."
            },
            "probeHostname": {
              "type": "string",
              "maxLength": 253,
              "description": "A random name under the base, used to prove the wildcard routes. Absent while the base has no probe."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Make a registered domain a delegation base, so its owner can reserve names directly under it for other identities. Returns the wildcard record that routes those names. The caller must own the base, and it must be verified or active."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
