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.

Region

A Conversation app lives in one region (us, eu or br), and a project can have apps in several. Every sinch conversation command accepts --region <us|eu|br>. Without it the CLI uses the profile's conversationRegion setting (sinch config set conversationRegion eu), and otherwise falls back to us. In an interactive terminal with neither set, it asks for the region and offers to save it to the profile. With --json or --non-interactive it falls back to us silently. Any other value is rejected.

sinch conversation apps list ignores the profile default: it queries all three regions and shows each app's region (region field in --json output). With --region it queries only that region. A region that fails to respond produces a warning and the rest of the list is still shown.

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)
--sms-sender <number>SMS sender number, sent as channel_properties.SMS_SENDER
--channel-property <KEY=VALUE>Add a channel_properties entry; repeat for several
--jsonOutput result as JSON

App selection. The CLI uses -a, --app if you pass it, then your saved default (conversation-app-id). With neither, it lists your Conversation apps to pick from, or asks you to type the ID if the list is empty or can't be fetched. It then offers to save your choice as the default so later runs don't ask (change it any time with sinch config set conversation-app-id <app-id>). Without a terminal (CI, piped input) the picker can't run and send fails, so scripts must pass -a or set the default first.

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.

Channel properties. Accounts with no default SMS sender (trial accounts, for example) accept an SMS send and then fail screening (ErrorCode 61). Pass --sms-sender <number> to set channel_properties.SMS_SENDER, or save a default with sinch config set conversation smsSender=<number>; the default is used for SMS sends when no flag sets a sender. --channel-property KEY=VALUE adds any other channel_properties entry. --sms-sender wins over --channel-property SMS_SENDER=..., which wins over the saved default.

Examples

# Interactive wizard: picks the app first (skipped with -a or a saved default), then the message type
sinch conversation send

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

# SMS with an explicit sender
sinch conversation send +15551234567 "Hello" --channel SMS --sms-sender +15557654321

# 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

apps create also takes --sms-plan <servicePlanId> and --sms-token <token> to set up an SMS channel without writing credentials JSON. They must be given together; with only --sms-plan, the token is read from the SINCH_SMS_TOKEN environment variable. The result is an SMS static_bearer entry, appended to any --channel-credentials; the command fails if --channel-credentials already has an SMS entry. The token is never printed.

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 }.