---
title: "Save workflow code"
method: POST
path: "/workflows/{workflow_id}/code"
tags: ["workflows"]
---

# Save workflow code

`POST /workflows/{workflow_id}/code`

Persists a new revision of the workflow's code. Hash-deduplicates against the current revision (no-op if unchanged). Source is capped at 256KB.

## Path parameters

- `workflow_id` string, uuid, required — workflow identifier

## Request body

- WorkflowSaveCodeRequest — -- code workflow source endpoints ----------------------------------------- SaveCodeRequest is the body for POST /workflows/:id/code.
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `message` string — Optional commit-style note.
  - `source` string, required — Python source the user typed.

## Response `200`

OK

- WorkflowSaveCodeResponse — Returned from POST /workflows/:id/code.
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `no_op` boolean, required — True when the submitted source's sha256 matched the prior current revision; no new row was inserted, no pointer was changed.
  - `revision` integer, required — Per-workflow monotonic revision number.
  - `revision_id` string, required — Workflow_revisions.id of the active revision after the save.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/axilioai/apis/axilio-api.md) · [All operations](https://skmtc.net/axilioai/apis/axilio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/axilioai/axilio-api/versions/108ab4b41051/schema)
