Skip to main content
PATCH /workflows/:id/tools/:toolId/stage-gate Gate a custom tool to specific funnel stages, so the agent only offers it once a lead reaches the right status.

Path Parameters

ParameterTypeRequiredDescription
idstring (uuid)YesAgent ID
toolIdstring (uuid)YesTool ID

Request Body

FieldTypeRequiredDescription
available_in_statusesstring[] | nullYesFunnel status keys where the tool is offered. null clears the gate, making it available in every status

Responses

200 — Updated

{
  "success": true,
  "tool": {
    "id": "9a1b2c3d-0000-4000-8000-000000000001",
    "name": "check_availability",
    "available_in_statuses": ["qualified", "negotiating"]
  }
}

400 — Validation error

{
  "error": "Invalid input",
  "message": "available_in_statuses must be an array of status keys, or null to clear"
}

401 — Authentication error

See Authentication.

404 — Not found

{
  "error": "Not found",
  "message": "Tool not found"
}

500 — Internal server error

Last modified on July 10, 2026