{"$id":"https://app.cogny.com/api/webhook-events","version":"1.0","documentation":"https://cogny.com/blog/webhooks-push-cogny-events-to-slack-crm-esp","configuration":{"ui":"Settings → Webhooks (workspace owner or admin)","management_api":"/api/warehouse/{warehouseId}/webhooks","management_api_auth":"Authorization: Bearer <supabase access token>","max_endpoints_per_workspace":20},"events":[{"event":"report.completed","label":"Report completed","description":"A scheduled report or audit finished running. Payload carries the title, the executive summary, and a link to the full report.","group":"Reports","data_schema":{"type":"object","properties":{"report":{"type":"object","description":"The finished run. `url` deep-links to the full report.","properties":{"execution_id":{"type":"string","format":"uuid"},"scheduled_prompt_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"title":{"type":"string"},"template_id":{"type":["string","null"]},"url":{"type":"string","format":"uri"}}},"workspace":{"type":"object","description":"The Cogny workspace the event belongs to.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"url":{"type":"string","format":"uri"}}},"summary":{"type":["string","null"],"description":"Executive summary, truncated to ~1200 chars. Null when the run had no email recipients configured (the summary is generated on that path)."},"section_count":{"type":"integer","description":"Total sections produced — may exceed the length of `sections`."},"sections":{"type":"array","description":"First 25 sections. `text` carries narrative findings; `row_count` is set for data sections.","items":{"type":"object","properties":{"title":{"type":"string"},"type":{"type":["string","null"]},"text":{"type":["string","null"]},"row_count":{"type":["integer","null"]}}}},"duration_ms":{"type":["integer","null"]}}}},{"event":"alert.triggered","label":"Alert triggered","description":"A budget-pacing or metric-target alert crossed its threshold. Payload carries the current value, the target, and the deviation.","group":"Alerts","data_schema":{"type":"object","properties":{"alert":{"type":"object","properties":{"incident_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["budget_pacing","metric_target"]},"severity":{"type":["string","null"],"enum":["warning","critical",null]},"title":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string","format":"uri"}}},"measurement":{"type":"object","description":"Nulls where the alert type does not carry that figure.","properties":{"current_value":{"type":["number","null"]},"target_value":{"type":["number","null"]},"deviation_percent":{"type":["number","null"]},"platform":{"type":["string","null"]}}},"resolution":{"type":["object","null"],"description":"Always null on alert.triggered; populated on alert.resolved.","properties":{"reason":{"type":["string","null"]},"resolved_at":{"type":["string","null"],"format":"date-time"}}},"workspace":{"type":"object","description":"The Cogny workspace the event belongs to.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"url":{"type":"string","format":"uri"}}}}}},{"event":"alert.resolved","label":"Alert resolved","description":"A previously triggered alert returned to normal and was closed.","group":"Alerts","data_schema":{"type":"object","properties":{"alert":{"type":"object","properties":{"incident_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["budget_pacing","metric_target"]},"severity":{"type":["string","null"],"enum":["warning","critical",null]},"title":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string","format":"uri"}}},"measurement":{"type":"object","description":"Nulls where the alert type does not carry that figure.","properties":{"current_value":{"type":["number","null"]},"target_value":{"type":["number","null"]},"deviation_percent":{"type":["number","null"]},"platform":{"type":["string","null"]}}},"resolution":{"type":["object","null"],"description":"Always null on alert.triggered; populated on alert.resolved.","properties":{"reason":{"type":["string","null"]},"resolved_at":{"type":["string","null"],"format":"date-time"}}},"workspace":{"type":"object","description":"The Cogny workspace the event belongs to.","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":["string","null"]},"url":{"type":"string","format":"uri"}}}}}},{"event":"ticket.created","label":"Recommendation created","description":"Cogny filed a new growth ticket — an audit finding, an experiment idea, or a bug report.","group":"Work","data_schema":{"type":"object","properties":{"ticket":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"body":{"type":["string","null"],"description":"The recommendation itself, truncated to ~1200 chars."},"status":{"type":"string"},"previous_status":{"type":["string","null"],"description":"Always null on ticket.created; set on ticket.status_changed."},"action_type":{"type":["string","null"]},"execution_target":{"type":["string","null"],"enum":["manual","agent","code",null]},"priority":{"type":["string","null"]},"url":{"type":"string","format":"uri"}}},"changed_by":{"type":["string","null"],"enum":["agent","user","system",null]},"workspace":{"type":"object","description":"The Cogny workspace the event belongs to.","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"}}}}}},{"event":"ticket.status_changed","label":"Recommendation status changed","description":"A growth ticket moved on the board (e.g. assigned, doing, done). Payload carries the previous and new status.","group":"Work","data_schema":{"type":"object","properties":{"ticket":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"body":{"type":["string","null"],"description":"The recommendation itself, truncated to ~1200 chars."},"status":{"type":"string"},"previous_status":{"type":["string","null"],"description":"Always null on ticket.created; set on ticket.status_changed."},"action_type":{"type":["string","null"]},"execution_target":{"type":["string","null"],"enum":["manual","agent","code",null]},"priority":{"type":["string","null"]},"url":{"type":"string","format":"uri"}}},"changed_by":{"type":["string","null"],"enum":["agent","user","system",null]},"workspace":{"type":"object","description":"The Cogny workspace the event belongs to.","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"}}}}}},{"event":"campaign.updated","label":"Campaign change applied","description":"An agent wrote a change to a connected platform — a budget, bid, status, creative, or audience update. One event per write-class MCP tool call.","group":"Changes","data_schema":{"type":"object","properties":{"change":{"type":"object","properties":{"platform":{"type":["string","null"],"description":"Display name, e.g. 'Google Ads'. Null for a Cogny built-in tool."},"tool_name":{"type":"string","description":"Bare name, e.g. 'tool_update_campaign_budget'."},"full_tool_name":{"type":"string","description":"Namespaced name as the agent called it."},"status":{"type":"string","enum":["success","error"]},"error_code":{"type":["string","null"],"description":"Classified code + length, e.g. 'http_429+rate_limit (len=1843)'. Never the provider's raw error body — those echo the rejected request."},"duration_ms":{"type":["integer","null"]}}},"actor":{"type":"object","properties":{"source":{"type":"string","enum":["external_mcp","chat_agent","ticket_agent"]},"type":{"type":["string","null"],"enum":["user","api_key","system",null]},"user_id":{"type":["string","null"],"format":"uuid"}}},"links":{"type":"object","description":"Correlation ids for the run that made the change.","properties":{"thread_id":{"type":["string","null"],"format":"uuid"},"ticket_id":{"type":["string","null"],"format":"uuid"},"run_id":{"type":["string","null"],"format":"uuid"},"ticket_url":{"type":["string","null"],"format":"uri"}}},"workspace":{"type":"object","description":"The Cogny workspace the event belongs to.","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"}}}}}},{"event":"loop_run.completed","label":"Loop run evaluated","description":"An autonomous loop run finished and its impact analysis came back. Payload carries the outcome (success / partial / failed), the summary, the measured metrics and the estimated USD impact when there is one.","group":"Loops","data_schema":{"type":"object","properties":{"loop":{"type":"object","description":"The loop (scheduled autonomous job) this run belongs to.","properties":{"id":{"type":["string","null"],"format":"uuid"},"name":{"type":["string","null"]},"url":{"type":["string","null"],"format":"uri"}}},"run":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"ticket_id":{"type":"string","format":"uuid"},"run_at":{"type":["string","null"],"format":"date-time"},"outcome":{"type":"string","enum":["success","partial","failed"]},"summary":{"type":["string","null"],"description":"Evaluation summary, truncated to ~1200 chars."},"url":{"type":"string","format":"uri"}}},"impact":{"type":"object","description":"Measured impact. `metrics` holds the numeric metrics the evaluation reported (up to 40).","properties":{"usd":{"type":["number","null"],"description":"Estimated USD impact, when the evaluation produced one."},"metrics":{"type":"object","additionalProperties":{"type":"number"}}}},"workspace":{"type":"object","description":"The Cogny workspace the event belongs to.","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"}}}}}},{"event":"task.shipped","label":"Task shipped","description":"An agent published something on a connected platform — a campaign, ad, blog post, page or site. Payload carries what shipped, where, and a link to it. Impact is measured later and arrives on the Tasks board.","group":"Loops","data_schema":{"type":"object","properties":{"task":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","description":"What shipped, e.g. 'campaign', 'ad', 'blog_post', 'page', 'site_publish'."},"platform":{"type":["string","null"]},"title":{"type":["string","null"]},"object_url":{"type":["string","null"],"format":"uri","description":"Link to the shipped object on its platform."},"object_status":{"type":["string","null"],"description":"e.g. 'live', 'paused', 'draft'."},"tool_name":{"type":"string"},"source":{"type":"string","enum":["chat","loop_run"]},"ticket_id":{"type":["string","null"],"format":"uuid"},"url":{"type":"string","format":"uri","description":"The workspace Tasks board, where impact lands once measured."}}},"workspace":{"type":"object","description":"The Cogny workspace the event belongs to.","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"}}}}}}],"subscriptions":{"wildcard":"*","note":"Subscribe to specific event names, or to \"*\" for every event including ones added later."},"delivery":{"method":"POST","content_type":"application/json","target_url_requirements":["https only","publicly resolvable hostname (private, loopback, link-local and reserved addresses are rejected)","no credentials embedded in the URL","redirects are not followed — return 2xx directly"],"success":"Any 2xx. Return it as soon as the body is accepted; do not hold the connection while you work.","permanent_failure":"Return 410 Gone to have Cogny disable the endpoint.","timeout_ms":10000,"max_attempts":7,"retry_backoff_seconds":[60,300,1800,7200,21600,43200],"auto_disable_after_consecutive_failures":20},"headers":{"X-Cogny-Signature":"t=<unix-seconds>,v1=<hex hmac-sha256>","X-Cogny-Event":"the event name, e.g. report.completed","X-Cogny-Delivery":"unique delivery id — use it to dedupe retries","X-Cogny-Webhook-Id":"the configured endpoint id"},"signature":{"algorithm":"HMAC-SHA256","signed_payload":"`${t}.${rawBody}`","key":"the endpoint's signing secret, shown in Settings → Webhooks","encoding":"hex","verify_against_raw_body":true,"note":"Verify against the RAW request body before any JSON parsing — re-serializing changes the bytes and the signature will not match.","recommended_tolerance_seconds":300},"envelope":{"type":"object","required":["id","event","created_at","warehouse_id","text","data"],"properties":{"id":{"type":"string","description":"Delivery id, matches the X-Cogny-Delivery header."},"event":{"type":"string","enum":["report.completed","alert.triggered","alert.resolved","ticket.created","ticket.status_changed","campaign.updated","loop_run.completed","task.shipped"]},"created_at":{"type":"string","format":"date-time","description":"ISO-8601 UTC."},"warehouse_id":{"type":"string","format":"uuid","description":"The Cogny workspace id."},"text":{"type":"string","description":"One-line human-readable summary with a link. A Slack incoming-webhook URL posts it as the message, so Slack works with no relay."},"data":{"type":"object","description":"Event-specific body. Every variant carries a `workspace` object and a `url` deep link on its primary resource. The exact shape per event is in `events[].data_schema`.","discriminator":{"propertyName":"event","mapping":"events[].data_schema"}}}}}