Skip to content
Shortcut: /, ⌘K or Ctrl+K

polymorfa message

Send messages and perform message actions.

Polymorfa CLI · CLI API requests

View as Markdown

polymorfa message delete

Delete a message you sent for everyone in the conversation.

Usage

polymorfa message delete MESSAGE [flags]

Example

polymorfa message delete 740000000001 --session session_123 --chat 730000000001 --yes

Arguments

  • MESSAGErequired

    Message ID.

Flags

  • --chat <value>takes a valuerequired

    Conversation that contains the message.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api
  • --yesboolean

    Confirm deletion without an interactive prompt.

Also accepts the global flags.

polymorfa message edit

Replace the text of a message you sent.

Usage

polymorfa message edit MESSAGE [flags]

Example

polymorfa message edit 740000000001 --session session_123 --chat 730000000001 --body "Corrected text"

Arguments

  • MESSAGErequired

    Message ID.

Flags

  • --body <value>takes a valuerequired

    Replacement text.

  • --chat <value>takes a valuerequired

    Conversation that contains the message.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api

Also accepts the global flags.

polymorfa message mark-seen

Mark a message as seen.

Usage

polymorfa message mark-seen MESSAGE [flags]

Arguments

  • MESSAGErequired

    Message ID.

Flags

  • --chat <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --idempotency-key <value>takes a value

    Safely identify retries of this seen receipt.

  • --session <value>takes a valuerequired

    Messaging session ID.

Also accepts the global flags.

polymorfa message operation-status

Read the outcome of a message operation without sending again.

Usage

polymorfa message operation-status OPERATION [flags]

Arguments

  • OPERATIONrequired

    Operation ID from the send response.

Flags

  • --session <value>takes a valuerequired

    Number session name.

Also accepts the global flags.

polymorfa message react

React to a message.

Usage

polymorfa message react MESSAGE [flags]

Arguments

  • MESSAGErequired

    Message ID.

Flags

  • --chat <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --emoji <value>takes a valuerequired

    Reaction emoji.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api

Also accepts the global flags.

polymorfa message send audio

Send audio or a voice note from a local file or URL.

Usage

polymorfa message send audio [flags]

Examples

polymorfa message send audio --session session_123 --to +15551234567 --file ./note.ogg
polymorfa message send audio --session session_123 --to +15551234567 --url https://example.com/note.ogg

Flags

  • --file <value>takes a value

    Local file to upload with the message.

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --max-bytes <value>takes a value

    Reject local files larger than this many bytes.

    Default 104857600
  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --mime-type <value>takes a value

    MIME type. Inferred from the file extension when omitted.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api
  • --url <value>takes a value

    Public http or https URL the API fetches the media from.

  • --voiceboolean

    Send as a push-to-talk voice note instead of an audio file.

Also accepts the global flags.

polymorfa message send buttons

Send an interactive message with reply, URL, call, or copy-code buttons.

Usage

polymorfa message send buttons [flags]

Examples

polymorfa message send buttons --session session_123 --to +15551234567 --body "Confirm your order?" --button reply:yes=Yes --button reply:no=No
polymorfa message send buttons --session session_123 --to +15551234567 --body "Track it" --button "url:Open tracking=https://example.com/t/123"

Flags

  • --body <value>takes a valuerequired

    Message body.

  • --button <value>takes a valuerequiredrepeatable

    Button as reply:=, url:=, call:=<+E.164>, or copy:=. Repeat for several buttons.

  • --footer <value>takes a value

    Footer text.

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --title <value>takes a value

    Header title.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api

Also accepts the global flags.

polymorfa message send contact

Send a contact card built from flags or read from a vCard file.

Usage

polymorfa message send contact [flags]

Examples

polymorfa message send contact --session session_123 --to +15551234567 --name "Ada Lovelace" --phone +15557654321
polymorfa message send contact --session session_123 --to +15551234567 --vcard ./ada.vcf

Flags

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --name <value>takes a value

    Contact display name.

  • --organization <value>takes a value

    Contact organization.

  • --phone <value>takes a valuerepeatable

    Contact E.164 phone number. Repeat for several numbers.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api
  • --vcard <value>takes a value

    Read one vCard from a file.

