Assign tool to workflow
curl --request POST \
--url https://api.getnexor.ai/api/public/client-tools/{id}/assign \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.getnexor.ai/api/public/client-tools/{id}/assign"
payload = { "workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({workflow_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.getnexor.ai/api/public/client-tools/{id}/assign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getnexor.ai/api/public/client-tools/{id}/assign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflow_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getnexor.ai/api/public/client-tools/{id}/assign"
payload := strings.NewReader("{\n \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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))
}HttpResponse<String> response = Unirest.post("https://api.getnexor.ai/api/public/client-tools/{id}/assign")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getnexor.ai/api/public/client-tools/{id}/assign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"workflow_tool": {
"id": "9a1b2c3d-0000-4000-8000-000000000001",
"name": "check_subscription",
"description": "Checks whether the lead has an active subscription",
"url": "https://api.acme.com/subscriptions/status",
"method": "GET",
"timeout_ms": 10000,
"parameters": {
"type": "object",
"properties": {}
},
"headers": {},
"query_parameters": {},
"is_active": true,
"sort_order": 0,
"workflow_id": "550e8400-e29b-41d4-a716-446655440000",
"source_tool_id": "7c1b2c3d-0000-4000-8000-000000000002",
"inherited": true,
"auto_run_on_entry": false,
"call_once": false,
"available_in_statuses": null
}
}{
"error": "Invalid input",
"message": "workflow_id is required"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "Not found",
"message": "Client tool not found"
}{
"error": "Conflict",
"message": "A tool named \"check_subscription\" already exists in this workflow"
}{
"error": "<string>",
"message": "<string>"
}Asignar Tool a Workflow
Assign a catalog tool to an agent. Inserts an inherited workflow tool that mirrors the catalog tool’s content fields and stays in sync with it on future PATCH /client-tools/ edits. Idempotent: re-assigning an already-assigned tool returns the existing assignment (still 200, no duplicate row). Both the client tool and the target agent must belong to the caller’s account.
POST
/
client-tools
/
{id}
/
assign
Assign tool to workflow
curl --request POST \
--url https://api.getnexor.ai/api/public/client-tools/{id}/assign \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.getnexor.ai/api/public/client-tools/{id}/assign"
payload = { "workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({workflow_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.getnexor.ai/api/public/client-tools/{id}/assign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.getnexor.ai/api/public/client-tools/{id}/assign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflow_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.getnexor.ai/api/public/client-tools/{id}/assign"
payload := strings.NewReader("{\n \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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))
}HttpResponse<String> response = Unirest.post("https://api.getnexor.ai/api/public/client-tools/{id}/assign")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getnexor.ai/api/public/client-tools/{id}/assign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"workflow_tool": {
"id": "9a1b2c3d-0000-4000-8000-000000000001",
"name": "check_subscription",
"description": "Checks whether the lead has an active subscription",
"url": "https://api.acme.com/subscriptions/status",
"method": "GET",
"timeout_ms": 10000,
"parameters": {
"type": "object",
"properties": {}
},
"headers": {},
"query_parameters": {},
"is_active": true,
"sort_order": 0,
"workflow_id": "550e8400-e29b-41d4-a716-446655440000",
"source_tool_id": "7c1b2c3d-0000-4000-8000-000000000002",
"inherited": true,
"auto_run_on_entry": false,
"call_once": false,
"available_in_statuses": null
}
}{
"error": "Invalid input",
"message": "workflow_id is required"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "Not found",
"message": "Client tool not found"
}{
"error": "Conflict",
"message": "A tool named \"check_subscription\" already exists in this workflow"
}{
"error": "<string>",
"message": "<string>"
}Autorizaciones
API key for authentication. Keys are prefixed with nxr_live_.
Parámetros de ruta
Client tool ID.
Cuerpo
application/json
Agent to assign the tool to.
Última modificación el 7 de agosto de 2026
⌘I