Skip to main content
POST
/
ai-agent
/
undo
Undo last AI agent run
curl --request POST \
  --url https://app.myhero.so/ai-agent/undo \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sessionId": "<string>"
}
'
{
  "success": true,
  "hasUndo": true,
  "results": [
    {
      "domain": "<string>",
      "action": "<string>",
      "success": true,
      "error": "<string>"
    }
  ],
  "changes": [
    {
      "id": "<string>",
      "name": "<string>",
      "entityType": "document",
      "actions": [
        "<string>"
      ],
      "snapshotId": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://developers.myhero.so/llms.txt

Use this file to discover all available pages before exploring further.

Reverses the most recent AI-driven changes for the given sessionId and truncates that exchange from the conversation history. Returns success, hasUndo (whether further undo steps are available), per-domain results, and a changes summary of what was restored.

Authorizations

Authorization
string
header
required

HERO personal access token

Body

application/json
sessionId
string
required
Minimum string length: 1

Response

200 response

success
boolean
required
Example:

true

hasUndo
boolean
required
results
object[]
required
changes
object[]