Also accepts the global flags.

polymorfa message send document

Send a document from a local file or URL.

Usage

polymorfa message send document [flags]

Examples

polymorfa message send document --session session_123 --to +15551234567 --file ./invoice.pdf
polymorfa message send document --session session_123 --to +15551234567 --url https://example.com/invoice.pdf

Flags

  • --caption <value>takes a value

    Caption sent with the document.

  • --file <value>takes a value

    Local file to upload with the message.

  • --filename <value>takes a value

    File name shown to the recipient. Defaults to the local file name.

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --max-bytes <value>takes a value

    Reject local files larger than this many bytes.

    Default 104857600
  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --mime-type <value>takes a value

    MIME type. Inferred from the file extension when omitted.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api
  • --url <value>takes a value

    Public http or https URL the API fetches the media from.

Also accepts the global flags.

polymorfa message send image

Send an image from a local file or URL.

Usage

polymorfa message send image [flags]

Examples

polymorfa message send image --session session_123 --to +15551234567 --file ./photo.jpg
polymorfa message send image --session session_123 --to +15551234567 --url https://example.com/photo.jpg

Flags

  • --caption <value>takes a value

    Caption sent with the image.

  • --file <value>takes a value

    Local file to upload with the message.

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --max-bytes <value>takes a value

    Reject local files larger than this many bytes.

    Default 104857600
  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --mime-type <value>takes a value

    MIME type. Inferred from the file extension when omitted.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api
  • --url <value>takes a value

    Public http or https URL the API fetches the media from.

Also accepts the global flags.

polymorfa message send list

Send an interactive list message with selectable rows.

Usage

polymorfa message send list [flags]

Example

polymorfa message send list --session session_123 --to +15551234567 --title "Pick a slot" --button-text Choose --row "Morning/am9=9:00" --row "Afternoon/pm2=14:00|Near the office"

Flags

  • --button-text <value>takes a valuerequired

    Label of the button that opens the list.

  • --description <value>takes a value

    Body text above the button.

  • --footer <value>takes a value

    Footer text.

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --row <value>takes a valuerequiredrepeatable

    Row as [/]=[|]. Repeat for several rows; rows with the same section are grouped.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --title <value>takes a valuerequired

    List title.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api

Also accepts the global flags.

polymorfa message send location

Send a location pin.

Usage

polymorfa message send location [flags]

Example

polymorfa message send location --session session_123 --to +15551234567 --lat 51.5007 --long=-0.1246 --address "Westminster, London"

Flags

  • --address <value>takes a value

    Address shown with the pin.

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --lat <value>takes a valuerequired

    Latitude in degrees.

  • --long <value>takes a valuerequired

    Longitude in degrees. Use --long=-0.12 for negative values.

  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api

Also accepts the global flags.

polymorfa message send order

Send a Brazil order with Pix, payment link or boleto instructions (beta; Official API Numbers only). Polymorfa relays the order and does not process the payment. Makes one attempt.

Usage

polymorfa message send order [flags]

Examples

polymorfa message send order --session session_123 --to +5511987654321 --order order.json
cat order.json | polymorfa message send order --session session_123 --to +5511987654321 --order - --idempotency-key order-1522

Flags

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key to check a previous attempt (24-hour retention).

  • --order <value>takes a valuerequired

    Read the orderDetails JSON object (referenceId, type, body, currency, totalAmount, paymentSettings, optional order) from a file or stdin (-).

  • --session <value>takes a valuerequired

    Messaging session ID of an Official API Number.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID of the buyer.

Also accepts the global flags.

polymorfa message send order-status

Update a Brazil order sent with "message send order" (beta). Send a payment status only after your payment provider confirms it; captured shows the order as paid. Makes one attempt.

Usage

polymorfa message send order-status [flags]

Example

polymorfa message send order-status --session session_123 --to +5511987654321 --reference-id order-1522 --body "Payment received" --order-status processing --payment-status captured

