页面简介
Update an existing tool. All fields are optional. Only the fields you provide will be updated.
正文摘录
POST/v2/tools/{tool_id}Try itUpdate ToolcURLcurl --request POST \ --url https://api.bland.ai/v2/tools/{tool_id} \ --header 'Content-Type: application/json' \ --header 'authorization: <authorization>' \ --data ' { "name": "<string>", "description": "<string>", "integration": "<string>", "action": "<string>", "input_schema": {}, "body": {}, "speech": "<string>", "timeout": 123, "cache": true, "response_data": [ { "name": "<string>", "data": "<string>", "context": "<string>" } ], "max_retries": 123, "cooldown": 123, "resource_id": "<string>", "public": true, "label": "<string>" } 'Request (Partial Update)Response (Success)Error (TOOL_NOT_FOUND)Error (INVALID_PARAMETER)Error (TOOL_V2_UPDATE_VALIDATION_ERROR)Error (INVALID_TOOL_TYPE)Error (INTEGRATION_NOT_FOUND)Error (ACTION_NOT_FOUND)Error (RESOURCE_NOT_FOUND){ "description": "Sends an urgent message to a Slack channel", "timeout": 15000 } Headers authorizationstringrequiredYour API key for authentication. Path Parameters tool_idstringrequiredThe unique identifier of the tool to update. Body Parameters All fields are optional. Only fields included in the request body will be updated. namestringThe name the AI will see when deciding to use this tool. descriptionstringDescription of what the tool does. integrationstringThe integration key to update. Must be one of: bland-sms, custom-code, slack, salesforce, rest_api, hubspot, calendly, cal-com-v2, notion. actionstringThe action key to invoke within the integration. To discover available action keys, call GET /v1/integrations/{integration}/actions. Returns 400 ACTION_NOT_FOUND with the list of valid actions if the key is invalid. input_schemaobjectMust be a valid OpenAI function calling parameter schema. Defines the parameters the AI will fill in when invoking this tool. bodystring | objectRequest body template sent to the integration. speechstringText the AI says aloud while executing this tool. timeoutnumberMaximum time in milliseconds to wait for the integration. Minimum 1000, maximum 60000. cachebooleanWhether to cache the tool’s response. response_dataarrayDefines which fields to extract from the integration response.Show response_data itemnamestringrequiredVariable name to assign the extracted value.datastringrequiredJSON path to the value in the response.contextstringOptional description of what this data represents. max_retriesnumberNumber of times to retry the tool on failure. Minimum 0, maximum 4. cooldownnumberSeconds to wait between retries. Minimum 1, maximum 30. resource_idstringUUID of a connected resource (e.g. a Slack workspace or Salesforce org) to scope this tool to. The resource must be active and belong to your account. Returns 404 if the ID is invalid or inactive. To list available resource IDs for an integration, call GET /v1/integrations/{integration}/resources. publicbooleanWhether this tool is publicly visible. labelstringHuman-readable label for this tool. Response statusstring"success" on success, "error" on failure. data.idstringThe ID of the updated tool. errorsnull|arraynull on success, or a list of error objects if the request failed. Request (Partial Update)Response (Success)Error (TOOL_NOT_FOUND)Error (INVALID_PARAMETER)Error (TOOL_V2_UPDATE_VALIDATION_ERROR)Error (INVALID_TOOL_TYPE)Error (INTEGRATION_NOT_FOUND)Error (ACTION_NOT_FOUND)Error (RESOURCE_NOT_FOUND){ "description": "Sends an urgent message to a Slack channel", "timeout": 15000 } Docs for agents: llms.txtWas this page helpful?YesNoRaise issue⌘IUpdate ToolcURLcurl --request POST \ --url https://api.bland.ai/v2/tools/{tool_id} \ --header 'Content-Type: application/json' \ --header 'authorization: <authorization>' \ --data ' { "name": "<string>", "description": "<string>", "integration": "<string>", "action": "<string>", "input_schema": {}, "body": {}, "speech": "<string>", "timeout": 123, "cache": true, "response_data": [ { "name": "<string>", "data": "<string>", "context": "<string>" } ], "max_retries": 123, "cooldown": 123, "resource_id": "<string>", "public": true, "label": "<string>" } 'Request (Partial Update)Response (Success)Error (TOOL_NOT_FOUND)Error (INVALID_PARAMETER)Error (TOOL_V2_UPDATE_VALIDATION_ERROR)Error (INVALID_TOOL_TYPE)Error (INTEGRATION_NOT_FOUND)Error (ACTION_NOT_FOUND)Error (RESOURCE_NOT_FOUND){ "description": "Sends an urgent message to a Slack channel", "timeout": 15000 }