Rolls back the agent to a specific archived version:
1.
Computes the diff between current live and the target version.
2.
Applies the target snapshot to all runtime tables.
3.
Marks the current live version as reverted.
4.
Creates a new live version row (is_revert=true, reverted_from_version=N) with a new version_number.
5.
Sends a revert notification email.
6.
Refreshes Redis caches.
Rules:
Target must have status archived. Cannot revert to live, draft, or reverted.
version_notes is required (explain why you're reverting).
Request
Authorization
API Key
Add parameter in header
token
Example:
token: ********************
or
Path Params
Body Params application/jsonRequired
Example
{"version_notes":"v4 broke Tamil STT detection. Rolling back to v2 until hotfix is ready."}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://staging-api.formi.co.in/v2/agents//config/model/versions//revert' \
--header'token: <api-key>' \
--header'Content-Type: application/json' \
--data-raw'{
"version_notes": "v4 broke Tamil STT detection. Rolling back to v2 until hotfix is ready."
}'
Responses
🟢200
application/json
Revert successful. Returns the new live version metadata.
Body
Example
{"success":true,"message":"Reverted","payload":{"version_number":5,"status":"live","version_notes":"v4 broke Tamil STT detection. Rolling back to v2 until hotfix is ready.","published_at":"2026-05-01T11:00:00+05:30","change_summary":{"changed":{"agent_configuration.LLM.conversation_llm.model_name":{"old":"gpt-4-turbo","new":"gpt-4o"}},"unchanged":["agent_name","main_prompt","connection_config"]}}}