---
title: "Deploy and publish a workflow"
description: "Upload reviewed workflow YAML and expose one revision to Agents."
---

> Documentation Index
> Fetch the complete documentation index at: https://help.tooluse.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy and publish a workflow

<h2 id="prerequisites">Prerequisites</h2>
<p>Use an application you can write. The workflow must use only task types admitted for application workspaces.</p>
<p>Upload one workflow</p><pre><code class="language-bash">curl -X PUT https://api.tooluse.net/v1/applications/app_&lt;32-lowercase-hex&gt;/flows \
  -H "Authorization: Bearer $TOOLUSE_API_KEY" \
  -H "Content-Type: text/plain" \
  --data-binary @workflow.yaml</code></pre><p>The YAML is limited to 512,000 characters. Its tenant ID must equal the application ID, and it needs an <code>id</code> and <code>namespace</code>.</p><p>Publish the workflow as an operation</p><p><code>PUT /v1/applications/{appId}/workflow-operations/{id}</code> pins the current workflow revision and records its name and whether it requires an end user.</p><p>Discover it with an Agent key</p><p>The published operation appears in <code>GET /v1/agent/applications/{appId}/operations</code> with a generated input schema.</p>
<h2 id="verify">Verify</h2>
<p><code>GET /v1/applications/{appId}/workflow-operations</code> returns the published revision. Withdrawing it prevents new Agent calls without changing historical receipts.</p>
<h2 id="next-steps">Next steps</h2>
<ul>
<li><a href="/getting-started/quickstart">Invoke an operation safely</a></li>
<li><a href="/operate/receipts">Receipts and result retention</a></li>
</ul>

Source: https://help.tooluse.net/automation/workflows/index.mdx
