Skip to main content
POST
/
agents
/
{id}
/
versions
/
{version_number}
/
rollback
Rollback Agent Version
curl --request POST \
  --url https://api.tess.im/agents/{id}/versions/{version_number}/rollback \
  --header 'Authorization: Bearer <token>'
Attempting to roll back to the currently active version returns a 422 error.

Code Examples

curl --request POST \
  --url 'https://api.tess.im/agents/8794/versions/2/rollback' \
  --header 'Authorization: Bearer YOUR_API_KEY'

Headers

x-workspace-id
integer
ID of the workspace. If not provided, the user’s selected workspace will be used.
Note: This field will be required in a future release of the API. It is highly recommended to set it now to ensure compatibility with future updates.

Path Parameters

id
integer
required
The agent ID
version_id
integer
required
The version ID to roll back to

Response

{
  "version": {
    "version_id": 10,
    "published_at": "2026-04-09T15:00:00+00:00",
    "published_by": "user@example.com",
    "rollback_from_version": 8,
    "snapshot": {
      "agent_name": "Customer Support Agent",
      "instructions": "You are a helpful customer support assistant.",
      "ask_user_questions": [],
      "steps": [],
      "knowledge_base_files": [],
      "type": "chat",
      "subtype": "All LLM Models",
      "advanced_settings": {
        "model": "auto",
        "temperature": "1"
      },
      "visibility": "private"
    }
  },
  "message": "Agent rolled back to version 8. New version 10 is now active."
}

Response Fields

FieldTypeDescription
messagestringConfirmation message indicating the source version and the new active version
version.version_idintegerThe new version ID created by this rollback
version.published_bystringEmail of the user who performed the rollback
version.published_atstring (ISO8601)Timestamp when the rollback version was created
version.rollback_from_versionintegerThe version_id used as the source for this rollback
version.snapshotobjectComplete agent state restored by this rollback (same structure as Get Agent Version)

Error Responses

Already Active Version (422)

{
  "message": "Cannot roll back to the current active version."
}

Not Found (404)

{
  "message": "Version not found."
}

Forbidden (403)

{
  "message": "You do not have permission to roll back agent versions."
}