---
title: "Modify Lifecycle Hooks of a Jail"
method: PUT
path: "/options/lifecycle-hooks/:rid"
tags: ["Jail"]
---

# Modify Lifecycle Hooks of a Jail

`PUT /options/lifecycle-hooks/:rid`

Modify jail exec.* lifecycle hooks in one request

## Request body

- InternalHandlersJailModifyLifecycleHooksRequest
  - `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

## 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/revisions/950e51f8af98/schema)
