Publish tool
POST
https://app.sulus.ai/api/tools/{id}/publish
Publish a stored tool — reconstructs the builder model from the database and pushes it live
Authentication
Send a bearer token created on your dashboard's Developer page:
Authorization: Bearer <YOUR_API_KEY>
Path parameters
id
string
Required
The tool's public id.
Validation:
the tool's external_tool_id (UUID, or draft_… slug for drafts)Stored in
tools.external_tool_idErrors
| Status | Meaning | Body |
|---|---|---|
404 |
Tool not found, or outside your account scope | {"success":false,"message":"Tool not found"} |
403 |
Global tool mutation attempted by a non-super-admin | {"success":false,"message":"Global tools are read-only and cannot be edited or deleted."} |
422 |
Composition invalid for the live platform (e.g. a transferCall with no destinations) | {"success":false,"message":"Tool payload invalid: <detail>"} |
502 |
Live platform write failed | |
403 |
Workspace permission denied | |
401 |
Missing or invalid bearer token | |
403 |
Feature tools not enabled for the account |
Notes
- Takes no body — the currently stored tool row is what gets published.
- A draft id (draft_…) is published as a NEW live tool; a real id already carried by the row is patched in place.
- coreData mirrors the live voice platform's own tool object; only its id is guaranteed to appear — the rest of its shape is internal and not part of the documented contract (see Overview).
curl --request POST \
--url https://app.sulus.ai/api/tools/{id}/publish \
--header 'Authorization: Bearer <YOUR_API_KEY>'
import requests
url = "https://app.sulus.ai/api/tools/{id}/publish"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
response = requests.post(url, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://app.sulus.ai/api/tools/{id}/publish"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
200
{
"success": true,
"data": {
"name": "Loyalty Points Lookup",
"user_id": 42,
"external_tool_id": "e5f6a7b8-1c2d-4e3f-9a8b-7c6d5e4f3a2b",
"status": "published",
"created_by": 42,
"reseller_id": "f1e2d3c4-b5a6-4978-8901-234567890abc",
"workspace_id": "9a8b7c6d-5e4f-4a3b-9c8d-7e6f5a4b3c2d",
"type": "function",
"description": "Looks up loyalty points for a phone number.",
"function_def": {
"name": "loyalty_points_lookup",
"strict": true,
"parameters": [
{
"name": "phoneNumber",
"type": "string",
"required": true,
"description": "Caller's phone number"
}
]
},
"server": null,
"variable_extraction_plan": null,
"destinations": null,
"rejection_plan": null,
"messages": null,
"metadata": null,
"async": false,
"created_at": "2026-07-30T14:22:03+00:00",
"updated_at": "2026-07-30T14:30:52+00:00",
"user": {
"id": 42,
"name": "Jane Cooper",
"email": "[email protected]"
},
"creator": {
"id": 42,
"name": "Jane Cooper",
"email": "[email protected]"
},
"read_only": false,
"coreData": {
"id": "e5f6a7b8-1c2d-4e3f-9a8b-7c6d5e4f3a2b"
}
}
}
Response — POST
/tools/{id}/publish
200
{
"success": true,
"data": {
"name": "Loyalty Points Lookup",
"user_id": 42,
"external_tool_id": "e5f6a7b8-1c2d-4e3f-9a8b-7c6d5e4f3a2b",
"status": "published",
"created_by": 42,
"reseller_id": "f1e2d3c4-b5a6-4978-8901-234567890abc",
"workspace_id": "9a8b7c6d-5e4f-4a3b-9c8d-7e6f5a4b3c2d",
"type": "function",
"description": "Looks up loyalty points for a phone number.",
"function_def": {
"name": "loyalty_points_lookup",
"strict": true,
"parameters": [
{
"name": "phoneNumber",
"type": "string",
"required": true,
"description": "Caller's phone number"
}
]
},
"server": null,
"variable_extraction_plan": null,
"destinations": null,
"rejection_plan": null,
"messages": null,
"metadata": null,
"async": false,
"created_at": "2026-07-30T14:22:03+00:00",
"updated_at": "2026-07-30T14:30:52+00:00",
"user": {
"id": 42,
"name": "Jane Cooper",
"email": "[email protected]"
},
"creator": {
"id": 42,
"name": "Jane Cooper",
"email": "[email protected]"
},
"read_only": false,
"coreData": {
"id": "e5f6a7b8-1c2d-4e3f-9a8b-7c6d5e4f3a2b"
}
}
}