Skip to content

Send a test event to a webhook endpoint

View as Markdown
POST
/v1/webhook-endpoints/{endpointId}/test
curl --request POST \
--url https://example.com/v1/webhook-endpoints/example/test \
--header 'Authorization: Bearer <token>'

Queues a webhook.test event, signed like any other, to check the receiver end to end. Follow it in the delivery log.

endpointId
required
string

The webhook endpoint id.

Idempotency-Key
string
>= 1 characters

Caller-supplied idempotency key, scoped to the caller: the same key from someone else in the tenant is their own request (from 0.1.5). Retries with the same key return the original response byte-identical (per docs/API-ROUTE-CONVENTIONS.md §3.1). A retry sent while the first request still runs is answered 409 idempotency-key-in-flight with Retry-After, on a runtime whose store holds keys (from 0.1.5); retry after it, and you get the first request’s answer. An answer that carries a secret (a new API key or public run token, a session token, a generated signing secret) isn’t kept: a retry gets 409 idempotency-key-replay-withheld, with the first request’s status and when it succeeded (from 0.1.5).

Queued.

Media typeapplication/json
object
deliveryId
required
string
endpointId
required
string
event
required
One of: discriminator: type
object
id
required

Event id, also sent as the webhook-id header; the same on every retry.

string
type
required
string
Allowed value: run.finished
createdAt
required
string format: date-time
data
required
object
run
required

A finished top-level run: its identity and outcome, never its input or output. Field names match GET /v1/runs/{runId}.

object
id
required

RunId.

string format: uuid
projectId
required
string format: uuid
flowId
required
string
flowVersion
required
string
status
required
string
Allowed values: completed failed cancelled
dryRun
required
boolean
failureMessage
required

Why the run failed or was cancelled; null when it completed.

string | null
failure

A failed run’s error, as GET /v1/runs/{runId} reads it back: its code, and the error’s own details when it has them. Absent unless the run failed, and from a runtime that doesn’t send it yet; read failureMessage then.

object
code
required
string
message
required
string
cause

What the error came from, when it says: e.g. for capability-routing-failed, the router’s capability-unsatisfiable with its reasons, by provider.

reason

The error’s own reason, when it gives one: for a turn that ended at its approval (hitl-cancelled), timeout when nobody decided in time. Absent from an older runtime and from errors without one; read code then.

string
details

The error’s own facts, for a code that has them: for rate-limit-exceeded, limit (the budget that refused: schema-compile-time or template-render-time) and budgetMs, the names the API’s 429 uses. Never the wait: read back later, it’s stale. Absent for any other code, and from an older runtime.

object
key
additional properties
any
createdAt
required
string format: date-time
completedAt
required
string format: date-time
usage

The model calls of the run tree (this run and every run it started) that the cost ledger had recorded when this run finished: a child run still running then isn’t in it. calls counts failed calls too. Absent when the runtime records no usage.

object
calls
required
integer
costUsd
required
number
tokens
required
object
prompt
required
integer
completion
required
integer
cacheRead
required
integer
cacheWrite
required
integer
reasoning
required
integer
agent

On an agent’s run: the agent, the version that ran and the conversation, as GET /v1/runs/{runId} shows them (an agent run’s flowId is agent.turn). Absent on a flow’s run, and from a runtime before Kindgi 0.1.6.

object
id
required

The agent id.

string
version
required

The agent version that ran (semver).

string
conversationId
required
string format: uuid
via

Why this version ran: named by the caller (explicit); held by the flow version a flow’s agent step runs in (flow-pin: the node’s config.version, else the version the flow version pinned when it was published); the conversation’s own (conversation); the version live for the run’s scope (live); or the latest, nothing being live (latest). Absent on runs from before Kindgi 0.1.4.

string
Allowed values: explicit flow-pin conversation live latest
liveScope
One of: discriminator: kind

The agent’s default for the whole tenant.

object
kind
required
string
Allowed values: tenant
status
required

pending: waiting for its next attempt. delivered: the endpoint answered 2xx. failed: every attempt failed, or the endpoint was unregistered first; redeliver queues it again.

string
Allowed values: pending delivered failed
attempts
required
integer
nextAttemptAt
required
string | null format: date-time
lastAttemptAt
required
string | null format: date-time
lastResponseStatus
required

HTTP status of the last attempt; null when it got no response.

integer | null
lastError
required

Why the last attempt failed (timeout, connection-refused, url-refused, …).

string | null
createdAt
required
string format: date-time
deliveredAt
required
string | null format: date-time
Example
{
"event": {
"type": "run.finished",
"data": {
"run": {
"status": "completed",
"agent": {
"via": "explicit",
"liveScope": {
"kind": "tenant"
}
}
}
}
},
"status": "pending"
}

Malformed request body.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

No endpoint with that id.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Idempotency-Key was reused with a different body, or resource-state conflict.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

Server error (unmapped domain code or framework crash).

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"details": {},
"requestId": "example"
}
}

See also