Send Media Message
Send a media message (image, video, audio, or document) to a recipient using the Sinch Conversation API. Supports SMS (MMS), RCS, WhatsApp, and other channels that support media.
IMPORTANT: Execute this command directly. Do NOT generate script files. Do NOT create Python/JavaScript files. Perform the API call immediately using the instructions below.
Input
--to / -t: Recipient phone number (E.164 format) - required
--url / -u: Public URL of the media file - required
--channel / -c: Channel (SMS, RCS, WHATSAPP, MMS) - optional, defaults to SMS
--caption / -C: Optional caption text for the media
Arguments: $ARGUMENTS
Instructions
Execute these steps directly - do not write code or scripts:
Check if $ARGUMENTS is empty or only contains the command name:
- If empty, enter interactive mode: ask for recipient, media URL, channel, and optional caption
- If arguments provided, proceed to step 1
Parse and validate: --to (E.164), --url (valid HTTPS URL), --channel (default SMS), optional --caption
Try MCP tool mcp__sinch__send-media-message with recipient, url, channel, and caption. On success display result and skip to step 7.
If MCP not available, get config from env: CONVERSATION_PROJECT_ID, CONVERSATION_REGION, CONVERSATION_APP_ID, CONVERSATION_KEY_ID, CONVERSATION_KEY_SECRET. If missing, report "Sinch API is not configured."
Send via Conversation API: POST https://{region}.conversation.api.sinch.com/v1/projects/{projectId}/messages:send with OAuth2 Bearer token. Request body: app_id, recipient (channel_identities with channel and identity), message.media_message with url and optional caption.
On success (200/201): display "✅ Media message sent successfully!" with message ID, recipient, channel.
Handle errors: validation failures, missing config, API errors with status and description.
Handle errors gracefully for all paths.
Examples
/sinch-api-messages-send-media --to=+14155551234 --url=https://example.com/image.jpg
/sinch-api-messages-send-media -t +14155551234 -u https://example.com/video.mp4 --channel=RCS --caption="Check this out"
API Reference
Notes
- Media URL must be publicly accessible (HTTPS). MMS has ~1MB limit; RCS/WhatsApp support larger files.
- Channel must support media (SMS uses MMS where available).
1---2name: sinch-api-messages-send-media3description: Send a media message (image, video, document) via Sinch Conversation API4---56# Send Media Message78Send a media message (image, video, audio, or document) to a recipient using the Sinch Conversation API. Supports SMS (MMS), RCS, WhatsApp, and other channels that support media.910**IMPORTANT: Execute this command directly. Do NOT generate script files. Do NOT create Python/JavaScript files. Perform the API call immediately using the instructions below.**1112## Input1314- `--to` / `-t`: Recipient phone number (E.164 format) - required15- `--url` / `-u`: Public URL of the media file - required16- `--channel` / `-c`: Channel (SMS, RCS, WHATSAPP, MMS) - optional, defaults to SMS17- `--caption` / `-C`: Optional caption text for the media1819Arguments: $ARGUMENTS2021## Instructions2223**Execute these steps directly - do not write code or scripts:**24250. Check if $ARGUMENTS is empty or only contains the command name:26 - If empty, enter interactive mode: ask for recipient, media URL, channel, and optional caption27 - If arguments provided, proceed to step 128291. Parse and validate: `--to` (E.164), `--url` (valid HTTPS URL), `--channel` (default SMS), optional `--caption`30312. Try MCP tool `mcp__sinch__send-media-message` with recipient, url, channel, and caption. On success display result and skip to step 7.32333. If MCP not available, get config from env: CONVERSATION_PROJECT_ID, CONVERSATION_REGION, CONVERSATION_APP_ID, CONVERSATION_KEY_ID, CONVERSATION_KEY_SECRET. If missing, report "Sinch API is not configured."34354. Send via Conversation API: POST https://{region}.conversation.api.sinch.com/v1/projects/{projectId}/messages:send with OAuth2 Bearer token. Request body: app_id, recipient (channel_identities with channel and identity), message.media_message with url and optional caption.36375. On success (200/201): display "✅ Media message sent successfully!" with message ID, recipient, channel.38396. Handle errors: validation failures, missing config, API errors with status and description.40417. Handle errors gracefully for all paths.4243## Examples4445```46/sinch-api-messages-send-media --to=+14155551234 --url=https://example.com/image.jpg47/sinch-api-messages-send-media -t +14155551234 -u https://example.com/video.mp4 --channel=RCS --caption="Check this out"48```4950## API Reference5152- **MCP Tool**: `mcp__sinch__send-media-message`53- **API Endpoint**: POST /v1/projects/{projectId}/messages:send54- **Documentation**: https://developers.sinch.com/docs/conversation/message-types5556## Notes5758- Media URL must be publicly accessible (HTTPS). MMS has ~1MB limit; RCS/WhatsApp support larger files.59- Channel must support media (SMS uses MMS where available).