---
title: "Get start hook"
method: GET
path: "/v1/environments/{environment_id}/start-hooks"
tags: ["Hooks"]
---

# Get start hook

`GET /v1/environments/{environment_id}/start-hooks`

## Request

- Base URL: `https://api.replicas.dev`
- URL: `https://api.replicas.dev/v1/environments/{environment_id}/start-hooks`
- Auth: HTTP bearer

Returns the environment's start hook. Start hooks run when a workspace starts, before repository hooks.

## Path parameters

- `environment_id` string, required

## Headers

- `X-Replicas-Api-Version` '2026-10-07'

## Response `200`

Successful response

- GetStartHooksResponse
  - `start_hook` StartHookRecord, required: A start hook — the shell script that runs at workspace boot (after the warm sandbox is claimed) for an environment.
    - `id` string, uuid, required
    - `organization_id` string, uuid, required
    - `environment_id` string, uuid, required
    - `version` integer, required: Monotonic version (newer scripts have higher versions)
    - `content` string, required: Shell script content
    - `is_active` boolean, required: Whether this version is the active one for the environment
    - `created_at` string, date-time, required

## Other responses

- `400`: Bad request - Missing or invalid parameters
- `401`: Unauthorized - Invalid or missing API key
- `500`: Internal server error

---

[API](https://skmtc.dev/replicas/apis/replicas-api.md) - [All operations](https://skmtc.dev/replicas/apis/replicas-api/llms.txt) - [OpenAPI document](https://skmtc.dev/replicas/apis/replicas-api/revisions/2703ac1c9cb7?raw)
