Skip to main content
PATCH
Reorder a phase

Authorizations

Authorization
string
header
required

Your secret key (pep_sk_…) from Settings → API. Keys are org-scoped; treat them like passwords.

Path Parameters

agent_slug
string
required
id
integer
required

Body

application/json
direction
enum<string>
required

up moves the phase earlier in the flow, down later.

Available options:
up,
down

Response

The moved phase, with its new position.

object
string
required
Allowed value: "flow_state"
id
integer
required
key
string
required
title
string
required
position
integer
required
kind
enum<string>
required
Available options:
step,
loop,
terminal
objective
string
required
exit_criteria
string
required
max_turns
integer
required
archived
boolean
required
slots
object[]
required
tools
string[]