---
title: "save a chaos experiment profile"
method: PUT
path: "/mockserver/chaosExperiment/profiles/{name}"
tags: ["chaos"]
---

# save a chaos experiment profile

`PUT /mockserver/chaosExperiment/profiles/{name}`

## Request

- Base URL: `http://localhost:1080`
- URL: `http://localhost:1080/mockserver/chaosExperiment/profiles/{name}`
- Auth: none declared

Saves a chaos experiment definition (the same body shape as PUT /mockserver/chaosExperiment) under the given name so it can be applied later with POST /mockserver/chaosExperiment/apply/{name}. The name in the path is authoritative; any name field in the body is ignored. The name must be 1-128 characters of letters, digits, space, dot, underscore or hyphen with no leading/trailing space.

## Path parameters

- `name` string, required

## Request body

- ChaosExperiment: a scheduled multi-stage chaos experiment definition (the body of PUT /mockserver/chaosExperiment)
  - `name` string: human-readable experiment name (ignored when saved under a path {name})
  - `loop` boolean: whether to loop back to stage 0 after the last stage completes (default false)
  - `stages` object[], required: ordered sequence of stages
    - `durationMillis` integer, required: how long this stage runs before advancing (max 86400000 = 24h)
    - `profiles` object, required: map of host -> chaos profile to apply during this stage

## Response `200`

profile saved

- object
  - `status` 'saved'
  - `name` string

## Other responses

- `400`: missing body, invalid name, or invalid experiment definition

---

[API](https://skmtc.dev/mock-server/apis/mockserver-api.md) · [All operations](https://skmtc.dev/mock-server/apis/mockserver-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mock-server/apis/mockserver-api/revisions/9239b693996e?raw)
