---
title: "Create a new Jail"
method: POST
path: "/jail"
tags: ["Jail"]
---

# Create a new Jail

`POST /jail`

Create a new jail with the provided configuration

## Request body

- GithubComAlchemillahqSylveInternalInterfacesServicesJailCreateJailRequest
  - `additionalOptions` string
  - `allowedOptions` string[]
  - `base` string
  - `bootstrapName` string
  - `cleanEnvironment` boolean
  - `cores` integer
  - `ctId` integer, required
  - `description` string
  - `devfsRuleset` string
  - `dhcp` boolean
  - `fstab` string
  - `hooks` GithubComAlchemillahqSylveInternalInterfacesServicesJailHooks
    - `poststart` GithubComAlchemillahqSylveInternalInterfacesServicesJailHookPhase
      - `enabled` boolean
      - `script` string
    - `poststop` GithubComAlchemillahqSylveInternalInterfacesServicesJailHookPhase
      - `enabled` boolean
      - `script` string
    - `prestart` GithubComAlchemillahqSylveInternalInterfacesServicesJailHookPhase
      - `enabled` boolean
      - `script` string
    - `prestop` GithubComAlchemillahqSylveInternalInterfacesServicesJailHookPhase
      - `enabled` boolean
      - `script` string
    - `start` GithubComAlchemillahqSylveInternalInterfacesServicesJailHookPhase
      - `enabled` boolean
      - `script` string
    - `stop` GithubComAlchemillahqSylveInternalInterfacesServicesJailHookPhase
      - `enabled` boolean
      - `script` string
  - `hostname` string
  - `inheritIPv4` boolean
  - `inheritIPv6` boolean
  - `ipv4` integer
  - `ipv4Gw` integer
  - `ipv6` integer
  - `ipv6Gw` integer
  - `mac` integer
  - `memory` integer
  - `metadataEnv` string
  - `metadataMeta` string
  - `name` string, required
  - `pool` string, required
  - `resolvConf` string
  - `resourceLimits` boolean
  - `slaac` boolean
  - `startAtBoot` boolean
  - `startOrder` integer
  - `switchName` string
  - `type` 'freebsd' | 'linux', required

## Response `200`

Success

- GithubComAlchemillahqSylveInternalAPIResponseAny
  - `data` unknown
  - `error` string
  - `message` string
  - `status` string

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/alchemillahq/apis/sylve-api.md) · [All operations](https://skmtc.net/alchemillahq/apis/sylve-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alchemillahq/sylve-api/versions/950e51f8af98/schema)
