Restore an earlier version of a tool
curl --request POST \
--url https://api.pomerado.ai/v1/code/{id}/versions/{number}/restore \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pomerado.ai/v1/code/{id}/versions/{number}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pomerado.ai/v1/code/{id}/versions/{number}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"integration": {
"id": "int_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190",
"name": "<string>",
"site_url": "<string>",
"visibility": "public",
"tools": [
{
"id": "tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190",
"name": "<string>",
"effect": "read",
"live_version": {
"number": 123,
"published_at": "<string>",
"change": "build",
"requested_by": {
"user_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"restored_from": 123,
"restorable": true
},
"draft_changed_files": 123,
"login_required": true,
"http_version": true
}
]
},
"tool": {
"id": "tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190",
"name": "<string>",
"effect": "read",
"live_version": {
"number": 123,
"published_at": "<string>",
"change": "build",
"requested_by": {
"user_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"restored_from": 123,
"restorable": true
},
"draft_changed_files": 123,
"login_required": true,
"http_version": true
},
"versions": [
{
"number": 123,
"published_at": "<string>",
"change": "build",
"requested_by": {
"user_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"restored_from": 123,
"restorable": true
}
],
"files": [
{
"path": "<string>",
"source": "team",
"bytes": 123,
"content": "<string>"
}
],
"draft": {
"base_version": 123,
"digest": "<string>",
"changed": [
"<string>"
],
"updated_at": "<string>",
"updated_by": {
"user_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"passed_at": "<string>",
"files": [
{
"path": "<string>",
"content": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}Tools and integrations
Restore an earlier version of a tool
Make an earlier version of a tool your team built live again, as the tool’s newest version.
POST
/
v1
/
code
/
{id}
/
versions
/
{number}
/
restore
Restore an earlier version of a tool
curl --request POST \
--url https://api.pomerado.ai/v1/code/{id}/versions/{number}/restore \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.pomerado.ai/v1/code/{id}/versions/{number}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pomerado.ai/v1/code/{id}/versions/{number}/restore"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"integration": {
"id": "int_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190",
"name": "<string>",
"site_url": "<string>",
"visibility": "public",
"tools": [
{
"id": "tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190",
"name": "<string>",
"effect": "read",
"live_version": {
"number": 123,
"published_at": "<string>",
"change": "build",
"requested_by": {
"user_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"restored_from": 123,
"restorable": true
},
"draft_changed_files": 123,
"login_required": true,
"http_version": true
}
]
},
"tool": {
"id": "tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190",
"name": "<string>",
"effect": "read",
"live_version": {
"number": 123,
"published_at": "<string>",
"change": "build",
"requested_by": {
"user_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"restored_from": 123,
"restorable": true
},
"draft_changed_files": 123,
"login_required": true,
"http_version": true
},
"versions": [
{
"number": 123,
"published_at": "<string>",
"change": "build",
"requested_by": {
"user_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"restored_from": 123,
"restorable": true
}
],
"files": [
{
"path": "<string>",
"source": "team",
"bytes": 123,
"content": "<string>"
}
],
"draft": {
"base_version": 123,
"digest": "<string>",
"changed": [
"<string>"
],
"updated_at": "<string>",
"updated_by": {
"user_id": "<string>",
"name": "<string>",
"email": "<string>"
},
"passed_at": "<string>",
"files": [
{
"path": "<string>",
"content": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}Details
Details
- Business accounts only, with tools:build. The version’s code, inputs and outputs go live at once, for free. Restoring the live version, or the version it restored, changes nothing.
- A version can be restored when code.get lists it as restorable: not one published before Pomerado kept a record of each version, or one taken down.
- A public tool restores only a version Pomerado checked that keeps every input its callers send. Only an Owner or Admin signed in to the Dashboard restores a version Pomerado didn’t check, never an API key or an agent.
- Callers: an API key, an MCP OAuth token or a Dashboard session.
-
Permission:
tools:build. - Effect: Creates or changes something.
-
Errors:
business_account_required,not_found,version_not_restorable,restore_changes_inputs,restore_unchecked, and the errors any request can get.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
a tool ID: tool_ and 32 lowercase hex digits
Example:
"tool_0f8e2d1c4b3a49e8a7f6e5d4c3b2a190"
The version's number, as code.get lists it
Response
The tool's code, with the restored version live
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The tool's versions, newest first, at most 100
Show child attributes
Show child attributes
The live version's files, by path
Show child attributes
Show child attributes
Your team's draft of the tool, shared by every member, or null when it has none
Show child attributes
Show child attributes