Use the Twilio CLI from KosmoKrator to call Twilio tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.
Twilio can be configured headlessly with `kosmokrator integrations:configure twilio`.
# Install KosmoKrator first if it is not available on PATH.curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash# Configure and verify this integration.kosmokrator integrations:configure twilio --set account_sid="$TWILIO_ACCOUNT_SID" --set auth_token="$TWILIO_AUTH_TOKEN" --enable --read allow --write ask --jsonkosmokrator integrations:doctor twilio --jsonkosmokrator integrations:status --json
Credentials
Authentication type: API tokenapi_token. Configure credentials once, then use the same stored profile from
scripts, coding CLIs, Lua code mode, and the MCP gateway.
Key
Env var
Type
Required
Label
account_sid
TWILIO_ACCOUNT_SID
Text text
yes
Account SID
auth_token
TWILIO_AUTH_TOKEN
Secret secret
yes
Auth Token
Call Twilio Headlessly
Use the generic call form when another coding CLI or script needs a stable universal interface.
Every function below can be called headlessly. The generic form is stable across all integrations;
the provider shortcut is shorter but specific to Twilio.
twilio.twilio_send_sms
Write write
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.
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.
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".
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.
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.
Use these parameter tables when building CLI payloads without calling integrations:schema first.
twilio.twilio_send_sms
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.
Filter by destination phone number in E.164 format.
from
string
no
Filter by originating phone number in E.164 format.
date_sent
string
no
Filter by date sent (YYYY-MM-DD format).
limit
integer
no
Maximum number of messages to return.
page_size
integer
no
Number of results per page (default 50, max 1000).
twilio.twilio_make_call
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.
Phone number SID (e.g., "PNxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx").
twilio.twilio_lookup_phone
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".
Phone number in E.164 format (e.g., "+15551234567").
fields
string
no
Comma-separated list of additional fields to request (e.g., "line_type_intelligence,caller_name").
twilio.twilio_create_usage_trigger
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.
Filter by usage category (e.g., "calls", "sms", "phonenumbers", "totalprice").
start_date
string
no
Start date for usage records (YYYY-MM-DD format).
end_date
string
no
End date for usage records (YYYY-MM-DD format).
limit
integer
no
Maximum number of records to return.
twilio.twilio_send_whatsapp
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.
Headless calls still follow the integration read/write permission policy. Configure read/write defaults
with integrations:configure. Add --force only for trusted automation that should bypass that policy.