---
title: "Update a multiple/single (non)binary variable on a case instance"
method: PUT
path: "/cmmn-runtime/case-instances/{caseInstanceId}/variables"
tags: ["Case Instance Variables"]
---

# Update a multiple/single (non)binary variable on a case instance

`PUT /cmmn-runtime/case-instances/{caseInstanceId}/variables`

## Request

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

This endpoint can be used in 2 ways: By passing a JSON Body (RestVariable or an array of RestVariable) or by passing a multipart/form-data Object.
Nonexistent variables are created on the case-instance and existing ones are overridden without any error.
Any number of variables can be passed into the request body array.
Note that scope is ignored, only global variables can be set in a case instance.
NB: Swagger V2 specification doesn't support this use case that is why this endpoint might be buggy/incomplete if used with other tools.

## Path parameters

- `caseInstanceId` string, required

## Request body

- CaseInstanceVariableCollectionResource

## Response `200`

successful operation

- object

## Other responses

- `201`: Indicates the case instance was found and variable is created.
- `400`: Indicates the request body is incomplete or contains illegal values. The status description contains additional information about the error.
- `404`: Indicates the requested case instance was not found.
- `415`: Indicates the serializable data contains an object for which no class is present in the JVM running the Flowable engine and therefore cannot be deserialized.

---

[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)
