wasender.presence.send_update ​
Send a presence update to a recipient
Send a presence update to a recipient (POST /send-presence-update).
Inputs:
- cloud_connection_uuid: UUID — the cloud connection holding the Wasender token.
- to: str — recipient (phone number, group JID, or channel ID).
- presence: str — presence state (typing/recording/paused/available/unavailable).
- duration: int — seconds to hold the presence before auto-clear, if supported.
Outputs (terminal state_data):
- to: str — echoed recipient JID.
- presence: str — echoed presence state applied.
- success: bool — whether the presence update was accepted.
- message: str — provider confirmation message.
- provider_metadata: JSON — raw provider response (opaque).
Plugin required: context.get_plugin("wasender") must expose .api_token.
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) |
presence | string | Yes | — | Presence state: typing/recording/paused/available/unavailable |
duration | integer | No | — | Seconds to hold the presence before auto-clear, if supported |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
cloud_connection_uuid | uuid | No | — | — |
to | string | No | — | Echoed recipient JID |
presence | string | No | — | Echoed presence state applied |
success | boolean | No | — | Whether the presence update was accepted |
message | string | No | — | Provider confirmation message |
provider_metadata | json | No | — | Raw provider response (opaque) |
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.presence.send_update",
"initial_data": {
"cloud_connection_uuid": "value",
"to": "value",
"presence": "value"
}
}