Skip to content

WebhookEventPayload

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The JSON body of a webhook request.

public sealed record WebhookEventPayload : IEquatable<WebhookEventPayload>

objectWebhookEventPayload

IEquatable<WebhookEventPayload>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

This payload carries only a summary: identifier, status, agent, tokens, cost. Message content and model responses never sit here. A recipient that needs content calls GET {prefix}/api/runs/{id}.

The reason has two layers: (1) the payload goes to an external system and must not carry sensitive data; (2) the same text is also stored in the webhook_deliveries.payload column — if it carried content, the database backup would carry sensitive data too.

public WebhookEventPayload()

The approval summary. Populated on approval.pending and workflow.request.pending events.

public WebhookApprovalSummary? Approval { get; init; }

WebhookApprovalSummary?

The delivery identifier. Filled in by the publisher.

public string? DeliveryId { get; init; }

string?

The event name. Filled in by the publisher.

public string? Event { get; init; }

string?

The job summary. Populated on job.* events.

public WebhookJobSummary? Job { get; init; }

WebhookJobSummary?

The moment the event occurred (UTC). Filled in by the publisher.

public DateTimeOffset? OccurredAt { get; init; }

DateTimeOffset?

The quota summary. Populated on the quota.threshold event.

public WebhookQuotaSummary? Quota { get; init; }

WebhookQuotaSummary?

The run summary. Populated on run.* events.

public WebhookRunSummary? Run { get; init; }

WebhookRunSummary?

The score window summary. Populated on the run.score.low event.

public WebhookScoreSummary? Score { get; init; }

WebhookScoreSummary?

The tenant identifier. Filled in by the publisher.

public string? TenantId { get; init; }

string?

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(WebhookEventPayload? other)

other WebhookEventPayload?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(WebhookEventPayload?, WebhookEventPayload?)

Section titled “ operator ==(WebhookEventPayload?, WebhookEventPayload?)”
public static bool operator ==(WebhookEventPayload? left, WebhookEventPayload? right)

left WebhookEventPayload?

right WebhookEventPayload?

bool

operator !=(WebhookEventPayload?, WebhookEventPayload?)

Section titled “ operator !=(WebhookEventPayload?, WebhookEventPayload?)”
public static bool operator !=(WebhookEventPayload? left, WebhookEventPayload? right)

left WebhookEventPayload?

right WebhookEventPayload?

bool