# town.muni.arbiter.createSpace

> Published by [zicklag.dev](https://lexicon.garden/identity/did:plc:ulg2bzgrgs7ddjjlmhtegk3v)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ulg2bzgrgs7ddjjlmhtegk3v/town.muni.arbiter.createSpace)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ulg2bzgrgs7ddjjlmhtegk3v/town.muni.arbiter.createSpace/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ulg2bzgrgs7ddjjlmhtegk3v/town.muni.arbiter.createSpace/examples)

## Definitions

### `town.muni.arbiter.createSpace`

**Type**: `procedure`

Create a new space on an arbiter.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `config` | `union` | Yes | The space configuration.  Different servers will support different space config lexicons. Which lexicons are supported will also likely depend on the arbiter's config type. |
| `spaceKey` | `string` | Yes | The key of the space to create. |
| `spaceType` | `string` (nsid) | Yes | The NSID of the space type. |
| `arbiterDid` | `string` (did) | Yes | The DID of the arbiter to create the space in. |
| `resolverDepth` | `integer` | No | The maximum depth to allow when doing remote resolutions.  Because spaces are allowed to have members resolved from remote spaces, all of the arbiter endpoints have an optional resolution depth parameter that can be used to limit how many chained remote calls can be resolved.  This applies both to queries and procedures. Queries may need to resolve external members to complete the member list, and procedures may need to resolve external members if the requesting member is not in the local member list, to see if the member has access through a remote list. |

#### Output

**Encoding**: `application/json`

#### Errors

- **ErrArbiterNotExists**: The specified arbiter does not exist on this server.
- **ErrSpaceExists**: The specified space already exists on this arbiter.
- **ErrPermissionDenied**: The requesting user is not allowed to make the request.
- **ErrRaceCondition**: The config was changed by another request during the execution of this request.

The action should be retried if still applicable.

## Raw Schema

```json
{
  "id": "town.muni.arbiter.createSpace",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "arbiterDid",
            "spaceType",
            "spaceKey",
            "config"
          ],
          "properties": {
            "config": {
              "refs": [],
              "type": "union",
              "description": "The space configuration.\n\nDifferent servers will support different space config lexicons. Which\nlexicons are supported will also likely depend on the arbiter's config type."
            },
            "spaceKey": {
              "type": "string",
              "maxLength": 1024,
              "description": "The key of the space to create."
            },
            "spaceType": {
              "type": "string",
              "format": "nsid",
              "description": "The NSID of the space type."
            },
            "arbiterDid": {
              "type": "string",
              "format": "did",
              "description": "The DID of the arbiter to create the space in."
            },
            "resolverDepth": {
              "type": "integer",
              "description": "The maximum depth to allow when doing remote resolutions.\n\nBecause spaces are allowed to have members resolved from remote spaces,\nall of the arbiter endpoints have an optional resolution depth parameter\nthat can be used to limit how many chained remote calls can be resolved.\n\nThis applies both to queries and procedures. Queries may need to resolve\nexternal members to complete the member list, and procedures may need\nto resolve external members if the requesting member is not in the local\nmember list, to see if the member has access through a remote list."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "ErrArbiterNotExists",
          "description": "The specified arbiter does not exist on this server."
        },
        {
          "name": "ErrSpaceExists",
          "description": "The specified space already exists on this arbiter."
        },
        {
          "name": "ErrPermissionDenied",
          "description": "The requesting user is not allowed to make the request."
        },
        {
          "name": "ErrRaceCondition",
          "description": "The config was changed by another request during the execution of this request.\n\nThe action should be retried if still applicable."
        }
      ],
      "output": {
        "schema": {
          "refs": [],
          "type": "union"
        },
        "encoding": "application/json"
      },
      "description": "Create a new space on an arbiter."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
