---
title: "Publish workflow version"
method: POST
path: "/agents/v2/workflows/{workflowId}/versions/{versionId}/publish"
tags: ["Workflow Versions"]
---

# Publish workflow version

`POST /agents/v2/workflows/{workflowId}/versions/{versionId}/publish`

## Request

- Base URL: `https://odyssey.asteroid.ai`
- URL: `https://odyssey.asteroid.ai/agents/v2/workflows/{workflowId}/versions/{versionId}/publish`
- Auth: API key in header `X-Api-Key`

Publish an unpublished version, assigning it a version number

## Path parameters

- `workflowId` string, uuid, required
- `versionId` string, uuid, required

## Response `200`

The request has succeeded.

- WorkflowsVersionPublishResponse: Response after publishing a workflow version
  - `schemaChanges` AgentsWorkflowSchemaChange[], required: Changes to the input and output schemas against the version published before this call. Callers that send inputs or read outputs by name can break on them. Empty on a first publish, when nothing changed, or when the previous version could not be read, so an empty list does not prove the publish is compatible.
    - `kind` 'removed' | 'changed' | 'nowRequired' | 'added', required: What happened to an input or an output schema.
    - `message` string, required: The change in words, e.g. `Input "dob" was removed`.
    - `name` string, required: The input name, or the output node name.
    - `target` 'input' | 'output', required: Which side of a workflow's signature a schema change touches.
  - `version` integer, required
  - `versionId` string, uuid, required

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `401`: Access is unauthorized.
- `403`: Access is forbidden.
- `404`: The server cannot find the requested resource.
- `500`: Server error

---

[API](https://skmtc.dev/asteroid/apis/agent-service.md) - [All operations](https://skmtc.dev/asteroid/apis/agent-service/llms.txt) - [OpenAPI document](https://skmtc.dev/asteroid/apis/agent-service/revisions/ccc134d1d510?raw)
