Undelete a soft-deleted agent
AIP-164. Restores a soft-deleted agent by clearing its tombstone flag and returns the resulting draft snapshot. Idempotent — undeleting an already-active agent returns the agent unchanged. Requires manage permission on the underlying row; a missing or cross-org id surfaces as 404 (existence is hidden — same status as the corresponding GET). The Temporal schedule is not re-attached automatically — issue a follow-up /toggle if the agent should resume running.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Numeric agent id.
42
Response
Numeric agent id (stable per-org; not reused after delete).
42
URL-safe slug used in human-readable links. Unique per org.
"customer-churn-agent-a3f"
Display name of the agent. Shown in the builder and in run logs.
"Customer Churn Analyzer"
Lifecycle status. draft = never deployed. active = deployed. deleted = soft-deleted.
draft, active, deleted "active"
Type of automation. task = single-step skill orchestration; workflow = multi-step graph.
task, workflow "task"
Org UUID this agent belongs to. Matches the caller’s principal.
"00000000-0000-0000-0000-000000000001"
True when the draft variation differs from the active variation (deploy would publish changes).
false
Whether the agent’s schedule is currently active. Toggle via POST /api/v1/agents/{id}/toggle.
true
Access configuration — who in the org can use / manage this agent.
Creation timestamp.
"2026-05-01T10:00:00.000Z"
Most recent update timestamp.
"2026-05-11T10:00:00.000Z"
Whether the requesting principal can manage (edit/delete/deploy/toggle) this agent. Derived server-side from the principal + accessConfig. Always present on every Agent response.
true
Whether the requesting principal can use (run, view history of) this agent. Derived server-side from the principal + accessConfig. Always present on every Agent response.
true
Optional one-paragraph description of what this agent does.
"Predicts churn risk for a customer given a 90-day usage window."
Active (deployed) variation id. Null until the agent is first deployed.
"00000000-0000-4000-a000-000000000100"
Most recent draft variation id. Null when there is no draft pending.
"00000000-0000-4000-a000-000000000101"
Pending ownership transfer awaiting recipient acceptance. Absent when no request is in flight.
Variation-detail payload (trigger, workflowStructure, agentSelection) for the requested view. Populated by GET /api/v1/agents/:id; absent on list rows.
Soft-delete timestamp. Null for active agents.
null