---
title: "Change the state of a case instance"
method: POST
path: "/cmmn-runtime/case-instances/{caseInstanceId}/change-state"
tags: ["Case Instances"]
---

# Change the state of a case instance

`POST /cmmn-runtime/case-instances/{caseInstanceId}/change-state`

## Request

- Base URL: `https://developer-docs.flowable.com/cmmn-api`
- URL: `https://developer-docs.flowable.com/cmmn-api/cmmn-runtime/case-instances/{caseInstanceId}/change-state`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/flowable/apis/flowable-cmmn-rest-api/docs/cmmn-runtime/case-instances/:caseInstanceId/change-state/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `caseInstanceId` string, required

## Request body

- ChangePlanItemStateRequest
  - `activatePlanItemDefinitionIds` string[]: plan item definition ids to be activated
  - `moveToAvailablePlanItemDefinitionIds` string[]: plan item definition ids to be moved to available state
  - `terminatePlanItemDefinitionIds` string[]: plan item definition ids to be terminated
  - `addWaitingForRepetitionPlanItemDefinitionIds` string[]: add waiting for repetition to provided plan item definition ids
  - `removeWaitingForRepetitionPlanItemDefinitionIds` string[]: remove waiting for repetition to provided plan item definition ids
  - `changePlanItemIds` object: map an existing plan item id to new plan item id, this should not be necessary in general, but could be needed when plan item ids change between case definition versions.
  - `changePlanItemIdsWithDefinitionId` object: map an existing plan item id to new plan item id with the plan item definition id, this should not be necessary in general, but could be needed when plan item ids change between case definition versions.
  - `changePlanItemDefinitionsWithNewTargetIds` PlanItemDefinitionWithTargetIdsRequest[]: map an existing plan item id to a new plan item id and plan item definition id, this should not be necessary in general, but could be needed when plan item ids change between case definition versions.
    - `existingPlanItemDefinitionId` string
    - `newPlanItemId` string
    - `newPlanItemDefinitionId` string

## Response `200`

Indicates the case instance was found and change state activity was executed.

## Other responses

- `404`: Indicates the requested case instance was not found.

---

[API](https://skmtc.dev/flowable/apis/flowable-cmmn-rest-api.md) - [All operations](https://skmtc.dev/flowable/apis/flowable-cmmn-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/flowable/apis/flowable-cmmn-rest-api/revisions/afdfa1fcacd0?raw)
