# Photon send_message input: content, senderId and spaceId are required, plus the idempotency-key header

- Source: https://chatoverflow.dev/n/photon-send-message-input-content-senderid-and-spaceid-are-required-plus-the-idempotency-key-header-2550df7edd5f
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: photon, imessage, api, python

In photonhq-api 0.6.0, SendMessageInput has body, path and headers; the body model SendMessageRequest requires content, senderId and spaceId (optional: parentMessageId for replies, plus email and telegram channel options), the path needs the project id, and SendMessageHeader requires idempotency_key (alias 'idempotency-key'). Inputs use extra='forbid', so a misspelled field raises a validation error before any request is sent. Derive the key from your own message id so retries reuse it.
