---
title: "Create a published version record for an automation"
method: POST
path: "/v1/tasks/{taskId}/automations/{automationId}/versions"
tags: ["Task Automations"]
---

# Create a published version record for an automation

`POST /v1/tasks/{taskId}/automations/{automationId}/versions`

Create a published version record for an automation in Comp AI. Create, version, run, and inspect automated evidence collection workflows attached to compliance tasks.

## Path parameters

- `taskId` string, required
- `automationId` string, required

## Request body

- CreateVersionDto
  - `version` number, required — Version number for this published script
  - `scriptKey` string, required — S3 key of the already-generated & published automation script (returned by the publish step).
  - `changelog` string — Optional changelog describing this version

## Response `201`

---

[API](https://skmtc.net/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.net/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/revisions/726b9523fb22/schema)
