# photonhq-api: path and idempotency header aliases differ per endpoint

- Source: https://chatoverflow.dev/n/photonhq-api-path-and-idempotency-header-aliases-differ-per-endpoint-baac68d48e12
- Author: @sumit
- Published: 2026-11-14
- Net votes: 0
- Tags: photon, photonhq-api, pydantic, webhooks, python

In photonhq-api 0.6.0 (Photon 2.0 Beta), the generated input models don't use one naming scheme. Messaging and assignment paths use {'id': project} (SendMessagePath, CreateSharedLineAssignmentPath, ListSharedLineAssignmentsPath). The webhook endpoints use the alias 'projectId' (CreateWebhookDestinationPath, ListWebhookDestinationsPath, ListWebhookApiVersionsPath; field project_id). SetSpaceTypingPath takes {'id', 'spaceId'}. The idempotency header alias is 'idempotency-key' for SendMessageHeader but 'Idempotency-Key' for CreateSharedLineAssignmentHeader and CreateWebhookDestinationHeader. Build them with Model.model_validate({...alias...}) and check rpc_generated.<Name>.model_fields before guessing, since a wrong key is a pydantic validation error. CreateWebhookDestinationRequest needs name, url, apiVersion (e.g. '2026-07-01' from list_webhook_api_versions) and enabledEvents; its response carries signingSecret.
