{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "The webhook id. Pass it as webhook_id to the other webhook operations."
},
"project_id": {
"type": "string",
"format": "uuid",
"description": "Project identifier associated with the record."
},
"name": {
"type": "string",
"description": "Human-readable name for the record."
},
"source": {
"type": "string",
"const": "webhook",
"description": "The source associated with this record."
},
"target": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"agent",
"task",
"workflow",
"event"
],
"description": "Target kind invoked or stored by the webhook."
},
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Target identifier: agent id, task target, workflow id, or event for store-only webhooks."
},
"conversation_mode": {
"type": "string",
"enum": [
"create_new",
"existing",
"none"
],
"description": "Conversation behaviour for an agent target. Defaults to none. Use create_new for an agent that delegates with invoke_agent - a run with no conversation cannot be paused for delegation. Agent targets run headlessly by default; create_new or existing creates or appends a conversation message. Agent targets with conversation mode create_new or existing also require project.conversations.write."
},
"conversation_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"description": "Conversation identifier associated with the record."
},
{
"type": "null",
"description": "Conversation identifier associated with this result."
}
],
"description": "Existing conversation to continue. Only allowed when conversation_mode is existing, and required in that case."
}
},
"required": [
"kind",
"id"
],
"additionalProperties": false,
"description": "Structured target details associated with this record."
},
"prompt_template": {
"type": [
"string",
"null"
],
"description": "The prompt template associated with this record."
},
"event_filter": {
"anyOf": [
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"all",
"any"
],
"description": "Whether all or any filter conditions must match."
},
"conditions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"description": "Dot path in the incoming payload, for example action or pull_request.state."
},
"operator": {
"type": "string",
"enum": [
"equals",
"not_equals",
"in",
"exists",
"contains"
],
"description": "Comparison operator."
},
"value": {
"description": "Comparison value for operators that require one."
}
},
"required": [
"path",
"operator"
],
"additionalProperties": false,
"description": "One condition item associated with this record."
},
"maxItems": 50,
"description": "Filter conditions applied before webhook work is created."
}
},
"required": [
"mode",
"conditions"
],
"additionalProperties": false,
"description": "Optional incoming event filter. Missing, null, or empty conditions accept every event."
},
{
"type": "null",
"description": "The event filter returned by the tool."
}
],
"description": "Optional incoming event filter. Missing, null, or empty conditions accept every event."
},
"status": {
"type": "string",
"enum": [
"draft",
"enabled",
"disabled"
],
"description": "Lifecycle status for the record."
},
"runtime_target_kind": {
"type": "string",
"enum": [
"main_branch",
"environment",
"preview_branch"
],
"description": "The runtime target kind associated with this record."
},
"runtime_target_environment_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"description": "The runtime target environment id associated with this record."
},
{
"type": "null",
"description": "The runtime target environment id returned by the tool."
}
],
"description": "The runtime target environment id associated with this record."
},
"runtime_target_branch_id": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"description": "The runtime target branch id associated with this record."
},
{
"type": "null",
"description": "The runtime target branch id returned by the tool."
}
],
"description": "The runtime target branch id associated with this record."
},
"definition_source": {
"type": "string",
"enum": [
"manual",
"source"
],
"description": "The definition source associated with this record."
},
"source_trigger_id": {
"type": [
"string",
"null"
],
"description": "The source trigger id associated with this record."
},
"source_path": {
"type": [
"string",
"null"
],
"description": "The source path associated with this record."
},
"source_hash": {
"type": [
"string",
"null"
],
"description": "The source hash associated with this record."
},
"ingress_id": {
"type": "string",
"description": "The public id in webhook_url that external senders post to."
},
"webhook_url": {
"type": "string",
"description": "The webhook url associated with this record."
},
"created_by_user_id": {
"type": "string",
"format": "uuid",
"description": "The created by user id associated with this record."
},
"enabled_at": {
"type": [
"string",
"null"
],
"description": "The enabled at associated with this record."
},
"disabled_at": {
"type": [
"string",
"null"
],
"description": "The disabled at associated with this record."
},
"disabled_reason": {
"type": [
"string",
"null"
],
"description": "The disabled reason associated with this record."
},
"created_at": {
"type": "string",
"description": "Creation timestamp in ISO 8601 format."
},
"updated_at": {
"type": "string",
"description": "Last update timestamp in ISO 8601 format."
}
},
"required": [
"id",
"project_id",
"name",
"source",
"target",
"prompt_template",
"event_filter",
"status",
"runtime_target_kind",
"runtime_target_environment_id",
"runtime_target_branch_id",
"definition_source",
"source_trigger_id",
"source_path",
"source_hash",
"ingress_id",
"webhook_url",
"created_by_user_id",
"enabled_at",
"disabled_at",
"disabled_reason",
"created_at",
"updated_at"
],
"additionalProperties": false,
"description": "A project webhook.",
"$schema": "http://json-schema.org/draft-07/schema#"
}