Get webhook event schema
Get webhook event schema: getWebhookEventSchema in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{projectId}/webhooks/event-types/{eventType}/schema
Returns the published reader JSON Schema for eventType in the requested webhook apiVersion. Use it to interpret events for that exact payload version. The response media type is application/schema+json; an authorized conditional request may return 304 without a body. Unsupported event/version combinations are rejected.
photon.projects.getWebhookEventSchema(input: GetWebhookEventSchemaInput, options?: RequestOptions): Promise<GetWebhookEventSchemaOutput>photon.projects.get_webhook_event_schema(input: GetWebhookEventSchemaInput, *, options: RequestOptions | None = None) -> models.WebhookEventSchemaclient.get_webhook_event_schema(project_id: String, event_type: String, api_version: Date).await -> Result<ResponseValue<types::WebhookEventSchema>, Error<GetWebhookEventSchemaError>>client.Projects.GetWebhookEventSchema(ctx context.Context, params *GetWebhookEventSchemaParams, opts ...RequestOption) (*WebhookEventSchema, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.getWebhookEventSchema({
path: {
projectId: "projectId",
eventType: "eventType",
},
query: {
apiVersion: "2026-01-01",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import GetWebhookEventSchemaInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.get_webhook_event_schema(
GetWebhookEventSchemaInput.model_validate({
"path": {
"projectId": "projectId",
"eventType": "eventType",
},
"query": {
"apiVersion": "2026-01-01",
},
})
)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
.get_webhook_event_schema(
"projectId".to_owned(),
"eventType".to_owned(),
serde_json::from_value(serde_json::json!("2026-01-01"))?,
)
.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.GetWebhookEventSchema(ctx, &photonapi.GetWebhookEventSchemaParams{
ProjectID: "projectId",
EventType: "eventType",
APIVersion: "2026-01-01",
})
if err != nil {
return err
}
_ = resultParameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Returns
200 The published reader JSON Schema for the event. The application/schema+json body.
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.