> For the complete documentation index, see [llms.txt](https://documentation.siteglide.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.siteglide.com/modules/core-modules/secure-zones/go-further-secure-zones/secure-zones-with-cli.md). Agents can also search and read this documentation through its [MCP server](https://documentation.siteglide.com/~gitbook/mcp).

# Secure Zones with Siteglide CLI

How to create a Secure Zone using GraphQL via the CLI

Secure Zones are simply a Model object within Siteglide, with this in mind, we can very easily create Secure Zones via the CLI using GraphQL.

### Prerequisites

* You have installed the Secure Zone module on the instance
* You have [setup CLI and connected to your Site](https://documentation.siteglide.com/developer-tools/cli.md)
* You know how to use the GraphiQL editor

### Example

Below is the GraphQL mutation that is used to create a Secure Zone from Siteglide Admin.

We simply pass it the name for the Secure Zone within the query variables.

```graphql
mutation(
	$name: String #The name of your Secure Zone
	){
  result: customization_create(
    customization: {
      custom_model_type_name:"modules/siteglide_secure_zones/secure_zones"
      properties: [
        {name: "name", value: $name}
      ]
    }
    form_configuration_name:"modules/siteglide_secure_zones/secure_zones"
  ){
    id
  }
}
```

After running the mutation, you will see an ID returned in the output window of the GraphiQL editor. The ID returning means that the mutation was successful and your new Secure Zone can now be used.

{% hint style="warning" %}
**Note**

If you already have Admin open you will need to refresh it to see the new Secure Zone.
{% endhint %}
