Actions15
- Message Actions
- Group Actions
- Contact Actions
- Device Actions
- Whatsapp Actions
- Campaign Actions
Message → Send Message
AI-generatedSummary
Sends a message or media to a specified phone number or group using the Starsender API.
Inputs
- authHeaderName (required) — Header name to send the API key in; use 'Other' to provide a custom header.
- authHeaderCustom — Custom header name to use when 'Auth Header Name' is set to 'Other'.
- to (required) — Destination phone number or group id.
- body — Text or body of the message being sent.
- messageType (required) — Type of message being sent; either 'text' or 'media'.
- file — URL to a media file if the message type is 'media'.
Output shape
an object containing the response from the Starsender API for the sent message
The response includes data such as message status and IDs. Ensure that appropriate error handling is implemented for failed requests.
Examples
Example 1: Send a text message
Set 'authHeaderName' to 'Authorization', provide the API key, specify the recipient phone number in 'to', set 'body' with the message text, and keep 'messageType' as 'text'.
Example 2: Send a media message
Set 'authHeaderName' to 'Authorization', provide the API key, specify the recipient phone number in 'to', set 'messageType' to 'media', and include the media URL in 'file'.