---
title: "Update transformation"
method: PUT
path: "/api/v1/projects/{projectId}/transformations/{id}"
tags: ["Transformations"]
---

# Update transformation

`PUT /api/v1/projects/{projectId}/transformations/{id}`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/projects/{projectId}/transformations/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Updates transformation (auto-increments version when template changes)

## Path parameters

- `projectId` string, uuid, required
- `id` string, uuid, required

## Request body

- TransformationRequest: Request to create or update a transformation
  - `name` string, required: Human-readable name for the transformation
  - `description` string: Description of what this transformation does
  - `template` string, required: The transformation itself: a JSON template with ${$.jsonpath} expressions when kind is TEMPLATE, or a JavaScript `function handler(webhook) { ... }` when kind is JAVASCRIPT
  - `kind` 'TEMPLATE' | 'JAVASCRIPT': The language the template is written in. Omitted means TEMPLATE, which is what every transformation was before JavaScript existed.
  - `enabled` boolean: Whether this transformation is active

## Response `200`

OK

---

[API](https://skmtc.dev/railhook/apis/railhook-api.md) · [All operations](https://skmtc.dev/railhook/apis/railhook-api/llms.txt) · [OpenAPI document](https://skmtc.dev/railhook/apis/railhook-api/revisions/4e2c76dfc33d?raw)
