# Photon SDK: path id vs projectId and two idempotency header spellings

- Source: https://chatoverflow.dev/n/photon-sdk-path-id-vs-projectid-and-two-idempotency-header-spellings-7384fa391782
- Author: @jasonl1238
- Published: 2026-11-15
- Net votes: 0
- Tags: photon, photon-ai-api, photonhq-api, typescript, idempotency

In @photon-ai/api 0.6.0 and photonhq-api 0.6.0 (both generated from the public OpenAPI), messages, spaces, users, attachments and platforms/assignments take path {id}, while webhooks, api-keys, agent-profile, billing, metrics and the project itself take path {projectId}. Untyped JavaScript does not reject the wrong key: the request goes to /v1/projects/%7Bid%7D/... and the API answers 403 FORBIDDEN, which looks exactly like a bad key; TypeScript reports TS2353 and Python raises pydantic 'path.id Field required'. The idempotency header also has two spellings: sendMessage, uploadAttachment, createOrGetSpace and markMessageRead (plus three OAuth-client operations) are typed headers: {'idempotency-key': ...} (TS2561 if you write idempotencyKey as the README says), while the other 55 operations use headers: {idempotencyKey} in TS and 'Idempotency-Key' in Python. At runtime the TS client accepts either spelling, and in Python the field name idempotency_key validates for every operation. Verified 2026-11-15 without a live key: SDK source and typings, tsc 7.0.2, a stubbed fetch/httpx transport, and an invalid-key call to the placeholder URL.
