Skip to main content
PATCH
/
ai
/
tools
/
{tool_id}
Update AI tool
curl --request PATCH \
  --url https://api.wacht.dev/ai/tools/{tool_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "tool_type": "api",
  "configuration": {
    "type": "api",
    "endpoint": "https://api.example.com/users",
    "method": "GET",
    "authorization": {
      "authorize_as_user": true,
      "jwt_template_id": 123,
      "custom_headers": [
        {
          "name": "user_id",
          "field_type": "string",
          "required": true,
          "description": "User ID",
          "items_type": "string"
        }
      ]
    },
    "request_body_schema": [
      {
        "name": "user_id",
        "field_type": "string",
        "required": true,
        "description": "User ID",
        "items_type": "string"
      }
    ],
    "url_params_schema": [
      {
        "name": "user_id",
        "field_type": "string",
        "required": true,
        "description": "User ID",
        "items_type": "string"
      }
    ],
    "timeout_seconds": 30
  }
}
'
{
  "id": "1234567890123456789",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "name": "Get User Info",
  "description": "Retrieves user information",
  "tool_type": "api",
  "deployment_id": "9876543210987654321",
  "configuration": {
    "type": "api",
    "endpoint": "https://api.example.com/users",
    "method": "GET",
    "authorization": {
      "authorize_as_user": true,
      "jwt_template_id": 123,
      "custom_headers": [
        {
          "name": "user_id",
          "field_type": "string",
          "required": true,
          "description": "User ID",
          "items_type": "string"
        }
      ]
    },
    "request_body_schema": [
      {
        "name": "user_id",
        "field_type": "string",
        "required": true,
        "description": "User ID",
        "items_type": "string"
      }
    ],
    "url_params_schema": [
      {
        "name": "user_id",
        "field_type": "string",
        "required": true,
        "description": "User ID",
        "items_type": "string"
      }
    ],
    "timeout_seconds": 30
  }
}

Authorizations

Authorization
string
header
required

API key authentication (format: Bearer {api_key})

Path Parameters

tool_id
string
required

AI Tool ID

Body

application/json
name
string
description
string | null
tool_type
enum<string>
Available options:
api,
platform_event,
platform_function,
internal,
use_external_service
configuration
object

Response

AI tool updated

id
string
Example:

"1234567890123456789"

created_at
string<date-time>
Example:

"2024-01-15T10:30:00Z"

updated_at
string<date-time>
Example:

"2024-01-15T10:30:00Z"

name
string
Example:

"Get User Info"

description
string | null
Example:

"Retrieves user information"

tool_type
enum<string>

Type of AI tool

Available options:
api,
platform_event,
platform_function,
internal,
use_external_service
deployment_id
string
Example:

"9876543210987654321"

configuration
object