---
title: "Create Turn"
method: POST
path: "/agent-loop/workspaces/{workspace_id}/turns"
tags: ["agent-loop"]
---

# Create Turn

`POST /agent-loop/workspaces/{workspace_id}/turns`

Write-ahead: create a pending turn before agent starts running.

## Path parameters

- `workspace_id` string, required

## Request body

- CreateTurnRequest
  - `id` string, nullable
  - `parent_id` string, nullable
  - `user_message` string, nullable
  - `user_id` string, nullable
  - `artifact_context` string[]
  - `parent_snapshot_id` string, nullable

## Response `200`

Successful Response

- CreateTurnResponse
  - `id` string, required
  - `handoff_code` string, required — Single-use code redeemable at /agent-loop/internal/agent-token/redeem for the agent-svc JWT bound to this turn. 60s TTL.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/tryscott/apis/one-shot-api.md) · [All operations](https://skmtc.net/tryscott/apis/one-shot-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryscott/one-shot-api/versions/28bdface01df/schema)
