Restore an experiment version
import requests
url = "https://app.langwatch.ai/api/v1/experiments/{slug}/versions/{version}/restore"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/experiments/{slug}/versions/{version}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/v1/experiments/{slug}/versions/{version}/restore \
--header 'X-Auth-Token: <api-key>'{
"version": 123
}This response has no body data.This response has no body data.This response has no body data.Experiments
Restore an experiment version
Bring an old setup back by writing it forward as a new save. History is never rewritten: the version you restored from stays in the list, and the restore is one more entry after it.
POST
/
api
/
v1
/
experiments
/
{slug}
/
versions
/
{version}
/
restore
Restore an experiment version
import requests
url = "https://app.langwatch.ai/api/v1/experiments/{slug}/versions/{version}/restore"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://app.langwatch.ai/api/v1/experiments/{slug}/versions/{version}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://app.langwatch.ai/api/v1/experiments/{slug}/versions/{version}/restore \
--header 'X-Auth-Token: <api-key>'{
"version": 123
}This response has no body data.This response has no body data.This response has no body data.Authorizations
Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.
Path Parameters
Minimum string length:
1The version to restore, as listed by GET /api/experiments/{slug}/versions
Required range:
0 <= x <= 9007199254740991Response
Success
The new version the restore wrote. History is never rewritten, so the restored version is still in the list.
Last modified on October 12, 2026
Was this page helpful?