Skip to content

sinch conversation

Interact with the Sinch Conversation API: send messages, manage contacts, list conversations, configure apps, webhooks, and templates. See Sinch Conversation API on developers.sinch.com for product documentation.

SMS is sent via sinch conversation send --channel SMS.

sinch conversation send

Send a message via the Conversation API. Supports 8 message types: text, media, template, card, carousel, choice, location, and list. Run without arguments for an interactive wizard that guides you through message type selection and type-specific fields.

Syntax

sinch conversation send [recipient] [message] [options]

Options

OptionDescription
[recipient]Recipient phone number in E.164 format
[message]Message text (for text messages)
-c, --channel <channel>Channel: SMS, WHATSAPP, MESSENGER, INSTAGRAM, VIBER, TELEGRAM, RCS, LINE
-a, --app <app-id>Conversation App ID (uses default if configured)
-t, --type <type>Message type: text, media, template, card, carousel, choice, location, list
-m, --media <url>Media URL for media messages
--caption <text>Caption for media messages
--template <name>Template ID for template messages
-p, --params <json>Template parameters as JSON
--locationSend a location message
--lat <latitude>Latitude (required with --location)
--lng <longitude>Longitude (required with --location)
-n, --name <name>Location name
--json-message <json>Raw message body as JSON (escape hatch for any message structure)
--jsonOutput result as JSON

Channel selection. The CLI looks up which channels the target app actually has configured. In the interactive picker, only those channels are offered (it falls back to the full list if the lookup fails). If you pass -c, --channel explicitly for a channel the app doesn't have configured, the command fails fast with guidance instead of letting the send fail at the API — add the channel's credentials at dashboard.sinch.com/convapi/apps.

Examples

# Interactive wizard — message type is the first question
sinch conversation send

# Direct text message
sinch conversation send +15551234567 "Hello from Sinch" --channel SMS

# Media message
sinch conversation send +15551234567 --channel WHATSAPP --media https://example.com/image.jpg --caption "Check this out"

# Raw JSON escape hatch
sinch conversation send +15551234567 -c WHATSAPP --json-message '{"text_message":{"text":"hi"}}'

sinch conversation messages

Manage conversation messages: list, get, delete, and update metadata.

SubcommandDescription
sinch conversation messages listList messages
sinch conversation messages get <id>Get a specific message by ID
sinch conversation messages delete <id>Delete a message
sinch conversation messages update <id> --metadata <json>Update message metadata
OptionDescription
-c, --channel <channel>Filter by channel
-l, --limit <number>Maximum messages to return
--jsonOutput as JSON

messages delete <id> accepts -f, --force, --non-interactive and --json. With --json it never prompts, needs -f/--force and prints { "messageId": "<id>", "deleted": true }.

sinch conversation contacts

List and manage contacts in the Conversation API.

sinch conversation contacts list [options]
OptionDescription
-l, --limit <number>Maximum contacts to return (default 50)
--no-interactiveDisable interactive mode
--jsonOutput as JSON
SubcommandDescription
sinch conversation contacts createCreate a contact: -p, --phone <number>, -e, --email <email>, -n, --name <name>, -d, --display-name <name>
sinch conversation contacts get <id>Show one contact
sinch conversation contacts update <id>Update a contact: -n, --name <name>, -d, --display-name <name>
sinch conversation contacts delete <id>Delete a contact
sinch conversation contacts merge <source-id> <dest-id>Merge two contacts

contacts delete options:

OptionDescription
-f, --forceSkip confirmation
--non-interactiveSkip confirmation (alias for --force)
--jsonOutput as JSON

With --json, contacts delete never prompts, needs -f/--force and prints { "contactId": "<id>", "deleted": true }.

sinch conversation conversations

List conversations in a Conversation API app.

sinch conversation conversations list [options]
sinch conversation conversations get <conversation-id> [--json]

conversations list options:

OptionDescription
-a, --app <app-id>Filter by Conversation App ID
-l, --limit <number>Maximum conversations to return (default 50)
--jsonOutput as JSON

conversations stop <id> accepts -f, --force, --non-interactive and --json. With --json it never prompts, needs -f/--force and prints { "conversationId": "<id>", "stopped": true }.

sinch conversation apps

Manage Conversation API apps.

