Retry webhook delivery
Retry webhook delivery: retryWebhookDelivery in the TypeScript, Python, Rust and Go clients.
POST /v1/projects/{projectId}/webhooks/destinations/{destinationId}/retries
Requests an immediate attempt of the selected delivery if it is still the waiting head for its destination and event type. expectedAttemptCount is the failed-attempt counter recorded on the delivery and fences stale requests. This overrides the current backoff, including Retry-After, once. It preserves event identity and the retry budget. Delivered, active, disabled and dead-lettered deliveries cannot be retried. A 202 acknowledges the wake-up, not successful delivery. Supply an Idempotency-Key and retain it when retrying an ambiguous failure.
photon.projects.retryWebhookDelivery(input: RetryWebhookDeliveryInput, options?: RequestOptions): Promise<RetryWebhookDeliveryOutput>photon.projects.retry_webhook_delivery(input: RetryWebhookDeliveryInput, *, options: RequestOptions | None = None) -> models.RetryWebhookDeliveryResponseclient.retry_webhook_delivery(idempotency_key: String, destination_id: String, project_id: String, body: &types::RetryWebhookDeliveryRequest).await -> Result<ResponseValue<types::RetryWebhookDeliveryResponse>, Error<RetryWebhookDeliveryError>>client.Projects.RetryWebhookDelivery(ctx context.Context, params *RetryWebhookDeliveryParams, opts ...RequestOption) (*RetryWebhookDeliveryResponse, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.retryWebhookDelivery({
path: {
destinationId: "destinationId",
projectId: "projectId",
},
headers: {
idempotencyKey: "idempotencyKey",
},
body: {
eventId: "eventId",
eventType: "eventType",
expectedAttemptCount: 0,
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import RetryWebhookDeliveryInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.retry_webhook_delivery(
RetryWebhookDeliveryInput.model_validate({
"path": {
"destinationId": "destinationId",
"projectId": "projectId",
},
"headers": {
"Idempotency-Key": "idempotencyKey",
},
"body": {
"eventId": "eventId",
"eventType": "eventType",
"expectedAttemptCount": 0,
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.retry_webhook_delivery(
"idempotencyKey".to_owned(),
"destinationId".to_owned(),
"projectId".to_owned(),
&serde_json::from_value(serde_json::json!({
"eventId": "eventId",
"eventType": "eventType",
"expectedAttemptCount": 0,
}))?,
)
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"encoding/json"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
var body photonapi.RetryWebhookDeliveryRequest
if err := json.Unmarshal([]byte(`{
"eventId": "eventId",
"eventType": "eventType",
"expectedAttemptCount": 0
}`), &body); err != nil {
return err
}
result, err := client.Projects.RetryWebhookDelivery(ctx, &photonapi.RetryWebhookDeliveryParams{
IdempotencyKey: "idempotencyKey",
DestinationID: "destinationId",
ProjectID: "projectId",
Body: body,
})
if err != nil {
return err
}
_ = result{
"status": "accepted"
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Identifies one logical mutation across retries.
Body
Returns
202 The waiting delivery was made eligible for an immediate attempt. RetryWebhookDeliveryResponse
Headers: Photon-Version. The raw response carries these headers; see Raw responses.