{
  "openapi": "3.1.0",
  "info": {
    "title": "Vorlek API",
    "version": "1.0.0",
    "description": "Public REST API for the Vorlek agent API aggregator."
  },
  "servers": [
    {
      "url": "https://api.vorlek.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Vorlek API key"
      }
    },
    "schemas": {
      "QuotaMeta": {
        "type": "object",
        "properties": {
          "used": {
            "type": "integer",
            "minimum": 0,
            "example": 42
          },
          "limit": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "example": 1000
          },
          "resets_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "check_skipped": {
            "type": "boolean",
            "example": false
          }
        },
        "required": [
          "used",
          "limit",
          "resets_at"
        ],
        "additionalProperties": false,
        "description": "Plan-period quota state.",
        "example": {
          "used": 42,
          "limit": 1000,
          "resets_at": "2026-05-01T00:00:00.000Z"
        }
      },
      "ResponseDetailLevel": {
        "type": "string",
        "enum": [
          "minimal",
          "standard",
          "full"
        ],
        "description": "Response verbosity. minimal trims envelope metadata, standard is the default, full adds operation lookup metadata.",
        "example": "standard"
      },
      "SuccessMeta": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "Canonical operation receipt identifier. Use this value with GET /v1/operations/{request_id}.",
            "example": "01HV0000000000000000000000"
          },
          "queue_time_ms": {
            "type": "number",
            "minimum": 0,
            "example": 2
          },
          "execution_time_ms": {
            "type": "number",
            "minimum": 0,
            "example": 234
          },
          "total_latency_ms": {
            "type": "number",
            "minimum": 0,
            "example": 236
          },
          "detail": {
            "$ref": "#/components/schemas/ResponseDetailLevel"
          },
          "operation": {
            "type": "object",
            "properties": {
              "receipt_id_field": {
                "type": "string",
                "enum": [
                  "meta.request_id"
                ]
              },
              "receipt_id": {
                "type": "string",
                "example": "01HV0000000000000000000000"
              },
              "lookup_path": {
                "type": "string",
                "example": "/v1/operations/01HV0000000000000000000000"
              }
            },
            "required": [
              "receipt_id_field",
              "receipt_id",
              "lookup_path"
            ],
            "additionalProperties": false,
            "description": "Present on detail=full responses for same-surface operation lookup."
          },
          "quota": {
            "$ref": "#/components/schemas/QuotaMeta"
          },
          "ratelimit": {
            "type": "object",
            "properties": {
              "check_skipped": {
                "type": "boolean",
                "example": false
              }
            },
            "additionalProperties": false
          },
          "idempotency": {
            "type": "object",
            "properties": {
              "replay": {
                "type": "boolean"
              }
            },
            "required": [
              "replay"
            ],
            "additionalProperties": false
          },
          "provider_metadata": {
            "type": "object",
            "additionalProperties": {}
          },
          "job": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "pending"
                ]
              },
              "job_id": {
                "type": "string",
                "example": "job_abc123"
              },
              "hint": {
                "type": "string",
                "example": "Use get_contact readback before replaying."
              }
            },
            "required": [
              "status",
              "job_id",
              "hint"
            ],
            "additionalProperties": false
          },
          "test_mode": {
            "type": "boolean",
            "example": true
          }
        },
        "required": [
          "request_id",
          "queue_time_ms",
          "execution_time_ms",
          "total_latency_ms",
          "quota"
        ],
        "additionalProperties": false,
        "description": "Success envelope metadata."
      },
      "ErrorCategory": {
        "type": "string",
        "enum": [
          "user_input",
          "provider_fault",
          "transient",
          "system"
        ],
        "description": "Stable server-side error category.",
        "example": "user_input"
      },
      "ErrorEnvelope": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "error"
            ]
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "INVALID_PARAMS"
              },
              "message": {
                "type": "string",
                "example": "Request validation failed."
              },
              "category": {
                "$ref": "#/components/schemas/ErrorCategory"
              },
              "retry_safe": {
                "type": "boolean",
                "example": false
              },
              "provider": {
                "type": "string",
                "example": "storage_fixture"
              },
              "fix": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "example": "fix_request_body"
                  },
                  "hint": {
                    "type": "string",
                    "example": "Check the field-level validation detail."
                  }
                },
                "required": [
                  "action",
                  "hint"
                ],
                "additionalProperties": false
              },
              "detail": {}
            },
            "required": [
              "code",
              "message",
              "category",
              "retry_safe"
            ],
            "additionalProperties": false
          },
          "meta": {
            "type": "object",
            "properties": {
              "request_id": {
                "type": "string",
                "example": "01HV0000000000000000000000"
              },
              "total_latency_ms": {
                "type": "number",
                "minimum": 0,
                "example": 87
              },
              "quota": {
                "$ref": "#/components/schemas/QuotaMeta"
              },
              "test_mode": {
                "type": "boolean",
                "example": true
              }
            },
            "required": [
              "request_id"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "status",
          "error",
          "meta"
        ],
        "additionalProperties": false,
        "description": "Canonical Vorlek error envelope.",
        "example": {
          "status": "error",
          "error": {
            "code": "INVALID_PARAMS",
            "message": "Request validation failed.",
            "category": "user_input",
            "retry_safe": false
          },
          "meta": {
            "request_id": "01HV0000000000000000000000"
          }
        }
      },
      "UpsertContactInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "sendgrid",
              "mailchimp",
              "klaviyo"
            ]
          },
          "email": {
            "type": "string",
            "maxLength": 320,
            "format": "email"
          },
          "first_name": {
            "type": "string",
            "maxLength": 255
          },
          "last_name": {
            "type": "string",
            "maxLength": 255
          },
          "phone": {
            "type": "string",
            "maxLength": 64
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            }
          }
        },
        "required": [
          "provider",
          "email"
        ],
        "additionalProperties": false,
        "description": "Create or update one contact at a connected provider.",
        "example": {
          "provider": "sendgrid",
          "email": "jamie@example.com",
          "first_name": "Jamie",
          "properties": {
            "plan": "free"
          }
        }
      },
      "Provider": {
        "type": "string",
        "enum": [
          "sendgrid",
          "mailchimp",
          "klaviyo",
          "dropbox",
          "telegram"
        ],
        "description": "Supported provider identifier.",
        "example": "sendgrid"
      },
      "UpsertContactData": {
        "type": "object",
        "properties": {
          "contact_id": {
            "type": "string",
            "example": "f1ec8680-0000-4000-8000-000000000000"
          },
          "action": {
            "type": "string",
            "enum": [
              "created",
              "updated",
              "upserted"
            ],
            "example": "upserted"
          },
          "fields_auto_created": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "plan"
            ]
          },
          "provider": {
            "$ref": "#/components/schemas/Provider"
          }
        },
        "required": [
          "contact_id",
          "action",
          "fields_auto_created",
          "provider"
        ],
        "additionalProperties": false,
        "description": "Normalized upsert_contact result."
      },
      "GetContactInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "sendgrid",
              "mailchimp",
              "klaviyo"
            ]
          },
          "email": {
            "type": "string",
            "maxLength": 320,
            "format": "email"
          }
        },
        "required": [
          "provider",
          "email"
        ],
        "additionalProperties": false,
        "description": "Read one contact by email for read-after-write verification.",
        "example": {
          "provider": "sendgrid",
          "email": "jamie@example.com"
        }
      },
      "GetContactData": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "jamie@example.com"
          },
          "found": {
            "type": "boolean",
            "example": true
          },
          "contact": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "contact_id": {
                "type": "string",
                "example": "sg_contact_123"
              },
              "email": {
                "type": "string",
                "format": "email",
                "example": "jamie@example.com"
              },
              "first_name": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "Jamie"
              },
              "last_name": {
                "type": [
                  "string",
                  "null"
                ],
                "example": null
              },
              "phone": {
                "type": [
                  "string",
                  "null"
                ],
                "example": null
              },
              "properties": {
                "type": "object",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    },
                    {
                      "type": "null"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "example": {
                  "plan": "free"
                }
              },
              "updated_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "ISO 8601 timestamp.",
                "example": null
              }
            },
            "required": [
              "contact_id",
              "email",
              "first_name",
              "last_name",
              "phone",
              "properties",
              "updated_at"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "provider",
          "email",
          "found",
          "contact"
        ],
        "additionalProperties": false,
        "description": "Normalized get_contact result."
      },
      "GetConnectionStatusInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "sendgrid",
              "mailchimp",
              "klaviyo"
            ]
          }
        },
        "required": [
          "provider"
        ],
        "additionalProperties": false,
        "description": "Check whether a connected provider credential is active.",
        "example": {
          "provider": "sendgrid"
        }
      },
      "ConnectionStatusData": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "invalid",
              "unreachable"
            ],
            "example": "active"
          },
          "last_validated_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "account_info": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                },
                {
                  "type": "null"
                }
              ]
            },
            "example": {
              "account_name": "Dogfood Workspace"
            }
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "example": "PROVIDER_AUTH_INVALID"
              },
              "message": {
                "type": "string",
                "example": "Klaviyo rejected the API key (401)."
              }
            },
            "required": [
              "code",
              "message"
            ],
            "description": "Present when status is invalid or unreachable."
          }
        },
        "required": [
          "provider",
          "status",
          "last_validated_at",
          "account_info"
        ],
        "additionalProperties": false,
        "description": "Normalized provider connection status."
      },
      "SendTransactionalInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "sendgrid",
              "mailchimp",
              "klaviyo"
            ]
          },
          "to": {
            "type": "string",
            "maxLength": 320,
            "format": "email"
          },
          "from": {
            "type": "string",
            "maxLength": 320,
            "format": "email"
          },
          "subject": {
            "type": "string",
            "maxLength": 998
          },
          "template_id": {
            "type": "string",
            "maxLength": 255
          },
          "html": {
            "type": "string",
            "maxLength": 1000000
          },
          "text": {
            "type": "string",
            "maxLength": 1000000
          },
          "variables": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            }
          }
        },
        "required": [
          "provider",
          "to",
          "subject"
        ],
        "additionalProperties": false,
        "description": "Send one transactional email through a supported provider.",
        "example": {
          "provider": "sendgrid",
          "to": "recipient@example.com",
          "subject": "Hello",
          "text": "Hello from Vorlek"
        }
      },
      "SendTransactionalData": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "message_id": {
            "type": "string",
            "example": "msg_123"
          },
          "action": {
            "type": "string",
            "enum": [
              "sent"
            ]
          }
        },
        "required": [
          "provider",
          "message_id",
          "action"
        ],
        "additionalProperties": false,
        "description": "Normalized send_transactional result."
      },
      "GetCampaignStatsInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "sendgrid",
              "mailchimp",
              "klaviyo"
            ]
          },
          "campaign_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        },
        "required": [
          "provider",
          "campaign_id"
        ],
        "additionalProperties": false,
        "description": "Fetch normalized campaign metrics.",
        "example": {
          "provider": "sendgrid",
          "campaign_id": "campaign_123"
        }
      },
      "CampaignStatsData": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "campaign_id": {
            "type": "string",
            "example": "campaign_123"
          },
          "sent": {
            "type": "integer",
            "minimum": 0,
            "example": 1000
          },
          "opens": {
            "type": "integer",
            "minimum": 0,
            "example": 420
          },
          "clicks": {
            "type": "integer",
            "minimum": 0,
            "example": 120
          },
          "bounces": {
            "type": "integer",
            "minimum": 0,
            "example": 8
          },
          "unsubscribes": {
            "type": "integer",
            "minimum": 0,
            "example": 3
          },
          "period": {
            "type": "object",
            "properties": {
              "start": {
                "type": "string",
                "format": "date-time",
                "description": "ISO 8601 timestamp.",
                "example": "2026-04-27T12:00:00.000Z"
              },
              "end": {
                "type": "string",
                "format": "date-time",
                "description": "ISO 8601 timestamp.",
                "example": "2026-04-27T12:00:00.000Z"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "additionalProperties": false,
            "example": {
              "start": "2026-04-01T00:00:00.000Z",
              "end": "2026-04-27T00:00:00.000Z"
            }
          }
        },
        "required": [
          "provider",
          "campaign_id",
          "sent",
          "opens",
          "clicks",
          "bounces",
          "unsubscribes",
          "period"
        ],
        "additionalProperties": false,
        "description": "Normalized get_campaign_stats result."
      },
      "ListTemplatesInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "sendgrid",
              "mailchimp",
              "klaviyo"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "minLength": 1
          },
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "provider"
        ],
        "additionalProperties": false,
        "description": "List provider templates with normalized cursor pagination and optional page-scoped query filtering.",
        "example": {
          "provider": "sendgrid",
          "limit": 25,
          "query": "welcome"
        }
      },
      "ListTemplatesData": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "templates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "tmpl_123"
                },
                "name": {
                  "type": "string",
                  "example": "Welcome email"
                },
                "subject": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": null
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "ISO 8601 timestamp.",
                  "example": "2026-04-27T12:00:00.000Z"
                }
              },
              "required": [
                "id",
                "name",
                "subject",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "search": {
            "type": "object",
            "properties": {
              "query": {
                "type": "string",
                "example": "welcome"
              },
              "status": {
                "type": "string",
                "enum": [
                  "matched",
                  "no_match"
                ],
                "example": "matched"
              },
              "matched_count": {
                "type": "integer",
                "minimum": 0,
                "example": 1
              },
              "searched_fields": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "id",
                    "name",
                    "subject"
                  ]
                },
                "example": [
                  "id",
                  "name",
                  "subject"
                ]
              },
              "scope": {
                "type": "string",
                "enum": [
                  "returned_page"
                ],
                "example": "returned_page"
              },
              "no_match": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "NO_TEMPLATE_MATCH"
                    ],
                    "example": "NO_TEMPLATE_MATCH"
                  },
                  "message": {
                    "type": "string",
                    "example": "No templates matched \"renewal\" on the returned page."
                  },
                  "suggested_action": {
                    "type": "string",
                    "enum": [
                      "retry_without_query_or_broaden_query"
                    ],
                    "example": "retry_without_query_or_broaden_query"
                  },
                  "hint": {
                    "type": "string",
                    "example": "Call list_templates without query to inspect available templates, broaden the query, or continue with next_cursor if present."
                  }
                },
                "required": [
                  "code",
                  "message",
                  "suggested_action",
                  "hint"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "query",
              "status",
              "matched_count",
              "searched_fields",
              "scope"
            ],
            "additionalProperties": false,
            "description": "Present when request body includes query."
          }
        },
        "required": [
          "provider",
          "templates",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Normalized list_templates result."
      },
      "ListCampaignsInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "sendgrid",
              "mailchimp",
              "klaviyo"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "scheduled",
              "sent",
              "all"
            ],
            "default": "all"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 25
          },
          "cursor": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "provider"
        ],
        "additionalProperties": false,
        "description": "List provider campaigns with normalized status and cursor pagination.",
        "example": {
          "provider": "sendgrid",
          "status": "all",
          "limit": 25
        }
      },
      "ListCampaignsData": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "campaigns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "camp_123"
                },
                "name": {
                  "type": "string",
                  "example": "Spring promo"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "scheduled",
                    "sent",
                    "unknown"
                  ],
                  "example": "sent"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time",
                  "description": "ISO 8601 timestamp.",
                  "example": "2026-04-27T12:00:00.000Z"
                }
              },
              "required": [
                "id",
                "name",
                "status",
                "updated_at"
              ],
              "additionalProperties": false
            }
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          }
        },
        "required": [
          "provider",
          "campaigns",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Normalized list_campaigns result."
      },
      "CatalogConnection": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean",
            "example": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "invalid",
              "unreachable",
              "missing",
              "test_mode"
            ],
            "example": "active"
          },
          "last_validated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "account_name": {
            "type": "string",
            "example": "Dogfood Workspace"
          }
        },
        "required": [
          "configured",
          "status",
          "last_validated_at"
        ],
        "additionalProperties": false,
        "description": "Account-specific connection state for one provider."
      },
      "CatalogProviderSupport": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "supported": {
            "type": "boolean",
            "example": true
          },
          "unsupported_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "requires_connection": {
            "type": "boolean",
            "example": true
          },
          "required_connection_config": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "api_key"
            ]
          },
          "connection": {
            "$ref": "#/components/schemas/CatalogConnection"
          }
        },
        "required": [
          "provider",
          "supported",
          "unsupported_reason",
          "requires_connection",
          "required_connection_config",
          "connection"
        ],
        "additionalProperties": false,
        "description": "Support state for one tool/provider cell."
      },
      "CatalogToolName": {
        "type": "string",
        "enum": [
          "upsert_contact",
          "get_contact",
          "get_connection_status",
          "send_transactional",
          "get_campaign_stats",
          "list_templates",
          "list_campaigns"
        ],
        "description": "Vorlek tool name exposed in the account catalog.",
        "example": "upsert_contact"
      },
      "CatalogTool": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/CatalogToolName"
          },
          "description": {
            "type": "string"
          },
          "docs_url": {
            "type": "string",
            "format": "uri"
          },
          "response": {
            "type": "object",
            "properties": {
              "detail_parameter_supported": {
                "type": "boolean",
                "example": true
              },
              "default_detail": {
                "type": "string",
                "enum": [
                  "standard"
                ]
              },
              "supported_detail_levels": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "string",
                    "enum": [
                      "minimal"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "standard"
                    ]
                  },
                  {
                    "type": "string",
                    "enum": [
                      "full"
                    ]
                  }
                ]
              },
              "unsupported_detail_levels": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ResponseDetailLevel"
                },
                "maxItems": 0
              },
              "operation_receipt_id": {
                "type": "string",
                "enum": [
                  "meta.request_id"
                ]
              },
              "operation_lookup_path": {
                "type": "string",
                "enum": [
                  "/v1/operations/{request_id}"
                ]
              }
            },
            "required": [
              "detail_parameter_supported",
              "default_detail",
              "supported_detail_levels",
              "unsupported_detail_levels",
              "operation_receipt_id",
              "operation_lookup_path"
            ],
            "additionalProperties": false
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogProviderSupport"
            }
          }
        },
        "required": [
          "name",
          "description",
          "docs_url",
          "response",
          "providers"
        ],
        "additionalProperties": false,
        "description": "Catalog metadata for one Vorlek tool."
      },
      "CatalogProvider": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "display_name": {
            "type": "string",
            "example": "SendGrid"
          },
          "connection": {
            "$ref": "#/components/schemas/CatalogConnection"
          },
          "supported_tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogToolName"
            }
          },
          "unsupported_tools": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "$ref": "#/components/schemas/CatalogToolName"
                },
                "reason": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "reason"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "provider",
          "display_name",
          "connection",
          "supported_tools",
          "unsupported_tools"
        ],
        "additionalProperties": false,
        "description": "Account-aware provider catalog summary."
      },
      "CatalogData": {
        "type": "object",
        "properties": {
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ],
            "example": "live"
          },
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogProvider"
            }
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogTool"
            }
          }
        },
        "required": [
          "generated_at",
          "mode",
          "providers",
          "tools"
        ],
        "additionalProperties": false,
        "description": "Account-aware provider and tool catalog."
      },
      "WorkflowDomain": {
        "type": "string",
        "enum": [
          "marketing",
          "storage",
          "communication",
          "inbox",
          "markets"
        ],
        "description": "Normalized domain identifier for Layer 6 workflow composition.",
        "example": "storage"
      },
      "WorkflowMissingPrecondition": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "connection",
              "scope",
              "confirmation",
              "unsupported_provider",
              "mode"
            ],
            "example": "confirmation"
          },
          "domain": {
            "$ref": "#/components/schemas/WorkflowDomain"
          },
          "provider": {
            "type": "string",
            "example": "slack"
          },
          "capability": {
            "type": "string",
            "description": "Layer 6 capability identifier in domain.action form.",
            "example": "communication.send_message"
          },
          "step_id": {
            "type": "string",
            "example": "send_summary"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "chat:write"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "additionalProperties": false,
        "description": "Missing requirement that prevents a workflow recipe or plan."
      },
      "WorkflowProvider": {
        "type": "string",
        "enum": [
          "sendgrid",
          "mailchimp",
          "klaviyo",
          "dropbox",
          "google_drive",
          "storage_fixture",
          "telegram",
          "slack",
          "communication_fixture",
          "kalshi",
          "polymarket"
        ],
        "description": "Provider identifier used by workflow recipes and validation.",
        "example": "storage_fixture"
      },
      "WorkflowConnection": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/WorkflowProvider"
          },
          "domain": {
            "$ref": "#/components/schemas/WorkflowDomain"
          },
          "configured": {
            "type": "boolean",
            "example": true
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "invalid",
              "unreachable",
              "missing",
              "test_mode"
            ],
            "example": "test_mode"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "chat:write"
            ]
          },
          "last_validated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          }
        },
        "required": [
          "provider",
          "domain",
          "configured",
          "status",
          "scopes",
          "last_validated_at"
        ],
        "additionalProperties": false,
        "description": "Account-specific Layer 6 connection state."
      },
      "WorkflowRecipe": {
        "type": "object",
        "properties": {
          "recipe_id": {
            "type": "string",
            "example": "storage_to_comms_summary"
          },
          "version": {
            "type": "string",
            "example": "2026-05-10"
          },
          "title": {
            "type": "string",
            "example": "Summarize a stored document to a team channel"
          },
          "summary": {
            "type": "string"
          },
          "intent": {
            "type": "string",
            "example": "share_context"
          },
          "domains": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowDomain"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "available",
              "partially_available",
              "planned"
            ],
            "example": "available"
          },
          "required_capabilities": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "domain": {
                  "$ref": "#/components/schemas/WorkflowDomain"
                },
                "capability": {
                  "type": "string",
                  "description": "Layer 6 capability identifier in domain.action form.",
                  "example": "communication.send_message"
                },
                "access": {
                  "type": "string",
                  "enum": [
                    "read",
                    "write"
                  ],
                  "example": "read"
                },
                "provider_any_of": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WorkflowProvider"
                  }
                }
              },
              "required": [
                "domain",
                "capability",
                "access",
                "provider_any_of"
              ],
              "additionalProperties": false
            }
          },
          "inputs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "example": "source_query"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "string",
                    "boolean",
                    "number"
                  ],
                  "example": "string"
                },
                "required": {
                  "type": "boolean",
                  "example": true
                },
                "description": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "type",
                "required",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "step_id": {
                  "type": "string",
                  "example": "send_summary"
                },
                "capability": {
                  "type": "string",
                  "description": "Layer 6 capability identifier in domain.action form.",
                  "example": "communication.send_message"
                },
                "depends_on": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "example": [
                    "find_source_file"
                  ]
                },
                "read_only": {
                  "type": "boolean",
                  "example": false
                },
                "requires_confirmation": {
                  "type": "boolean",
                  "example": true
                }
              },
              "required": [
                "step_id",
                "capability",
                "depends_on",
                "read_only",
                "requires_confirmation"
              ],
              "additionalProperties": false
            }
          },
          "verification": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "step_id": {
                  "type": "string",
                  "example": "verify_message"
                },
                "capability": {
                  "type": "string",
                  "description": "Layer 6 capability identifier in domain.action form.",
                  "example": "communication.send_message"
                },
                "expected": {
                  "type": "string"
                }
              },
              "required": [
                "step_id",
                "capability",
                "expected"
              ],
              "additionalProperties": false
            }
          },
          "risk": {
            "type": "object",
            "properties": {
              "level": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "blocked"
                ],
                "example": "medium"
              },
              "reasons": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "safe_mode": {
                "type": "string",
                "example": "draft_or_confirm_before_send"
              }
            },
            "required": [
              "level",
              "reasons",
              "safe_mode"
            ],
            "additionalProperties": false
          },
          "availability": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "available",
                  "partially_available",
                  "planned"
                ]
              },
              "missing_preconditions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WorkflowMissingPrecondition"
                }
              }
            },
            "required": [
              "status",
              "missing_preconditions"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "recipe_id",
          "version",
          "title",
          "summary",
          "intent",
          "domains",
          "status",
          "required_capabilities",
          "inputs",
          "steps",
          "verification",
          "risk",
          "availability"
        ],
        "additionalProperties": false,
        "description": "Layer 6 workflow recipe plus account-specific availability."
      },
      "WorkflowRecipeListData": {
        "type": "object",
        "properties": {
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ],
            "example": "test"
          },
          "recipes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowRecipe"
            }
          },
          "available_connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowConnection"
            }
          },
          "missing_preconditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowMissingPrecondition"
            }
          }
        },
        "required": [
          "generated_at",
          "mode",
          "recipes",
          "available_connections",
          "missing_preconditions"
        ],
        "additionalProperties": false,
        "description": "Layer 6 workflow recipe discovery result."
      },
      "ValidateWorkflowPlanInput": {
        "type": "object",
        "properties": {
          "recipe_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "constraints": {
            "type": "object",
            "properties": {
              "allow_external_writes": {
                "type": "boolean"
              },
              "require_confirmation_for_writes": {
                "type": "boolean"
              },
              "max_steps": {
                "type": "integer",
                "minimum": 1,
                "maximum": 25
              }
            },
            "additionalProperties": false
          },
          "confirmations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "step_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "confirmed": {
                  "type": "boolean"
                }
              },
              "required": [
                "step_id",
                "confirmed"
              ],
              "additionalProperties": false
            },
            "default": []
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "step_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "capability": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "provider": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "depends_on": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "default": []
                },
                "arguments": {
                  "type": "object",
                  "additionalProperties": {},
                  "default": {}
                }
              },
              "required": [
                "step_id",
                "capability"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 50
          }
        },
        "required": [
          "steps"
        ],
        "additionalProperties": false,
        "description": "Validate a proposed Layer 6 workflow plan without executing it.",
        "example": {
          "recipe_id": "storage_to_comms_summary",
          "confirmations": [
            {
              "step_id": "send_summary",
              "confirmed": true
            }
          ],
          "steps": [
            {
              "step_id": "find_source_file",
              "capability": "storage.search_files",
              "provider": "storage_fixture",
              "arguments": {
                "query": "launch brief"
              }
            },
            {
              "step_id": "send_summary",
              "capability": "communication.send_message",
              "provider": "communication_fixture",
              "depends_on": [
                "find_source_file"
              ],
              "arguments": {
                "text": "Draft summary"
              }
            }
          ]
        }
      },
      "WorkflowValidationIssue": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "example": "CONFIRMATION_REQUIRED"
          },
          "severity": {
            "type": "string",
            "enum": [
              "blocking",
              "warning"
            ],
            "example": "blocking"
          },
          "step_id": {
            "type": "string",
            "example": "send_summary"
          },
          "capability": {
            "type": "string",
            "description": "Layer 6 capability identifier in domain.action form.",
            "example": "communication.send_message"
          },
          "provider": {
            "type": "string",
            "example": "slack"
          },
          "message": {
            "type": "string"
          },
          "fix": {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "example": "confirm_step"
              },
              "hint": {
                "type": "string"
              }
            },
            "required": [
              "action",
              "hint"
            ],
            "additionalProperties": false
          },
          "detail": {}
        },
        "required": [
          "code",
          "severity",
          "message"
        ],
        "additionalProperties": false,
        "description": "Workflow validation issue or warning."
      },
      "WorkflowPlanValidationData": {
        "type": "object",
        "properties": {
          "validation": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "valid",
                  "valid_with_warnings",
                  "invalid"
                ],
                "example": "invalid"
              },
              "summary": {
                "type": "string"
              },
              "issues": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WorkflowValidationIssue"
                }
              },
              "warnings": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WorkflowValidationIssue"
                }
              }
            },
            "required": [
              "status",
              "summary",
              "issues",
              "warnings"
            ],
            "additionalProperties": false
          },
          "effects": {
            "type": "object",
            "properties": {
              "reads": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "domain": {
                      "$ref": "#/components/schemas/WorkflowDomain"
                    },
                    "provider": {
                      "type": "string",
                      "example": "storage_fixture"
                    },
                    "capability": {
                      "type": "string",
                      "description": "Layer 6 capability identifier in domain.action form.",
                      "example": "communication.send_message"
                    }
                  },
                  "required": [
                    "domain",
                    "provider",
                    "capability"
                  ],
                  "additionalProperties": false
                }
              },
              "writes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "domain": {
                      "$ref": "#/components/schemas/WorkflowDomain"
                    },
                    "provider": {
                      "type": "string",
                      "example": "communication_fixture"
                    },
                    "capability": {
                      "type": "string",
                      "description": "Layer 6 capability identifier in domain.action form.",
                      "example": "communication.send_message"
                    },
                    "requires_confirmation": {
                      "type": "boolean",
                      "example": true
                    }
                  },
                  "required": [
                    "domain",
                    "provider",
                    "capability",
                    "requires_confirmation"
                  ],
                  "additionalProperties": false
                }
              },
              "external_side_effects": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "communication_message"
                ]
              }
            },
            "required": [
              "reads",
              "writes",
              "external_side_effects"
            ],
            "additionalProperties": false
          },
          "missing_preconditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowMissingPrecondition"
            }
          },
          "safe_to_execute": {
            "type": "boolean",
            "example": false
          }
        },
        "required": [
          "validation",
          "effects",
          "missing_preconditions",
          "safe_to_execute"
        ],
        "additionalProperties": false,
        "description": "Workflow validation result. Invalid plans still return 200."
      },
      "StorageFileSummary": {
        "type": "object",
        "properties": {
          "file_id": {
            "type": "string",
            "example": "test_file_abc123"
          },
          "name": {
            "type": "string",
            "example": "launch-brief.md"
          },
          "path": {
            "type": "string",
            "example": "/drive/launch/launch-brief.md"
          },
          "mime_type": {
            "type": "string",
            "example": "text/markdown"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0,
            "example": 512
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "source": {
            "type": "string",
            "enum": [
              "fixture",
              "created",
              "provider"
            ],
            "example": "fixture"
          },
          "content_preview": {
            "type": "string"
          }
        },
        "required": [
          "file_id",
          "name",
          "path",
          "mime_type",
          "size_bytes",
          "updated_at",
          "source",
          "content_preview"
        ],
        "additionalProperties": false,
        "description": "Storage file summary for fixture or supported live providers."
      },
      "StorageFile": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StorageFileSummary"
          },
          {
            "type": "object",
            "properties": {
              "content": {
                "type": "string"
              },
              "content_sha256": {
                "type": "string",
                "example": "8f14e45fceea167a5a36dedd4bea2543f5f2a15108d9f5e6"
              }
            },
            "required": [
              "content",
              "content_sha256"
            ],
            "additionalProperties": false
          }
        ],
        "description": "Storage file with content for fixture or supported live providers."
      },
      "WorkflowToolVerification": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string",
            "example": "communication_get_thread"
          },
          "arguments": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "tool",
          "arguments"
        ],
        "additionalProperties": false,
        "description": "Suggested follow-up readback call for fixture verification."
      },
      "StorageSearchFilesInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "storage_fixture",
              "dropbox"
            ]
          },
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 240
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "default": 5
          }
        },
        "required": [
          "provider",
          "query"
        ],
        "additionalProperties": false,
        "description": "Search Layer 6 storage files. storage_fixture requires a test-mode key; dropbox requires a live connection.",
        "example": {
          "provider": "storage_fixture",
          "query": "launch",
          "limit": 5
        }
      },
      "StorageSearchFilesData": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "storage_fixture",
              "dropbox"
            ],
            "description": "Layer 6 storage provider. storage_fixture requires a test-mode key; dropbox requires a live connection.",
            "example": "storage_fixture"
          },
          "query": {
            "type": "string",
            "example": "launch"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageFileSummary"
            }
          },
          "next_cursor": {
            "type": "null"
          }
        },
        "required": [
          "provider",
          "query",
          "files",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Storage search result."
      },
      "StorageGetFileInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "storage_fixture",
              "dropbox"
            ]
          },
          "file_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        },
        "required": [
          "provider",
          "file_id"
        ],
        "additionalProperties": false,
        "description": "Read a Layer 6 storage file. storage_fixture requires a test-mode key; dropbox requires a live connection.",
        "example": {
          "provider": "storage_fixture",
          "file_id": "test_file_abc123"
        }
      },
      "StorageGetFileData": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "storage_fixture",
              "dropbox"
            ],
            "description": "Layer 6 storage provider. storage_fixture requires a test-mode key; dropbox requires a live connection.",
            "example": "storage_fixture"
          },
          "file": {
            "$ref": "#/components/schemas/StorageFile"
          }
        },
        "required": [
          "provider",
          "file"
        ],
        "additionalProperties": false,
        "description": "Storage file readback result."
      },
      "StorageListRecentFilesInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "storage_fixture",
              "dropbox"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "default": 5
          }
        },
        "required": [
          "provider"
        ],
        "additionalProperties": false,
        "description": "List recent Layer 6 storage files. storage_fixture requires a test-mode key; dropbox requires a live connection.",
        "example": {
          "provider": "storage_fixture",
          "limit": 5
        }
      },
      "StorageListRecentFilesData": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "storage_fixture",
              "dropbox"
            ],
            "description": "Layer 6 storage provider. storage_fixture requires a test-mode key; dropbox requires a live connection.",
            "example": "storage_fixture"
          },
          "files": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StorageFileSummary"
            }
          },
          "next_cursor": {
            "type": "null"
          }
        },
        "required": [
          "provider",
          "files",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Recent storage file list."
      },
      "StorageCreateFileInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "storage_fixture",
              "dropbox"
            ]
          },
          "path": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "maxLength": 65536
          },
          "mime_type": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "default": "text/plain"
          },
          "overwrite": {
            "type": "boolean",
            "default": false
          },
          "confirmed": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "provider",
          "path",
          "content",
          "confirmed"
        ],
        "additionalProperties": false,
        "description": "Create a Layer 6 storage file. storage_fixture requires a test-mode key; dropbox requires a live connection and confirmed=true.",
        "example": {
          "provider": "storage_fixture",
          "path": "/scratch/l6-note.md",
          "content": "Layer 6 smoke note",
          "mime_type": "text/markdown",
          "confirmed": true
        }
      },
      "StorageCreateFileData": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "storage_fixture",
              "dropbox"
            ],
            "description": "Layer 6 storage provider. storage_fixture requires a test-mode key; dropbox requires a live connection.",
            "example": "storage_fixture"
          },
          "file": {
            "$ref": "#/components/schemas/StorageFileSummary"
          },
          "action": {
            "type": "string",
            "enum": [
              "created",
              "updated"
            ],
            "example": "created"
          },
          "content_sha256": {
            "type": "string"
          },
          "verification": {
            "$ref": "#/components/schemas/WorkflowToolVerification"
          }
        },
        "required": [
          "provider",
          "file",
          "action",
          "content_sha256",
          "verification"
        ],
        "additionalProperties": false,
        "description": "Storage file creation result."
      },
      "StorageCreateShareLinkInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "storage_fixture",
              "dropbox"
            ]
          },
          "file_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "confirmed": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "allow_external_writes": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "provider",
          "file_id",
          "confirmed",
          "allow_external_writes"
        ],
        "additionalProperties": false,
        "description": "Create a Layer 6 storage share link. Requires confirmed=true and allow_external_writes=true; dropbox creates an external provider link.",
        "example": {
          "provider": "storage_fixture",
          "file_id": "test_file_abc123",
          "confirmed": true,
          "allow_external_writes": true
        }
      },
      "StorageCreateShareLinkData": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "storage_fixture",
              "dropbox"
            ],
            "description": "Layer 6 storage provider. storage_fixture requires a test-mode key; dropbox requires a live connection.",
            "example": "storage_fixture"
          },
          "file_id": {
            "type": "string"
          },
          "share_url": {
            "type": "string",
            "format": "uri"
          },
          "visibility": {
            "type": "string",
            "enum": [
              "test_only",
              "provider_default"
            ]
          },
          "expires_at": {
            "type": "null"
          },
          "warning": {
            "type": "string"
          }
        },
        "required": [
          "provider",
          "file_id",
          "share_url",
          "visibility",
          "expires_at",
          "warning"
        ],
        "additionalProperties": false,
        "description": "Storage share-link result."
      },
      "CommunicationChannel": {
        "type": "object",
        "properties": {
          "channel_id": {
            "type": "string",
            "example": "test_channel_launch"
          },
          "name": {
            "type": "string",
            "example": "launch"
          },
          "type": {
            "type": "string",
            "enum": [
              "channel",
              "direct",
              "group"
            ],
            "example": "channel"
          }
        },
        "required": [
          "channel_id",
          "name",
          "type"
        ],
        "additionalProperties": false,
        "description": "Test-mode communication channel."
      },
      "CommunicationMessage": {
        "type": "object",
        "properties": {
          "message_id": {
            "type": "string",
            "example": "test_msg_abc123"
          },
          "thread_id": {
            "type": "string",
            "example": "test_thread_abc123"
          },
          "channel_id": {
            "type": "string",
            "example": "test_channel_launch"
          },
          "text": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "source": {
            "type": "string",
            "enum": [
              "fixture",
              "sent",
              "reply"
            ],
            "example": "sent"
          }
        },
        "required": [
          "message_id",
          "thread_id",
          "channel_id",
          "text",
          "created_at",
          "source"
        ],
        "additionalProperties": false,
        "description": "Test-mode communication message."
      },
      "CommunicationListChannelsInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "communication_fixture",
              "telegram"
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "default": 10
          }
        },
        "required": [
          "provider"
        ],
        "additionalProperties": false,
        "description": "List Layer 6 communication channels where supported. Telegram returns TOOL_NOT_SUPPORTED because Bot API chats are not generically enumerable.",
        "example": {
          "provider": "communication_fixture",
          "limit": 10
        }
      },
      "CommunicationListChannelsData": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "communication_fixture",
              "telegram"
            ],
            "description": "Layer 6 communication provider. communication_fixture requires a test-mode key; telegram requires a live connection.",
            "example": "communication_fixture"
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommunicationChannel"
            }
          },
          "next_cursor": {
            "type": "null"
          }
        },
        "required": [
          "provider",
          "channels",
          "next_cursor"
        ],
        "additionalProperties": false,
        "description": "Communication channel list for providers that support listing."
      },
      "CommunicationSendMessageInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "communication_fixture",
              "telegram"
            ]
          },
          "channel_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "thread_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "confirmed": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "provider",
          "channel_id",
          "text",
          "confirmed"
        ],
        "additionalProperties": false,
        "description": "Send a Layer 6 communication message. communication_fixture requires a test-mode key; telegram requires a live connection and confirmed=true.",
        "example": {
          "provider": "communication_fixture",
          "channel_id": "test_channel_launch",
          "text": "Layer 6 message smoke",
          "confirmed": true
        }
      },
      "CommunicationSendMessageData": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "communication_fixture",
              "telegram"
            ],
            "description": "Layer 6 communication provider. communication_fixture requires a test-mode key; telegram requires a live connection.",
            "example": "communication_fixture"
          },
          "message_id": {
            "type": "string"
          },
          "thread_id": {
            "type": "string"
          },
          "channel_id": {
            "type": "string"
          },
          "channel_name": {
            "type": "string"
          },
          "action": {
            "type": "string",
            "enum": [
              "sent"
            ]
          },
          "text_preview": {
            "type": "string"
          },
          "verification": {
            "$ref": "#/components/schemas/WorkflowToolVerification"
          }
        },
        "required": [
          "provider",
          "message_id",
          "thread_id",
          "channel_id",
          "channel_name",
          "action",
          "text_preview",
          "verification"
        ],
        "additionalProperties": false,
        "description": "Communication send result."
      },
      "CommunicationGetThreadInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "communication_fixture",
              "telegram"
            ]
          },
          "thread_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          }
        },
        "required": [
          "provider",
          "thread_id"
        ],
        "additionalProperties": false,
        "description": "Read a Layer 6 communication thread. Telegram returns readback for messages sent through Vorlek, not arbitrary chat history.",
        "example": {
          "provider": "communication_fixture",
          "thread_id": "test_thread_abc123"
        }
      },
      "CommunicationGetThreadData": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "communication_fixture",
              "telegram"
            ],
            "description": "Layer 6 communication provider. communication_fixture requires a test-mode key; telegram requires a live connection.",
            "example": "communication_fixture"
          },
          "thread_id": {
            "type": "string"
          },
          "channel_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommunicationMessage"
            }
          },
          "limitation": {
            "type": "string",
            "example": "telegram_readback_only"
          }
        },
        "required": [
          "provider",
          "thread_id",
          "channel_id",
          "messages"
        ],
        "additionalProperties": false,
        "description": "Communication thread readback result."
      },
      "CommunicationReplyThreadInput": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "communication_fixture",
              "telegram"
            ]
          },
          "thread_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "confirmed": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "provider",
          "thread_id",
          "text",
          "confirmed"
        ],
        "additionalProperties": false,
        "description": "Reply to a Layer 6 communication thread. Telegram replies use Vorlek readback threads and require confirmed=true.",
        "example": {
          "provider": "communication_fixture",
          "thread_id": "test_thread_abc123",
          "text": "Replying from Vorlek test mode",
          "confirmed": true
        }
      },
      "SignupInput": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 255,
            "format": "email"
          },
          "password": {
            "type": "string",
            "minLength": 12,
            "maxLength": 1024
          }
        },
        "required": [
          "email",
          "password"
        ],
        "additionalProperties": false,
        "description": "Create a Vorlek account and initial live/test API keys.",
        "example": {
          "email": "operator@example.com",
          "password": "correct horse battery staple"
        }
      },
      "SignupResponse": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "live_api_key": {
            "type": "string",
            "example": "vk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "test_api_key": {
            "type": "string",
            "example": "vk_test_xxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "warning": {
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "email",
          "live_api_key",
          "test_api_key",
          "created_at",
          "warning"
        ],
        "additionalProperties": false,
        "description": "Account signup result. API keys are displayed once."
      },
      "RotateApiKeyResponse": {
        "type": "object",
        "properties": {
          "api_key_id": {
            "type": "string",
            "format": "uuid"
          },
          "api_key": {
            "type": "string",
            "example": "vk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
          },
          "mode": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ]
          },
          "warning": {
            "type": "string"
          }
        },
        "required": [
          "api_key_id",
          "api_key",
          "mode",
          "warning"
        ],
        "additionalProperties": false,
        "description": "Rotated API key response."
      },
      "Account": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "format": "uuid"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "plan": {
            "type": "string",
            "example": "free"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          }
        },
        "required": [
          "account_id",
          "email",
          "plan",
          "created_at"
        ],
        "additionalProperties": false,
        "description": "Authenticated account identity."
      },
      "AccountUsage": {
        "type": "object",
        "properties": {
          "period": {
            "type": "object",
            "properties": {
              "start": {
                "type": "string",
                "format": "date-time",
                "description": "ISO 8601 timestamp.",
                "example": "2026-04-27T12:00:00.000Z"
              },
              "end": {
                "type": "string",
                "format": "date-time",
                "description": "ISO 8601 timestamp.",
                "example": "2026-04-27T12:00:00.000Z"
              }
            },
            "required": [
              "start",
              "end"
            ],
            "additionalProperties": false
          },
          "quota": {
            "$ref": "#/components/schemas/QuotaMeta"
          },
          "recent_operations": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "errors": {
                "type": "integer",
                "minimum": 0
              },
              "by_tool": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            },
            "required": [
              "total",
              "errors",
              "by_tool"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "period",
          "quota",
          "recent_operations"
        ],
        "additionalProperties": false,
        "description": "Current account usage summary."
      },
      "OperationDetailData": {
        "type": "object",
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "tool": {
            "type": "string",
            "example": "upsert_contact"
          },
          "provider": {
            "type": "string",
            "example": "sendgrid"
          },
          "status": {
            "type": "string",
            "enum": [
              "success",
              "error"
            ],
            "example": "success"
          },
          "http_status": {
            "type": "integer",
            "example": 200
          },
          "request_id": {
            "type": "string",
            "description": "The operation receipt id captured from meta.request_id.",
            "example": "01HV0000000000000000000000"
          },
          "duration_ms": {
            "type": "integer",
            "minimum": 0,
            "example": 42
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "request_envelope": {},
          "response_envelope": {},
          "queue_time_ms": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "example": 2
          },
          "execution_time_ms": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "example": 40
          },
          "total_latency_ms": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "example": 42
          }
        },
        "required": [
          "created_at",
          "tool",
          "provider",
          "status",
          "http_status",
          "request_id",
          "duration_ms",
          "error_code",
          "queue_time_ms",
          "execution_time_ms",
          "total_latency_ms"
        ],
        "additionalProperties": false,
        "description": "Operation log detail. Lookup uses the request_id returned in success envelope meta."
      },
      "CreateConnectionInput": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "enum": [
                  "sendgrid"
                ]
              },
              "api_key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              }
            },
            "required": [
              "provider",
              "api_key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "enum": [
                  "mailchimp"
                ]
              },
              "api_key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              },
              "list_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              }
            },
            "required": [
              "provider",
              "api_key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "enum": [
                  "klaviyo"
                ]
              },
              "api_key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              }
            },
            "required": [
              "provider",
              "api_key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "enum": [
                  "dropbox"
                ]
              },
              "api_key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              }
            },
            "required": [
              "provider",
              "api_key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "provider": {
                "type": "string",
                "enum": [
                  "telegram"
                ]
              },
              "api_key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2048
              }
            },
            "required": [
              "provider",
              "api_key"
            ],
            "additionalProperties": false
          }
        ],
        "description": "Connect and validate provider credentials.",
        "example": {
          "provider": "sendgrid",
          "api_key": "SG.x"
        }
      },
      "UpdateConnectionInput": {
        "type": "object",
        "properties": {
          "api_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2048
          },
          "list_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "api_key"
        ],
        "additionalProperties": false,
        "description": "Validate and replace stored provider credentials without changing connection id.",
        "example": {
          "api_key": "pk_fresh"
        }
      },
      "Connection": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "status": {
            "type": "string",
            "example": "active"
          },
          "last_validated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "account_name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          }
        },
        "required": [
          "connection_id",
          "provider",
          "status"
        ],
        "additionalProperties": false,
        "description": "Provider connection summary."
      },
      "DeleteConnectionResponse": {
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/components/schemas/Provider"
          },
          "deleted": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        },
        "required": [
          "provider",
          "deleted"
        ],
        "additionalProperties": false
      },
      "SkillVersion": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "enum": [
              "vorlek"
            ]
          },
          "version": {
            "type": "string",
            "example": "0.3.0"
          },
          "skill_md_url": {
            "type": "string",
            "format": "uri",
            "example": "https://vorlek.dev/SKILL.md"
          }
        },
        "required": [
          "name",
          "version",
          "skill_md_url"
        ],
        "additionalProperties": false
      },
      "Health": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded"
            ]
          },
          "service": {
            "type": "string",
            "enum": [
              "vorlek-api"
            ]
          },
          "version": {
            "type": "string"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp.",
            "example": "2026-04-27T12:00:00.000Z"
          },
          "checks": {
            "type": "object",
            "properties": {
              "db": {
                "type": "string",
                "enum": [
                  "ok",
                  "down"
                ]
              },
              "redis": {
                "type": "string",
                "enum": [
                  "ok",
                  "down"
                ]
              }
            },
            "required": [
              "db",
              "redis"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "status",
          "service",
          "version",
          "timestamp",
          "checks"
        ],
        "additionalProperties": false
      },
      "OperationLookupResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/OperationDetailData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "OperationLookupResponse response envelope."
      },
      "CatalogResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/CatalogData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "CatalogResponse response envelope."
      },
      "WorkflowRecipeListResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/WorkflowRecipeListData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "WorkflowRecipeListResponse response envelope."
      },
      "WorkflowPlanValidationResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/WorkflowPlanValidationData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "WorkflowPlanValidationResponse response envelope."
      },
      "StorageSearchFilesResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/StorageSearchFilesData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "StorageSearchFilesResponse response envelope."
      },
      "StorageGetFileResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/StorageGetFileData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "StorageGetFileResponse response envelope."
      },
      "StorageListRecentFilesResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/StorageListRecentFilesData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "StorageListRecentFilesResponse response envelope."
      },
      "StorageCreateFileResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/StorageCreateFileData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "StorageCreateFileResponse response envelope."
      },
      "StorageCreateShareLinkResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/StorageCreateShareLinkData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "StorageCreateShareLinkResponse response envelope."
      },
      "CommunicationListChannelsResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/CommunicationListChannelsData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "CommunicationListChannelsResponse response envelope."
      },
      "CommunicationSendMessageResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/CommunicationSendMessageData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "CommunicationSendMessageResponse response envelope."
      },
      "CommunicationGetThreadResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/CommunicationGetThreadData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "CommunicationGetThreadResponse response envelope."
      },
      "CommunicationReplyThreadResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/CommunicationSendMessageData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "CommunicationReplyThreadResponse response envelope."
      },
      "UpsertContactResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/UpsertContactData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "UpsertContactResponse response envelope."
      },
      "GetContactResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/GetContactData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "GetContactResponse response envelope."
      },
      "GetConnectionStatusResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/ConnectionStatusData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "GetConnectionStatusResponse response envelope."
      },
      "SendTransactionalResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/SendTransactionalData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "SendTransactionalResponse response envelope."
      },
      "GetCampaignStatsResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/CampaignStatsData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "GetCampaignStatsResponse response envelope."
      },
      "ListTemplatesResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/ListTemplatesData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "ListTemplatesResponse response envelope."
      },
      "ListCampaignsResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success"
            ]
          },
          "data": {
            "$ref": "#/components/schemas/ListCampaignsData"
          },
          "meta": {
            "$ref": "#/components/schemas/SuccessMeta"
          },
          "tip": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "status",
          "data",
          "meta",
          "tip"
        ],
        "additionalProperties": false,
        "description": "ListCampaignsResponse response envelope."
      }
    },
    "parameters": {}
  },
  "paths": {
    "/health": {
      "get": {
        "summary": "Health check",
        "responses": {
          "200": {
            "description": "Health status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    },
    "/status": {
      "get": {
        "summary": "Public API status page",
        "responses": {
          "302": {
            "description": "Redirects to the human-facing API status page.",
            "headers": {
              "Location": {
                "description": "Public status page endpoint for Vorlek core API health.",
                "schema": {
                  "type": "string",
                  "format": "uri",
                  "example": "https://status.vorlek.com/endpoints/core_api-health"
                }
              }
            }
          }
        }
      }
    },
    "/v1/skill/version": {
      "get": {
        "summary": "Skill descriptor version",
        "responses": {
          "200": {
            "description": "Current SKILL.md version.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkillVersion"
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/signup": {
      "post": {
        "summary": "Create account",
        "requestBody": {
          "description": "Signup payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SignupInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created account and one-time keys.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/api-keys/rotate": {
      "post": {
        "summary": "Rotate current API key",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "New API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotateApiKeyResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "summary": "Get authenticated account",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Authenticated account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/usage": {
      "get": {
        "summary": "Get account usage",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Usage summary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountUsage"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations/{request_id}": {
      "get": {
        "summary": "Get operation by request id",
        "description": "Lookup the operation receipt captured from any success envelope as meta.request_id.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "01HV0000000000000000000000"
            },
            "required": true,
            "name": "request_id",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Operation detail.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationLookupResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections": {
      "post": {
        "summary": "Connect provider",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "description": "Provider connection payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConnectionInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created connection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "summary": "List provider connections",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Active provider connections.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Connection"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/connections/{provider}": {
      "patch": {
        "summary": "Replace provider credentials",
        "description": "Validates fresh provider credentials and updates the active connection in place, preserving the connection id.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/Provider"
            },
            "required": true,
            "name": "provider",
            "in": "path"
          }
        ],
        "requestBody": {
          "description": "Provider credential replacement payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateConnectionInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated connection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete provider connection",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/Provider"
            },
            "required": true,
            "name": "provider",
            "in": "path"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted connection.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteConnectionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/catalog": {
      "get": {
        "summary": "Get account-aware provider and tool catalog",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Account-aware provider and tool catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/get_catalog": {
      "get": {
        "summary": "Get account-aware provider and tool catalog",
        "description": "Tool-style alias for agents that expect catalog discovery under /v1/tools.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Account-aware provider and tool catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflows/recipes": {
      "get": {
        "summary": "List Layer 6 workflow recipes",
        "description": "Returns static workflow recipes with account-aware availability. Does not execute.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "share_context"
            },
            "required": false,
            "description": "Filter recipes by exact workflow intent.",
            "name": "intent",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "storage,communication"
            },
            "required": false,
            "description": "Comma-separated workflow domain filter.",
            "name": "domain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "true"
            },
            "required": false,
            "description": "Set to true to include planned recipes.",
            "name": "include_planned",
            "in": "query"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity.",
            "name": "detail",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow recipe list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRecipeListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/get_workflow_recipes": {
      "get": {
        "summary": "List Layer 6 workflow recipes",
        "description": "Tool-style alias for agents that expect workflow discovery under /v1/tools.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "type": "string",
              "example": "share_context"
            },
            "required": false,
            "description": "Filter recipes by exact workflow intent.",
            "name": "intent",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "storage,communication"
            },
            "required": false,
            "description": "Comma-separated workflow domain filter.",
            "name": "domain",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "example": "true"
            },
            "required": false,
            "description": "Set to true to include planned recipes.",
            "name": "include_planned",
            "in": "query"
          },
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity.",
            "name": "detail",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Workflow recipe list.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowRecipeListResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/workflows/validate": {
      "post": {
        "summary": "Validate a Layer 6 workflow plan",
        "description": "Validates preconditions, risk, scopes, and confirmations without execution.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Workflow validation payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateWorkflowPlanInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Workflow validation result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowPlanValidationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/validate_workflow_plan": {
      "post": {
        "summary": "Validate a Layer 6 workflow plan",
        "description": "Tool-style alias for agents that expect validation under /v1/tools.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Workflow validation payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateWorkflowPlanInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Workflow validation result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WorkflowPlanValidationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/storage_search_files": {
      "post": {
        "summary": "Search storage files",
        "description": "Layer 6 storage.search_files for test-mode fixtures and Dropbox live smoke execution.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Search storage files payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageSearchFilesInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Search storage files result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageSearchFilesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "API key mode does not match the requested provider.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Synthetic tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/storage_get_file": {
      "post": {
        "summary": "Read a storage file",
        "description": "Layer 6 storage.get_file for test-mode fixtures and Dropbox live smoke execution.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Read a storage file payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageGetFileInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Read a storage file result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageGetFileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "API key mode does not match the requested provider.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Synthetic tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/storage_list_recent_files": {
      "post": {
        "summary": "List recent storage files",
        "description": "Layer 6 storage.list_recent_files for test-mode fixtures and Dropbox live smoke execution.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "List recent storage files payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageListRecentFilesInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List recent storage files result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageListRecentFilesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "API key mode does not match the requested provider.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Synthetic tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/storage_create_file": {
      "post": {
        "summary": "Create a storage file",
        "description": "Layer 6 storage.create_file for test-mode fixtures and Dropbox live smoke execution. Requires confirmed=true.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Create a storage file payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageCreateFileInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create a storage file result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageCreateFileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "API key mode does not match the requested provider.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Synthetic tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/storage_create_share_link": {
      "post": {
        "summary": "Create a storage share link",
        "description": "Layer 6 storage.create_share_link for test-mode fixtures and Dropbox live smoke execution. Requires confirmed=true and allow_external_writes=true.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Create a storage share link payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StorageCreateShareLinkInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Create a storage share link result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StorageCreateShareLinkResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "API key mode does not match the requested provider.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Synthetic tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/communication_list_channels": {
      "post": {
        "summary": "List communication channels",
        "description": "Layer 6 communication.list_channels for test-mode fixtures. Telegram live connections return TOOL_NOT_SUPPORTED because Bot API chats are not generically enumerable.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "List communication channels payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommunicationListChannelsInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "List communication channels result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunicationListChannelsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "API key mode does not match the requested provider.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Synthetic tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/communication_send_message": {
      "post": {
        "summary": "Send a communication message",
        "description": "Layer 6 communication.send_message for test-mode fixtures and Telegram live smoke execution. Requires confirmed=true.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Send a communication message payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommunicationSendMessageInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Send a communication message result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunicationSendMessageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "API key mode does not match the requested provider.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Synthetic tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/communication_get_thread": {
      "post": {
        "summary": "Read a communication thread",
        "description": "Layer 6 communication.get_thread for test-mode fixtures and Telegram Vorlek-sent readback.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Read a communication thread payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommunicationGetThreadInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Read a communication thread result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunicationGetThreadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "API key mode does not match the requested provider.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Synthetic tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/communication_reply_thread": {
      "post": {
        "summary": "Reply to a communication thread",
        "description": "Layer 6 communication.reply_thread for test-mode fixtures and Telegram Vorlek-sent readback threads. Requires confirmed=true.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Reply to a communication thread payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommunicationReplyThreadInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Reply to a communication thread result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommunicationReplyThreadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "API key mode does not match the requested provider.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Synthetic tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/upsert_contact": {
      "post": {
        "summary": "Create or update contact",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Contact upsert payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertContactInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Contact upsert result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpsertContactResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/get_contact": {
      "post": {
        "summary": "Get contact by email",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Contact lookup payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetContactInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Contact lookup result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetContactResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/get_connection_status": {
      "post": {
        "summary": "Get provider connection status",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Connection status payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetConnectionStatusInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Connection status result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetConnectionStatusResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/send_transactional": {
      "post": {
        "summary": "Send transactional email",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Transactional email payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendTransactionalInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Transactional send result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendTransactionalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/get_campaign_stats": {
      "post": {
        "summary": "Get campaign stats",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Campaign stats payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GetCampaignStatsInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Campaign stats result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetCampaignStatsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/list_templates": {
      "post": {
        "summary": "List provider templates",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Template list payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListTemplatesInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Template list result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListTemplatesResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tools/list_campaigns": {
      "post": {
        "summary": "List provider campaigns",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "schema": {
              "$ref": "#/components/schemas/ResponseDetailLevel"
            },
            "required": false,
            "description": "Response verbosity. Defaults to standard; use minimal to trim metadata or full to include operation lookup metadata.",
            "name": "detail",
            "in": "query"
          }
        ],
        "requestBody": {
          "description": "Campaign list payload.",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ListCampaignsInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Campaign list result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListCampaignsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or provider credential error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid, or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "403": {
            "description": "Authenticated key lacks required scope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "Requested resource or provider connection not found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "Conflict.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Quota or rate limit exceeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "501": {
            "description": "Tool/provider pair is not supported.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    }
  },
  "webhooks": {}
}
