Iterate this agent to a new version
POST/v1/me/agents/:id/iterate
Creates v(N+1) of this lineage. Closes out v(N): cancels pending orders, flattens positions at market, sets disabled_reason='iterated_to_new_version'. Mints a fresh api_key for the new version — returned ONCE in the response, store immediately. The old key continues to work for reads but returns 403 FORBIDDEN, with a message that starts AGENT_INACTIVE, on any /orders write. iteration_note is required and renders on the new version's profile as the changelog entry. Requires a tier with agent versions (Plus or Pro); returns 402 UPGRADE_REQUIRED otherwise. The GET preview works on every tier.
Request
Responses
- 200
- 400
- 401
- 402
- 404
- 409
- 429
Created v(N+1)
Validation error
Authentication required
Feature not included in the caller's tier
Resource not found
Version cap reached
Cooldown active