> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mightynetworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# createSpace

> Create a new Space in the Network from a Space template. The Space starts
private, hidden from discovery, and visible only to the Host until further configuration.

**Required scope:** `host:write:network_spaces`



**mutation** `createSpace(input: CreateSpaceInput!): CreateSpacePayload`

## Arguments

**`input`**: `CreateSpaceInput!` (required)

Parameters for CreateSpace

## Returns

`CreateSpacePayload`

**`clientMutationId`**: `String`

A unique identifier for the client performing the mutation.

---

**`collection`**: `SpacesCollection`

The collection resolved or created for the Space. Reported whenever Collection
resolution succeeded, even if Space creation then failed — the Collection can
survive that failure, so check this to see whether one was left behind. Null
only when no Collection was resolved at all.

---

**`collectionNewlyCreated`**: `Boolean`

True when this call created the collection rather than placing the Space in an
existing one. Reported alongside collection under the same conditions,
including when Space creation then failed.

---

**`errors`**: `[String!]!`

---

**`space`**: `Space`

## Examples

```graphql Mutation
mutation CreateSpace($input: CreateSpaceInput!) {
  createSpace(input: $input) {
    clientMutationId
    collection {
      avatarUrls
      createdAt
      description
      explorable
      galleryGroups {
        canDelete
        galleryPage
        galleryType
        id
        isEnabled
        label
      }
      id
    }
    collectionNewlyCreated
    errors
    space {
      archived
      avatarDarkModeUrl
      avatarUrl
      bookmarkedAt
      brandingImages {
        imageType
        url
      }
      createdAt
    }
  }
}
```

```json Variables
{
  "input": {
    "templateCanonicalName": "string",
    "title": "string"
  }
}
```

```json Response
{
  "data": {
    "createSpace": {
      "clientMutationId": "string",
      "collection": {
        "avatarUrls": [
          "string"
        ],
        "createdAt": "value",
        "description": "string",
        "explorable": true,
        "galleryGroups": [
          {
            "canDelete": true,
            "galleryPage": "DISCOVERY",
            "galleryType": "BUNDLES",
            "id": "id",
            "isEnabled": true,
            "label": "string"
          }
        ],
        "id": "id"
      },
      "collectionNewlyCreated": true,
      "errors": [
        "string"
      ],
      "space": {
        "archived": true,
        "avatarDarkModeUrl": "string",
        "avatarUrl": "string",
        "bookmarkedAt": "value",
        "brandingImages": [
          {
            "imageType": "AVATAR",
            "url": "string"
          }
        ],
        "createdAt": "value"
      }
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.