---
title: "Create Trajectory"
method: POST
path: "/v1/trajectories"
tags: ["trajectories"]
---

# Create Trajectory

`POST /v1/trajectories`

Create a new trajectory for a workflow.

The workflow must exist and belong to the authenticated organization.
The trajectory_data must contain at least one item.

## Headers

- `Idempotency-Key` string

## Request body

- TrajectoryCreate — Schema for creating a trajectory. Note: `is_generated` is intentionally omitted here. New trajectories always start as non-generated and must be promoted via POST /runs/{run_id}/generate-trajectory. Note: `is_main` is intentionally omitted here. Main-trajectory designation is managed after creation via trajectory updates.
  - `name` string, nullable
  - `description` string, nullable
  - `workflow_id` string, uuid, required
  - `run_id` string, uuid, nullable — Optional run that created this trajectory
  - `trajectory_data` object[], required
  - `dimensions` object, required — Display dimensions when trajectory was recorded
  - `original_input_values` object, nullable — Original input values used when trajectory was created
  - `is_approved` boolean — Whether this trajectory is approved for use

## Response `201`

Successful Response

- TrajectoryResponse — Trajectory response schema
  - `name` string, nullable
  - `description` string, nullable
  - `workflow_id` string, uuid, required
  - `run_id` string, uuid, nullable — Optional run that created this trajectory
  - `trajectory_data` object[], required
  - `dimensions` object, required — Display dimensions when trajectory was recorded
  - `original_input_values` object, nullable — Original input values used when trajectory was created
  - `is_approved` boolean, required
  - `has_been_approved` boolean, required
  - `is_generated` boolean, required
  - `is_main` boolean, required
  - `id` string, uuid, required
  - `user_id` string, uuid, nullable
  - `organization_id` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/cyberdesk-hq/apis/cyberdesk-cloud.md) · [All operations](https://skmtc.net/cyberdesk-hq/apis/cyberdesk-cloud/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cyberdesk-hq/cyberdesk-cloud/versions/830d2f48963d/schema)
