Skip to content

Redeliver an event

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

Queues the delivery again now, whatever its status; its attempts start over.

endpointId
required
string

The webhook endpoint id.

deliveryId
required
string

The delivery id.

Idempotency-Key
string
>= 1 characters

Caller-supplied idempotency key, scoped to the caller: the same key from someone else in the workspace 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). A request whose key store can’t be read before it runs is answered 503 idempotency-store-unavailable with Retry-After: nothing ran, so retry with the same key (from 0.3.0).

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; for tool-failed, the tool, { toolId }.

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; for tool-failed, the tool’s own code for why (order-not-found). 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; for tool-failed, the facts the tool gave, when it gave any. 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 pinned for the run’s scope (pinned); or the latest, nothing being pinned (latest). Absent on runs from before Kindgi 0.1.4.

string
Allowed values: explicit flow-pin conversation pinned latest
pinnedScope
One of: discriminator: kind

The whole workspace.

object
kind
required
string
Allowed values: tenant
trigger

The trigger that started the run, as GET /v1/runs/{runId} shows it (a schedule’s triggerId is its scheduleId). Absent on a run no trigger started, and from a runtime that doesn’t send it yet.

object
triggerId
required
string format: uuid
kind
required
string
Allowed values: schedule event webhook mail text
fireId
required

The fire that started the run: one entry of the trigger’s fire history.

string
scheduledFor

A schedule’s fire: the occurrence the run is for.

string format: date-time
version

The trigger’s version the run started with (GET …/versions/{version}), which later edits don’t change. Absent on a run from before versions.

integer
>= 1
startedBy

How the run started, as GET /v1/runs/{runId}’s startedBy. Absent on a run that records none, and from a runtime that doesn’t send it yet.

string
Allowed values: person key schedule webhook event mail text
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",
"pinnedScope": {
"kind": "tenant"
}
},
"trigger": {
"kind": "schedule"
},
"startedBy": "person"
}
}
},
"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"
}
}

Not a tenant admin (permission-denied). Without an authorization store, a tenant admin is the deployment’s API token, an admin key, or a console signed in with either.

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, or no delivery with that id for it.

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. Or idempotency-key-in-flight (with Retry-After): a request with the same Idempotency-Key still runs, so this one wasn’t run; send it again after Retry-After to get that request’s answer.

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"
}
}
Retry-After
integer
>= 1

Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.

rate-limit-exceeded with details.limit: "api-requests", on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; Retry-After says when to send it again.

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"
}
}
Retry-After
integer
>= 1

Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.

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"
}
}

The Idempotency-Key store (idempotency-store-unavailable) or the authorization store (authz-backend-unavailable) couldn’t be reached before the request ran, or the database was too busy for its authorization check (database-busy), so nothing was changed; Retry-After (whole seconds) says when to try again with the same key. Or tenant-state-unavailable (with Retry-After), on a runtime serving many workspaces: the workspace’s state couldn’t be read, so nothing was changed.

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"
}
}
Retry-After
integer
>= 1

Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.

See also