> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cyberdesk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Trajectory

> Update a trajectory's data.

Only the fields provided in the request body will be updated.
The trajectory must belong to the authenticated organization.



## OpenAPI

````yaml /openapi.json patch /v1/trajectories/{trajectory_id}
openapi: 3.1.0
info:
  title: Cyberdesk Cloud
  description: >-
    The Cyberdesk API provides programmatic access to all platform features,
    enabling you to automate desktop tasks at scale.
  version: 1.0.0
servers:
  - url: https://api.cyberdesk.io
    description: Production server
  - url: https://cyberdesk-api-dev.fly.dev
    description: Development server
security: []
paths:
  /v1/trajectories/{trajectory_id}:
    patch:
      tags:
        - trajectories
      summary: Update Trajectory
      description: |-
        Update a trajectory's data.

        Only the fields provided in the request body will be updated.
        The trajectory must belong to the authenticated organization.
      operationId: update_trajectory_v1_trajectories__trajectory_id__patch
      parameters:
        - name: trajectory_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Trajectory Id
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Unique key for idempotent requests. If provided, the server ensures
            the request is processed at most once. Retries with the same key
            return the original response. SDKs auto-generate this for write
            requests.
          schema:
            type: string
            example: 550e8400-e29b-41d4-a716-446655440000
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrajectoryUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrajectoryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TrajectoryUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        trajectory_data:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
              minItems: 1
            - type: 'null'
          title: Trajectory Data
        is_approved:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Approved
          description: Whether this trajectory is approved for use
        is_main:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Main
          description: >-
            Whether this trajectory is the optional main tie-break trajectory
            for its workflow
      type: object
      title: TrajectoryUpdate
      description: Schema for updating a trajectory
    TrajectoryResponse:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        workflow_id:
          type: string
          format: uuid
          title: Workflow Id
        run_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Run Id
          description: Optional run that created this trajectory
        trajectory_data:
          items:
            additionalProperties: true
            type: object
          type: array
          minItems: 1
          title: Trajectory Data
        dimensions:
          additionalProperties:
            type: integer
          type: object
          title: Dimensions
          description: Display dimensions when trajectory was recorded
        original_input_values:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Original Input Values
          description: Original input values used when trajectory was created
        is_approved:
          type: boolean
          title: Is Approved
        has_been_approved:
          type: boolean
          title: Has Been Approved
        is_generated:
          type: boolean
          title: Is Generated
        is_main:
          type: boolean
          title: Is Main
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: User Id
        organization_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Organization Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - workflow_id
        - trajectory_data
        - dimensions
        - is_approved
        - has_been_approved
        - is_generated
        - is_main
        - id
        - created_at
        - updated_at
      title: TrajectoryResponse
      description: Trajectory response schema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          additionalProperties: true
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````