Sync tool assistants
PUT
https://app.sulus.ai/api/tools/{id}/assistants
Bulk attach/detach this tool across the caller's assistants
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_idRequest body
assistant_ids
array
Required
The full desired set of assistant public ids this tool should be attached to.
Validation:
present|arrayassistant_ids.*
string
Optional
Validation:
stringErrors
| 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 |
Tool is still a draft | {"success":false,"message":"Publish the tool first — drafts cannot be attached to assistants."} |
502 |
One or more assistant updates failed live | {"success":false,"message":"Some assistants could not be updated: <names>","data":{"attached":[…],"detached":[…],"failed":[…]}} |
422 |
Validation failed | {"message":"…","errors":{"field":["…"]}} |
401 |
Missing or invalid bearer token | |
403 |
Feature tools not enabled for the account |
Notes
- assistant_ids is the FULL desired set — any of the caller's assistants not listed are detached if currently attached.
- Only assistants whose attachment state actually changes are written to the live platform; unaffected assistants are skipped.
- Super admins may bulk-assign Global Tools; other roles cannot (Global Tools have no per-tool assignment UI for them — see Overview).
curl --request PUT \
--url https://app.sulus.ai/api/tools/{id}/assistants \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"assistant_ids": ["a1b2c3d4-1e2f-4a3b-8c9d-0e1f2a3b4c5d"]
}'
import requests
url = "https://app.sulus.ai/api/tools/{id}/assistants"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
payload = {
"assistant_ids": ["a1b2c3d4-1e2f-4a3b-8c9d-0e1f2a3b4c5d"]
}
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}/assistants"
payload := strings.NewReader(`{
"assistant_ids": ["a1b2c3d4-1e2f-4a3b-8c9d-0e1f2a3b4c5d"]
}`)
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,
"message": "Assistant assignments updated.",
"data": {
"attached": [
"Front Desk"
],
"detached": [
"After Hours"
],
"failed": []
}
}
Response — PUT
/tools/{id}/assistants
200
{
"success": true,
"message": "Assistant assignments updated.",
"data": {
"attached": [
"Front Desk"
],
"detached": [
"After Hours"
],
"failed": []
}
}