KosmoKrator

communication

Twilio CLI for Headless Automation

Use the Twilio CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.

15 functions 10 read 5 write API token auth

Twilio CLI for Headless Automation

Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.

Use headless automation when another tool needs a stable local command surface. The Twilio CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Twilio CLI for Headless Automation
kosmokrator integrations:configure twilio --set account_sid="$TWILIO_ACCOUNT_SID" --set auth_token="$TWILIO_AUTH_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call twilio.twilio_send_sms '{"to":"example_to","from":"example_from","body":"example_body","media_url":"example_media_url","status_callback":"example_status_callback"}' --json

Discovery Before Execution

Agents and scripts can inspect Twilio docs and schemas before choosing a function.

kosmo integrations:docs twilio --json
kosmo integrations:docs twilio.twilio_send_sms --json
kosmo integrations:schema twilio.twilio_send_sms --json
kosmo integrations:search "Twilio" --json
kosmo integrations:list --json

Useful Twilio CLI Functions

FunctionTypeParametersDescription
twilio.twilio_send_sms Write to, from, body, media_url, status_callback Send an SMS or MMS message via Twilio. Provide "to" and "from" phone numbers in E.164 format (e.g., "+15551234567"). Optionally include media_url for MMS and status_callback for delivery tracking.
twilio.twilio_get_message Read message_sid Retrieve a Twilio message by its SID. Returns the full message details including status, body, timestamps, and pricing.
twilio.twilio_list_messages Read to, from, date_sent, limit, page_size List Twilio messages with optional filtering. Filter by To, From, DateSent. Use PageSize to control pagination (default 50, max 1000).
twilio.twilio_make_call Write to, from, url, twiml, status_callback Make an outbound voice call via Twilio. Provide a "url" that returns TwiML, or inline "twiml" to control the call. Optionally provide a status_callback URL for call progress events.
twilio.twilio_get_call Read call_sid Retrieve a Twilio call by its SID. Returns the full call details including status, duration, timestamps, and pricing.
twilio.twilio_list_calls Read to, from, status, limit, page_size List Twilio calls with optional filtering. Filter by To, From, Status. Use PageSize to control pagination (default 50, max 1000).
twilio.twilio_list_phone_numbers Read limit List incoming phone numbers on the Twilio account. Returns all phone numbers associated with the account, including capabilities.
twilio.twilio_get_phone_number Read phone_sid Retrieve a Twilio incoming phone number by its SID. Returns phone number details including capabilities and configuration.
twilio.twilio_lookup_phone Read phone_number, fields Lookup phone number details using the Twilio Lookup API v2. Provide a phone number in E.164 format. Optionally request additional fields like "caller_name", "line_type_intelligence", "sim_swap", or "call_forwarding".
twilio.twilio_create_usage_trigger Write usage_category, trigger_value, callback_url, recurring Create a usage trigger on the Twilio account. Twilio will notify the callback URL when usage of the specified category exceeds the trigger value. Supports recurring triggers (daily, monthly, yearly) or one-time triggers.
twilio.twilio_list_usage_records Read category, start_date, end_date, limit List Twilio usage records with optional filtering. Filter by category and date range. Returns usage counts and pricing per category.
twilio.twilio_send_whatsapp Write to, from, body, media_url Send a WhatsApp message via Twilio. Provide "to" and "from" phone numbers in E.164 format — they will automatically be prefixed with "whatsapp:". Supports text and media messages.
twilio.twilio_get_account Read sid Retrieve Twilio account details. Optionally provide an account SID to look up a specific subaccount, or omit to retrieve the current account.
twilio.twilio_list_recordings Read call_sid, date_created, limit List Twilio call recordings with optional filtering. Filter by call SID, date created, or limit the number of results returned.
twilio.twilio_delete_recording Write recording_sid Delete a Twilio recording by its SID. Permanently removes the recording and all associated media. This action cannot be undone.

Automation Notes

Related Twilio CLI Pages