# Update a step template

Source: https://www.jawsdeploy.net/rest-api/step-templates-update | Section: Step Templates

Update a step template's name, script, properties, or run modes.

`PUT /api/step-template`

Updates a step template. Pass only the fields to change. Existing project steps using this template keep their current property values until the next edit.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `stepTemplateId` | body | string | yes | ID of the step template. |
| `name` | body | string | no | New name. |
| `description` | body | string | no | New description. |
| `supportedRunModes` | body | array<string> | no | See below. |
| `script` | body | string | no | New script body. |
| `scriptLanguage` | body | string | no | New script language. |
| `propertiesRaw` | body | string | no | The replacement property schema, JSON-encoded. Replaces the whole array - see below. |

### Supported run modes

Each `supportedRunModes` entry must be `TargetMachine`, `Worker`, or `WorkerToCloudTargets`. Values that cannot be parsed are ignored; if no valid entries remain, the request returns `400`.

### Property definitions

`propertiesRaw` takes the same array [Create a step template](https://www.jawsdeploy.net/rest-api/step-templates-create) describes, including the typed `ValueText`, `ValueBoolean`, `ValueNumber` and `ValueObject` fields that carry a property's starting value. There is no `DefaultValue` field, and a member that is not part of the schema is dropped without an error.

Sending it replaces the property array outright rather than merging into it, so send the complete schema. Leave it out and the template keeps the properties it has.

Existing steps are not touched by this call. A step runs the template version it is pinned to, and it picks up a new schema only when something pulls the template onto it - see [Update project step](https://www.jawsdeploy.net/rest-api/project-step-update).

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid `stepTemplateId` or validation failure. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks the required role. |

Example request:

```
PUT /api/step-template

{ "stepTemplateId": "st_2", "scriptLanguage": "powershell" }
```

Example response:

```
{}
```

