Skip to content

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>
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",
  },
});

Parameters

Photon-VersionPhotonVersion

Selects the API contract date. Without it, the request is served as 2026-07-01.

projectIdstringrequired
eventTypestringrequired
apiVersionstring (date)required

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.