---
search:
  tags:
    - stage-templates
    - PATCH
seo:
  description: >-
    Update stage template. Reference for the PATCH
    /workspaces/{organizationId}/stage-templates/{id} endpoint in the Pile API.
sidebar:
  label: Update stage template
  badge: PATCH
title: Update stage template
type: openapi-operation
---
`PATCH /workspaces/{organizationId}/stage-templates/{id}`

**Request body** (`application/json`)

- `entityType` (string)
- `status` (string)
- `stepKey` (string)
- `title` (string)
- `required` (boolean)
- `ownerAgent` (string | null)
- `condition` (object | null) — Optional gate — \`{field}\` creates the step only when the record's field (column or custom field) is truthy; \`{field, equals}\` compares for equality. Field names normalize: "Hardware needed" == "hardware\_needed".
- `position` (integer)
- `teamId` (string | null)

Request body example:

```json
{
  "entityType": "issue",
  "status": "string",
  "stepKey": "string",
  "title": "string",
  "required": true,
  "ownerAgent": "string",
  "condition": {
    "field": "string",
    "equals": "string"
  },
  "position": 0,
  "teamId": "string"
}
```

**Responses**

- `200` — Stage template updated
- `404` — Stage template not found

Response example, 200:

```json
{
  "template": {
    "id": "string",
    "organizationId": "string",
    "entityType": "issue",
    "status": "string",
    "stepKey": "string",
    "title": "string",
    "required": true,
    "ownerAgent": "string",
    "condition": {
      "field": "string",
      "equals": "string"
    },
    "position": 0,
    "teamId": "string",
    "createdBy": "string",
    "createdAt": "string",
    "updatedAt": "string"
  }
}
```
