wasender.messages.send_media ​
Send a media message by URL
Send an image/video/audio/document/sticker by URL via POST /send-message.
Inputs:
- cloud_connection_uuid: UUID — the cloud connection holding the Wasender token.
- to: str — recipient (phone number, group JID, or channel ID).
- media_type: str — one of image/video/audio/document/sticker.
- url: str — publicly-reachable media URL.
- caption: str (optional) — caption text.
- view_once: bool (optional) — send as view-once.
- quoted_message_id: str (optional) — ID of a message to reply to / quote.
- mentions: list (optional) — JIDs to @-mention.
Outputs (terminal state_data):
- message_id: str — provider-assigned ID of the sent message.
- status: str — send status string.
- to: str — echoed recipient.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-wasender |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
cloud_connection_uuid | uuid | Yes | — | Cloud connection holding the Wasender credential |
to | string | Yes | — | Recipient — phone number, group JID, or channel ID |
media_type | string | Yes | — | One of image / video / audio / document / sticker |
url | string | Yes | — | Publicly-reachable URL of the media to send |
caption | string | No | — | Caption text for the media |
view_once | boolean | No | — | Send as a view-once message |
quoted_message_id | string | No | — | ID of a message to reply to / quote |
mentions | list | No | — | List of JIDs to @-mention in the message |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
message_id | string | No | — | — |
status | string | No | — | — |
to | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | integer | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "wasender.messages.send_media",
"initial_data": {
"cloud_connection_uuid": "value",
"to": "value",
"media_type": "value",
"url": "value"
}
}