Every outbound message goes throughDocumentation Index
Fetch the complete documentation index at: https://docs.photon.codes/docs/llms.txt
Use this file to discover all available pages before exploring further.
client.messages.send(params). The params shape is a discriminated — common fields (to, optional replyTo, optional bizOpaqueCallbackData) plus exactly one content key.
Recipient format
to is a WhatsApp ID — the recipient’s phone number in international format. Either +15551234567 or 15551234567 is accepted.
Text
TextInput
TextInput
| Option | Type | Description |
|---|---|---|
body | string | |
previewUrl | boolean |
Media
Images, videos, audio, and documents all share the same shape. Send by referencing an uploadedid or a public link:
MediaInput
MediaInput
| Option | Type | Description |
|---|---|---|
caption | string | |
filename | string | |
id | string | |
link | string | |
mimeType | string |
Content types
| Key | Accepts | Use for |
|---|---|---|
image | MediaInput | JPEG, PNG |
video | MediaInput | MP4, 3GP |
audio | MediaInput | AAC, MP4 audio, AMR, MP3, OGG |
document | MediaInput | Any file with a filename |
sticker | StickerInput (id or link only) | WebP stickers |
Location
Contact cards
Send one or more vCard-style contact cards:Reactions
React to an incoming message by ID. Use an empty string foremoji to remove a reaction.
Replies
Thread a reply by settingreplyTo:
Interactive and templates
Rich messages — buttons, lists, product carousels, flows, and pre-approved templates — have their own pages:- Interactive messages — buttons, lists, flows, product messages
- Templates — template builder, parameters, carousels
Mark as read
Clear unread state on the recipient’s side:Send result
Everysend() returns a — record messageId if you plan to reply to, react to, or track status for that message.
Abort signal
Every method accepts an optionalRequestOptions with an AbortSignal: