---
title: "Update a failure injection"
method: PATCH
path: "/failures/{failureId}"
tags: ["Simulations"]
---

# Update a failure injection

`PATCH /failures/{failureId}`

## Request

- Base URL: `https://www.cloudworldmodel.ai/api`
- URL: `https://www.cloudworldmodel.ai/api/failures/{failureId}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-PAYMENT`
  - API key in header `PAYMENT-SIGNATURE`

Partially updates a failure injection's fields (e.g. deactivate it by
setting `isActive: false`, or change the end time). Ownership of the
parent simulation is enforced.
Requires `write` scope.

## Request body

- object
  - `name` string
  - `isActive` boolean: Set to false to deactivate the failure early
  - `endTime` integer, nullable

## Response `200`

Updated failure injection

- object
  - `id` string
  - `simulationId` string
  - `name` string
  - `isActive` boolean

## Other responses

- `400`: Invalid request data — structured field-level error
- `401`: No credentials provided to an API-key-protected endpoint. The response body includes a machine-readable `apiKeyAuth` block pointing to the key creation endpoint so agents can self-serve an API key without consulting the spec.
- `403`: Access denied
- `404`: Resource not found

---

[API](https://skmtc.dev/cloudworldmodel/apis/cloud-world-model-agent-api.md) · [All operations](https://skmtc.dev/cloudworldmodel/apis/cloud-world-model-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cloudworldmodel/apis/cloud-world-model-agent-api/revisions/ecc3ad1ff07f?raw)