Flags

  • --body <value>takes a valuerequired

    Message text.

  • --footer <value>takes a value

    Footer text.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key to check a previous attempt (24-hour retention).

  • --order-description <value>takes a value

    Order status detail, such as a cancellation reason.

  • --order-status <value>takes a value

    New order status.

    Allowed valuespendingprocessingpartially_shippedshippedcompletedcanceled
  • --payment-status <value>takes a value

    Payment status confirmed by your payment provider.

    Allowed valuespendingcapturedfailed
  • --payment-timestamp <value>takes a value

    Payment time in Unix seconds.

  • --reference-id <value>takes a valuerequired

    The referenceId of the order.

  • --session <value>takes a valuerequired

    Messaging session ID of an Official API Number.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID of the buyer.

Also accepts the global flags.

polymorfa message send poll

Send a poll.

Usage

polymorfa message send poll [flags]

Example

polymorfa message send poll --session session_123 --to 730000000001 --title "Lunch?" --option Pizza --option Sushi

Flags

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --multi-selectboolean

    Allow voters to choose more than one option.

  • --option <value>takes a valuerequiredrepeatable

    Poll option. Repeat for 2 to 12 options.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --title <value>takes a valuerequired

    Poll question.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api

Also accepts the global flags.

polymorfa message send template

Send an approved message template by name and language.

Usage

polymorfa message send template [flags]

Examples

polymorfa message send template --session session_123 --to +15551234567 --name order_update --language en_US
polymorfa message send template --session session_123 --to +15551234567 --name order_update --language en_US --components components.json

Flags

  • --components <value>takes a value

    Read the template components JSON array from a file or stdin (-).

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --language <value>takes a valuerequired

    Template language code, such as en_US.

  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --name <value>takes a valuerequired

    Template name.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api

Also accepts the global flags.

polymorfa message send text

Send a text message.

Usage

polymorfa message send text [flags]

Flags

  • --body <value>takes a valuerequired

    Text to send.

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api

Also accepts the global flags.

polymorfa message send video

Send a video from a local file or URL.

Usage

polymorfa message send video [flags]

Examples

polymorfa message send video --session session_123 --to +15551234567 --file ./clip.mp4
polymorfa message send video --session session_123 --to +15551234567 --url https://example.com/clip.mp4

Flags

  • --caption <value>takes a value

    Caption sent with the video.

  • --file <value>takes a value

    Local file to upload with the message.

  • --forwardedboolean

    Mark the message as forwarded.

  • --idempotency-key <value>takes a value

    Idempotency-Key header. Generated per invocation when omitted; reuse an explicit key across process retries (24-hour retention).

  • --max-bytes <value>takes a value

    Reject local files larger than this many bytes.

    Default 104857600
  • --mention <value>takes a valuerepeatable

    Mention a Polymorfa user ID. Repeat for multiple recipients.

  • --mime-type <value>takes a value

    MIME type. Inferred from the file extension when omitted.

  • --reply-to <value>takes a value

    Polymorfa message ID to quote in the reply.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --to <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --transport <value>takes a value

    Send using routing rules (auto), Linked Devices, or Official API. Explicit choices never fall back.

    Allowed valuesautolinked_devicesofficial_api
  • --url <value>takes a value

    Public http or https URL the API fetches the media from.

Also accepts the global flags.

polymorfa message star

Star or unstar a message.

Usage

polymorfa message star MESSAGE [flags]

Arguments

  • MESSAGErequired

    Message ID.

Flags

  • --chat <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --idempotency-key <value>takes a value

    Safely identify retries of this star update.

  • --removeboolean

    Remove the existing star.

  • --session <value>takes a valuerequired

    Messaging session ID.

Also accepts the global flags.

polymorfa message typing

Set typing for a chat. Official Numbers require --id and --state typing; the inbound message is marked read.

Usage

polymorfa message typing [flags]

Flags

  • --chat <value>takes a valuerequired

    Conversation ID, E.164 phone number, or BSUID.

  • --id <value>takes a value

    Inbound message ID. Required on Official Numbers; marks the message read and shows typing for up to 25 seconds.

  • --idempotency-key <value>takes a value

    Request identifier. The API does not deduplicate typing updates by this header.

  • --session <value>takes a valuerequired

    Messaging session ID.

  • --state <value>takes a valuerequired

    Typing state.

    Allowed valuestypingrecordingpaused

Also accepts the global flags.