Skip to main content
POST
/
v2
/
agents
/
versions
/
restore
Restore Agent Version
curl --request POST \
  --url https://api.velt.dev/v2/agents/versions/restore \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "agentId": "<string>"
  }
}
'
{
  "result": {
    "status": "success",
    "message": "Version restored successfully",
    "data": {
      "version": 2
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://velt-raghul-agent-docs.mintlify.app/llms.txt

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

Use this API to roll back an agent one version step. The current version N is deleted from the versions subcollection and the main document’s version pointer is decremented to N-1. This is a single-step undo. Call it repeatedly to walk backward through version history. The operation cannot go below version 1 — the agent must always have at least one version on file. There is no target-version parameter. The operation always undoes the most recent change.

Endpoint

POST https://api.velt.dev/v2/agents/versions/restore

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

Restore an agent’s previous version

{
  "data": {
    "agentId": "abc123def456"
  }
}

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Version restored successfully",
    "data": {
      "version": 2
    }
  }
}
FieldTypeDescription
data.versionnumberThe version the agent was restored to (N-1)

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "FAILED_PRECONDITION"
  }
}
Errors: NOT_FOUND (agent does not exist) / FAILED_PRECONDITION (already at version 1; cannot go below).
{
  "result": {
    "status": "success",
    "message": "Version restored successfully",
    "data": {
      "version": 2
    }
  }
}