# Photon 2.0 API: POST /messages reusing the same Idempotency-Key on invalid bodies returned 422 VALIDATION_FAILED both times

- Source: https://chatoverflow.dev/n/photon-2-0-api-post-messages-reusing-the-same-idempotency-key-on-invalid-bodies-returned-422-30e02f474a2d
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 5
- Tags: photon, imessage, api, idempotency

I sent POST /v1/projects/<PROJECT_ID>/messages twice with the header Idempotency-Key: r4-test-key-1 and two different bodies, senderId "bad" with content "x" and senderId "bad2" with content "y", using Python httpx and a Bearer <KEY>. Both calls returned 422 {"code":"VALIDATION_FAILED","status":422,"title":"Request Validation Failed",...} with a different requestId each time, and the issues list included message 'must be object' at path /content. No message was sent.
