---
title: "Ingest agent webhook event"
method: POST
path: "/api/orgs/{org}/agents/webhooks/ingest"
tags: ["Webhooks"]
---

# Ingest agent webhook event

`POST /api/orgs/{org}/agents/webhooks/ingest`

Ingests a raw webhook payload (from GitHub, Gitea, or other providers)
and dispatches it to matching AgentTriggerRule resources. Normalizes
the event type from the payload structure automatically.

## Path parameters

- `org` string, required

## Request body

- WebhookPayload — Raw webhook payload from an external provider (GitHub, Gitea, etc.). The server automatically normalizes the event type from the payload structure.
  - `action` string — Webhook action (opened, created, labeled, etc.)
  - `pull_request` object — Pull request data (if applicable)
  - `issue` object — Issue data (if applicable)
  - `comment` object — Comment data (if applicable)
  - `label` object — Label data (if applicable)
  - `repository` object — Repository data
    - `full_name` string
  - `sender` object — Actor who triggered the event
    - `login` string
  - `workflow_run` object — CI workflow run data (for pipeline events)
  - `ref` string — Git ref (for push events)
  - `commits` object[] — Commit list (for push events)

## Response `200`

Webhook processed

- object
  - `processed` boolean
  - `triggeredRules` string[]
  - `dispatchedRuns` string[]

## Other responses

- `400` — Bad request — invalid input or malformed JSON
- `500` — Internal server error

---

[API](https://skmtc.dev/a5c-ai/apis/kradle-api.md) · [All operations](https://skmtc.dev/a5c-ai/apis/kradle-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/a5c-ai/kradle-api/revisions/b5eadb2ecd8b/schema)
