---
title: "Create a commit"
method: POST
path: "/v0/multi-file-feeds/{multi_file_feed_id}/commits"
tags: ["Multi FileFeed Commits"]
---

# Create a commit

`POST /v0/multi-file-feeds/{multi_file_feed_id}/commits`

Creates an immutable commit (snapshot) of the Multi FileFeed's transforms.
A request body with the transforms payload is required.

The endpoint atomically:
1. Checks that the HEAD is not dirty (rejects with 422 if it is)
2. Replaces all nodes on the HEAD with the supplied payload
3. Creates an immutable commit snapshot

The dirty check prevents accidentally overwriting in-progress UI edits.
If the HEAD has uncommitted changes, the API consumer must coordinate
with the UI user before proceeding.

This is the primary endpoint for programmatic transform management.
Imports run against the latest commit. Immediately after this call,
the new commit becomes the latest commit unless another commit is
created before `POST /imports`.

Requires Multi FileFeed transforms to be enabled for the organization.

## Request body

- object — Portable flowgraph payload. Uses portable identifiers (template_key, workflow_name, code_action_key) instead of internal numeric IDs.
  - `flowgraph` object
    - `nodes` object[]
      - `node_key` string
      - `type` string
      - `config` object
      - `position_x` number
      - `position_y` number
      - `pipeline` object, nullable
    - `edges` object[]
      - `from_node_key` string
      - `to_node_key` string

## Response `200`

Successful response — returns the created commit

- object
  - `commit_id` integer, required — Unique identifier of the created commit
  - `created_at` string, date-time, required — When the commit was created (ISO 8601)
  - `transforms` object, required — The portable flowgraph export of the commit
    - `version` integer
    - `exported_at` string, date-time
    - `flowgraph` object
      - `nodes` object[]
      - `edges` object[]

## Other responses

- `400` — Bad request (e.g. request body is not valid JSON or JSON is not an object)
- `401` — Unauthorized (missing or invalid API key)
- `403` — Forbidden (wrong organization or required feature not enabled)
- `422` — Unprocessable entity. Possible reasons: - HEAD flowgraph has uncommitted changes (dirty) - Import validation failed - Unresolved template/workflow references - Workflow has no recurring flowgraph

---

[API](https://skmtc.net/oneschema/apis/templates.md) · [All operations](https://skmtc.net/oneschema/apis/templates/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneschema/templates/revisions/40674aa6d4d9/schema)
