Update tool draft
PUT
https://app.sulus.ai/api/tools/{id}/draft
Update a draft — or demote a published tool to draft locally
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."} |
403 |
Workspace permission denied | |
401 |
Missing or invalid bearer token | |
403 |
Feature tools not enabled for the account |
Notes
- Accepts the same lenient body as draft creation; omitted fields keep their stored values.
- On a published tool the live tool keeps running untouched; only the local copy becomes a draft. Its external_tool_id is preserved so a later publish updates the same upstream tool.
- coreData is always null — the live platform is never contacted.
curl --request PUT \
--url https://app.sulus.ai/api/tools/{id}/draft \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Loyalty Points Lookup",
"type": "function",
"description": "Looks up loyalty points for a phone number.",
"parameters": [
{"name": "phoneNumber", "type": "string", "description": "Caller'\''s phone number", "required": true}
],
"strict": true
}'
import requests
url = "https://app.sulus.ai/api/tools/{id}/draft"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
payload = {
"name": "Loyalty Points Lookup",
"type": "function",
"description": "Looks up loyalty points for a phone number.",
"parameters": [
{"name": "phoneNumber", "type": "string", "description": "Caller's phone number", "required": true}
],
"strict": true
}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "https://app.sulus.ai/api/tools/{id}/draft"
payload := strings.NewReader(`{
"name": "Loyalty Points Lookup",
"type": "function",
"description": "Looks up loyalty points for a phone number.",
"parameters": [
{"name": "phoneNumber", "type": "string", "description": "Caller's phone number", "required": true}
],
"strict": true
}`)
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
req.Header.Add("Content-Type", "application/json")
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": "draft_Ab12Cd34Ef56",
"status": "draft",
"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:25:11+00:00",
"user": {
"id": 42,
"name": "Jane Cooper",
"email": "[email protected]"
},
"creator": {
"id": 42,
"name": "Jane Cooper",
"email": "[email protected]"
},
"read_only": false,
"coreData": null
}
}
Response — PUT
/tools/{id}/draft
200
{
"success": true,
"data": {
"name": "Loyalty Points Lookup",
"user_id": 42,
"external_tool_id": "draft_Ab12Cd34Ef56",
"status": "draft",
"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:25:11+00:00",
"user": {
"id": 42,
"name": "Jane Cooper",
"email": "[email protected]"
},
"creator": {
"id": 42,
"name": "Jane Cooper",
"email": "[email protected]"
},
"read_only": false,
"coreData": null
}
}