Publish a tool's draft
curl --request POST \
--url https://api.pomerado.ai/v1/code/{id}/draft/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"digest": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({digest: '<string>'})
};
fetch('https://api.pomerado.ai/v1/code/{id}/draft/publish', 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}/draft/publish"
payload = { "digest": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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>"
}
],
"base_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": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}Tools and integrations
Publish a tool's draft
Make your team’s draft of a tool’s code live, as the tool’s newest version.
POST
/
v1
/
code
/
{id}
/
draft
/
publish
Publish a tool's draft
curl --request POST \
--url https://api.pomerado.ai/v1/code/{id}/draft/publish \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"digest": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({digest: '<string>'})
};
fetch('https://api.pomerado.ai/v1/code/{id}/draft/publish', 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}/draft/publish"
payload = { "digest": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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>"
}
],
"base_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": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"docs_url": "<string>",
"details": {}
}
}Details
Details
- Business accounts only, with tools:build. Pomerado doesn’t check the draft’s code, so only an Owner or Admin signed in to the Dashboard publishes it, never an API key or an agent.
- Send the digest of the draft you saw. It publishes once a run of the draft passed on the live version, for free, and the draft is then gone.
- The draft’s files replace the live version’s, a repair’s included, with the inputs and outputs its run read. A public tool’s code is read only, so publishing its draft is forbidden.
- 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,draft_changed,draft_not_run,draft_not_publishable, 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"
Body
application/json
The draft's digest, as code.get answered it
Pattern:
^[0-9a-f]{64}$Response
The tool's code, with the draft 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