SubcommandDescription
sinch conversation apps listList Conversation apps
sinch conversation apps get <id>Get a Conversation app by ID
sinch conversation apps create [name]Create a new Conversation app
sinch conversation apps update <id>Update a Conversation app
sinch conversation apps delete <id>Delete a Conversation app
OptionDescription
-l, --limit <number>Maximum apps to return
--jsonOutput as JSON

apps create also accepts (every field of the Conversation API app create request):

OptionDescription
--processing-mode <mode>CONVERSATION or DISPATCH
--metadata-report-view <view>NONE or FULL
--retention-type <type>MESSAGE_EXPIRE_POLICY, CONVERSATION_EXPIRE_POLICY or PERSIST_RETENTION_POLICY
--retention-days <days>Retention time to live in days
--dispatch-retention-type <type>Dispatch retention type (MESSAGE_EXPIRE_POLICY)
--dispatch-retention-days <days>Dispatch retention time to live in days
--smart-conversationEnable Smart Conversations
--callback-secret <secret>Secret for overridden callback URLs
--retry-duration <seconds>Message retry duration
--fallbackEnable delivery report based fallback
--fallback-wait <seconds>Delivery report waiting time before fallback
--channel-credentials <json>JSON array of channel credential objects

With a name (sinch conversation apps create "My App") the command never prompts and sends only the flags you pass. Without a name it prompts for the name and then for each setting above; flags given alongside pre-fill the prompt defaults. Accepting every default sends the display name, processing mode CONVERSATION, metadata report view NONE and retention type MESSAGE_EXPIRE_POLICY; empty answers are omitted. The dispatch retention prompts appear only when the processing mode is DISPATCH.

apps update <id> accepts the same flags as apps create, plus --display-name <name>, and never prompts when a field flag is given. --smart-conversation and --fallback also have off forms, --no-smart-conversation and --no-fallback. The command sends an update_mask listing only the top-level fields you passed, so everything else (channel credentials included) stays as it is. With no field flags in a terminal it fetches the app and prompts for the display name and each setting above with the current value as the default, then sends only the fields whose value changed; if nothing changed it prints No changes and does not call the API. Without a terminal and without field flags it fails without calling the API.

apps delete also accepts:

OptionDescription
-f, --forceSkip confirmation
--non-interactiveSkip confirmation (alias for --force)
--jsonOutput as JSON

With --json, apps delete never prompts, needs -f/--force and prints { "appId": "<id>", "deleted": true }.

sinch conversation webhooks

Manage webhooks for Conversation apps.

SubcommandDescription
sinch conversation webhooks listList webhooks for an app
sinch conversation webhooks createCreate a new webhook (interactive)
sinch conversation webhooks update <id>Update a webhook
sinch conversation webhooks delete <id>Delete a webhook
OptionDescription
-a, --app <app-id>Conversation App ID
--jsonOutput as JSON

webhooks create always creates the webhook with target_type: HTTP. It also accepts these, and asks for any of app, URL and triggers that you leave out:

OptionDescription
-u, --url <url>Webhook URL
-t, --triggers <triggers>Comma-separated list of triggers (e.g., MESSAGE_INBOUND,MESSAGE_DELIVERY)
-s, --secret <secret>Webhook secret for signature validation

webhooks update also accepts:

OptionDescription
-u, --url <url>New webhook URL
-t, --triggers <triggers>New comma-separated list of triggers
-s, --secret <secret>New webhook secret
--target-type <type>Webhook target type (HTTP or DISMISS) — use HTTP to fix a webhook stuck as DISMISS

webhooks delete also accepts:

OptionDescription
-f, --forceSkip confirmation
--non-interactiveSkip confirmation (alias for --force)
--jsonOutput as JSON

With --json, webhooks delete never prompts, needs -f/--force and prints { "webhookId": "<id>", "deleted": true }.

sinch conversation templates

Manage Conversation message templates via the templatesV2 API.

SubcommandDescription
sinch conversation templates listList all message templates
sinch conversation templates get <id>Get a template by ID (with translations)
sinch conversation templates createCreate a new message template (interactive)
sinch conversation templates delete <id>Delete a message template
OptionDescription
--jsonOutput as JSON

templates delete also accepts:

OptionDescription
-f, --forceSkip confirmation
--non-interactiveSkip confirmation (alias for --force)
--jsonOutput as JSON

With --json, templates delete never prompts, needs -f/--force and prints { "templateId": "<id>", "deleted": true }.

We'd love to hear from you!
Rate this content: