CLI Reference
The TextBubbles CLI lets you interact with the API directly from your terminal. Perfect for quick operations, testing, and scripting.
Installation
npm install -g @textbubbles/jsOr use npx:
npx @textbubbles/js <command>Authentication
Login
Save your API key locally:
textbubbles login
# Enter your API key when promptedOr set via environment variable:
export TEXTBUBBLES_API_KEY=tb_your_api_keyCheck Auth Status
textbubbles whoamiLogout
textbubbles logoutMessages
Send a Message
# Basic message
textbubbles send "+14155551234" "Hello from CLI!"
# With effect
textbubbles send "+14155551234" "Congrats!" --effect confetti
# With media
textbubbles send "+14155551234" "Check this out" --media https://example.com/image.jpgSend Carousel
textbubbles send:carousel "+14155551234" \
https://example.com/img1.jpg \
https://example.com/img2.jpg \
https://example.com/img3.jpgSchedule a Message
textbubbles send:schedule "+14155551234" "Good morning!" \
--at "2026-03-29T09:00:00Z"List Messages
# All messages
textbubbles messages list
# Filter by recipient
textbubbles messages list --to "+14155551234"
# Limit results
textbubbles messages list --limit 10
# JSON output
textbubbles messages list --jsonGet Message Details
textbubbles messages get msg_abc123Cancel Scheduled Message
textbubbles messages cancel msg_abc123Contacts
List Contacts
# All contacts
textbubbles contacts list
# Filter by tag
textbubbles contacts list --tag vip
# Search by name
textbubbles contacts list --search "Jane"Create Contact
textbubbles contacts create \
--phone "+14155551234" \
--name "Jane Doe" \
--email "jane@example.com" \
--tags vip,customerGet Contact
textbubbles contacts get contact_abc123Delete Contact
textbubbles contacts delete contact_abc123Capabilities
Check iMessage Support
textbubbles check "+14155551234"Output:
+14155551234: iMessage ✓Webhooks
Get Current Config
textbubbles webhooks getSet Webhook URL
textbubbles webhooks set https://example.com/webhooks/textbubbles \
--secret whsec_your_secret \
--events message.received,message.deliveredPayments
Request Payment
textbubbles pay:request "+14155551234" 25.00 --memo "For lunch"List Payment Requests
textbubbles pay:listCancel Payment Request
textbubbles pay:cancel pay_abc123Global Options
| Option | Description |
|---|---|
--json | Output as JSON |
--api-key <key> | Override API key |
--base-url <url> | Override API base URL |
--help | Show help |
--version | Show version |
Configuration File
The CLI stores configuration in ~/.textbubbles/config.json:
{
"apiKey": "tb_your_api_key",
"baseUrl": "https://api.textbubbles.com"
}Scripting Examples
Send to Multiple Recipients
for phone in "+14155551234" "+14155555678" "+14155559999"; do
textbubbles send "$phone" "Hello!"
doneExport Messages to JSON
textbubbles messages list --json > messages.jsonCheck Multiple Numbers
cat numbers.txt | while read phone; do
textbubbles check "$phone"
done