List webhook API versions
List webhook API versions: listWebhookApiVersions in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{projectId}/webhooks/api-versions
Lists the published webhook payload API versions and their lifecycle metadata. The list is the same for every project. Use the selectable indicator when choosing a version for a destination. These payload dates are separate from SDK package versions. An authorized conditional request may return 304 without a response body.
photon.projects.listWebhookApiVersions(input: ListWebhookApiVersionsInput, options?: RequestOptions): Promise<ListWebhookApiVersionsOutput>photon.projects.list_webhook_api_versions(input: ListWebhookApiVersionsInput, *, options: RequestOptions | None = None) -> models.ListWebhookApiVersionsResponseclient.list_webhook_api_versions(project_id: String).await -> Result<ResponseValue<types::ListWebhookApiVersionsResponse>, Error<ListWebhookApiVersionsError>>client.Projects.ListWebhookApiVersions(ctx context.Context, params *ListWebhookApiVersionsParams, opts ...RequestOption) (*ListWebhookApiVersionsResponse, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.listWebhookApiVersions({
path: {
projectId: "projectId",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import ListWebhookApiVersionsInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.list_webhook_api_versions(
ListWebhookApiVersionsInput.model_validate({
"path": {
"projectId": "projectId",
},
})
)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
.list_webhook_api_versions("projectId".to_owned())
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.ListWebhookApiVersions(ctx, &photonapi.ListWebhookApiVersionsParams{
ProjectID: "projectId",
})
if err != nil {
return err
}
_ = result{
"apiVersions": [
{
"retirement": null,
"selectable": true,
"status": "preview",
"successor": null,
"version": "2026-01-01"
}
],
"contractNamespace": "@photon-hq/contracts",
"packageVersion": "string"
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Returns
200 Published webhook payload API versions. ListWebhookApiVersionsResponse
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.
304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.