---
updatedAt: 2026-06-24T21:48:09.000Z
agentTools:
  projectIndex: https://docs.sandflysecurity.com/llms.txt
---

# Create SSH security zone

Create a new SSH security zone.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "contact": {
      "email": "info@sandflysecurity.com"
    },
    "description": "Sandfly Security Server API",
    "license": {
      "name": "Sandfly Security, Ltd.",
      "url": "https://www.sandflysecurity.com"
    },
    "title": "Sandfly API",
    "version": "5.8.0"
  },
  "servers": [
    {
      "url": "https://{sandfly-api-host}/v4"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/sshhunter/zones": {
      "post": {
        "operationId": "createSshZone",
        "summary": "Create SSH security zone",
        "description": "Create a new SSH security zone.",
        "tags": [
          "SSH Zones"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SSHZoneConfiguration"
              }
            }
          },
          "description": "SSH security zone to add.",
          "required": true
        },
        "responses": {
          "201": {
            "description": "SSH security zone created.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "integer",
                  "description": "The ID of the new SSH security zone."
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or SSH security zone failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          },
          "409": {
            "description": "A zone with this name already exists.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          },
          "default": {
            "description": "Unexpected error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StandardResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SSHZoneTagPolicies": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/SSHZoneTagPolicy"
        }
      },
      "SSHZoneTagPolicy": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "include",
              "except"
            ],
            "description": "The type of tag list this is: include items with the tag(s), or exclude items with the tag(s)."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The tags that make up this policy."
          }
        },
        "required": [
          "mode",
          "tags"
        ]
      },
      "SSHZoneConfiguration": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of this SSH zone."
          },
          "description": {
            "type": "string",
            "description": "Description for this SSH zone."
          },
          "host_policies": {
            "$ref": "#/components/schemas/SSHZoneTagPolicies"
          },
          "key_policies": {
            "$ref": "#/components/schemas/SSHZoneTagPolicies"
          }
        },
        "required": [
          "name",
          "description",
          "host_policies",
          "key_policies"
        ]
      },
      "StandardResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StandardResponseStatus"
          }
        ],
        "properties": {
          "data": {
            "description": "Data that can go along with the status.",
            "type": "string"
          }
        },
        "required": [
          "data"
        ],
        "type": "object"
      },
      "StandardResponseStatus": {
        "properties": {
          "detail": {
            "description": "Extended explanation of status.",
            "type": "string"
          },
          "formattedDetail": {
            "description": "Optional additional details about the status (typically an error) that, if present and not an empty string, should be displayed as pre-formatted, monospaced text.",
            "type": "string"
          },
          "status": {
            "description": "HTTP status code.",
            "format": "int32",
            "maximum": 599,
            "minimum": 100,
            "type": "integer"
          },
          "title": {
            "description": "Short description of status.",
            "type": "string"
          }
        },
        "required": [
          "status",
          "title",
          "detail"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "bearerFormat": "JWT",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
```