Let agents send SMS and WhatsApp messages, place calls, look up numbers, and send verification codes with a Twilio API key the gateway keeps hidden.
Overview
OneCLI connects AI agents to Twilio with an API key. Agents can send and read SMS, MMS, and WhatsApp messages, place calls and read call logs, look up phone numbers, and send one-time verification codes. The gateway signs every request with the key, so your agent never sees it.This suits support and operations agents: texting a customer an update, checking whether a message was delivered, or verifying a phone number before an account change.Connecting takes about two minutes.
What you will set up
A Twilio API key (SID and secret) in your account’s region
Automatic credential injection on Twilio API requests
Per-tool permissions on the item, such as approval before sending messages
Connect Twilio
1
Create an API key in Twilio
In the Twilio Console, select API keys & tokens on the home page (or open Account > API keys & tokens), then select Create API key.
The Twilio Console home page. API keys & tokens is under your Account SID and Auth Token.
Setting
Value
Friendly name
Something you’ll recognize, such as OneCLI
Region
The region your account’s data lives in. Most accounts use United States (US1)
Key type
Standard. Pick Restricted to limit the key to specific products
Select Create, then copy the key’s SID (it starts with SK) and its Secret. Twilio shows the secret only once.
Prefer an API key over your Auth Token. You can revoke a key on its own, without touching anything else that uses your account. Avoid Main keys: they can manage subaccounts and other keys, which agents don’t need.
2
Paste it in OneCLI
In the OneCLI dashboard, open your vault and click Add item. Pick Twilio on the Connected app tab and click Connect. In the window that opens, fill in the form.
The Twilio connect window in OneCLI.
Field
Value
Region
The region you created the key in: US1 (the default), IE1 (Ireland), or AU1 (Australia)
API key SID
The key’s SID, starting with SK
API key secret
The key’s secret
Select Connect Twilio. OneCLI checks the key with Twilio in that region before saving it, so a wrong secret, or a key from another region, is rejected right away.You don’t need to enter your Account SID. OneCLI looks it up from the key and uses it as the connection’s name, so agents know which account they are working in.
Using your Account SID and Auth Token instead
If you can’t create an API key, paste your Account SID (it starts with AC) into API key SID, and your Auth Token into API key secret. Both are on the Twilio Console home page.
The Auth Token has full access to your account. If it leaks, you have to rotate it, which breaks everything else that uses it. An API key is safer.
Twilio keeps credentials per region: a US1 key doesn’t work in IE1 or AU1. Agents can always call the US hosts in Twilio’s docs, such as https://api.twilio.com. For an IE1 or AU1 connection, the gateway sends each request to that region’s host for you.
What agents can do
Area
What agents can do
Messages
Send SMS, MMS, and WhatsApp messages, list and read messages and their media, and cancel or delete messages
Calls
Place outbound calls, list and read calls and recordings, and end or redirect a live call
Phone numbers
List the account’s numbers, search numbers available to buy, and buy, configure, or release numbers
Lookup
Validate and format a phone number, and read its carrier and line type
Verify
Send a one-time code by SMS, WhatsApp, voice, or email, and check it
Messaging services
Read and manage messaging services and their senders
Conversations
Read conversations, add participants, and send conversation messages
Account
Read the account balance and usage records
Some products, including Studio, Conversations, and Functions, aren’t available on Twilio trial accounts. On a trial account, Twilio only sends messages and calls to phone numbers you’ve verified.
Quick example
No Authorization header is needed. The gateway adds Twilio’s Basic auth:
# Send an SMS (replace AC... with the Account SID shown on the connection)curl -s -X POST "https://api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Messages.json" \ --data-urlencode "To=+14155550100" \ --data-urlencode "From=+14155550199" \ --data-urlencode "Body=Your order has shipped."# Look up a phone number's carrier and line typecurl -s "https://lookups.twilio.com/v2/PhoneNumbers/+14155552671?Fields=line_type_intelligence"
Permissions are set on the item, per tool. In the vault, click Manage next to the item and set each tool to Always allow, Needs approval, or Never. A new app starts with every tool on Always allow, so tighten the tools you want held or refused. Every agent connected to the vault gets the same permissions.Twilio writes reach real people and cost money. Send a message, Place a call, and Send a verification code each contact someone, and Buy, configure, or release phone numbers changes what you’re billed for. A good default is to let agents read messages, calls, and lookups freely, and put every one of those writes behind approval.Organization rules can block, require approval, or rate-limit on top. A request that is not allowed is never sent to Twilio.To disconnect, open the Twilio item in its vault and choose Delete from the More menu, then delete the key in the Twilio Console under Account > API keys & tokens.
FAQ
How do I rotate my Twilio API key?
Create a new API key in the Twilio Console, then open the Twilio item in its vault, choose Reconnect from the More menu, and enter it. Agents on the vault use it on their next request. Then delete the old key.
How do I keep Twilio credentials out of the agent's context?
Don’t set TWILIO_AUTH_TOKEN in the agent’s environment. Store the API key in OneCLI, and the gateway injects it at the proxy. See How it works.
API key or Auth Token?
Prefer an API key. You can revoke it on its own without touching anything else that uses your account. Avoid Main keys.
Can I approve messages before they're sent?
Yes. Put sending tools behind approval in the item’s permissions.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OneCLI","colors":{"primary":"#0b5530","light":"#93e3b4","dark":"#0b5530"},"logo":{"light":"https://mintcdn.com/onecli-sh-docs/RTC5pGoFGh943jJc/logo/logo-full-light.svg?fit=max\u0026auto=format\u0026n=RTC5pGoFGh943jJc\u0026q=85\u0026s=9323ee06c8de13b4c5507ab8a6fbf2ac","dark":"https://mintcdn.com/onecli-sh-docs/RTC5pGoFGh943jJc/logo/logo-full-dark.svg?fit=max\u0026auto=format\u0026n=RTC5pGoFGh943jJc\u0026q=85\u0026s=c1445d56197cd9e03742ea6ea73a5f52","href":"/"},"favicon":"https://mintcdn.com/onecli-sh-docs/RTC5pGoFGh943jJc/favicon.png?fit=max\u0026auto=format\u0026n=RTC5pGoFGh943jJc\u0026q=85\u0026s=2a0cc29d0e8c090395c4e10e9f327b62","appearance":{"default":"light"},"background":{"color":{"light":"#ebe6d4","dark":"#083f23"}},"navbar":{"links":[{"href":"https://github.com/onecli/onecli","label":"GitHub"},{"href":"https://onecli.sh","label":"Install"}]},"footer":{"socials":{"github":"https://github.com/onecli"}},"fonts":{"heading":{"family":"Overused Grotesk","weight":600,"source":"fonts/OverusedGroteskRoman-VF.woff2","format":"woff2"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"https://mintlify.s3.us-west-1.amazonaws.com/onecli-sh-docs/images/github.svg","href":"https://github.com/onecli"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"onecli-sh-docs","hasAudioNarration":false,"actualSubdomain":"onecli-sh-docs","customDomains":[],"gitSource":{"type":"github","owner":"onecli","repo":"onecli-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6afb23636b0360be0a1911b0"},"entitlements":{},"buildId":"6b0f3c66094709554a753354","clientVersion":"0.0.4402","searchFilterCounts":[{"language":"default","tag":"API Reference","count":159},{"language":"default","tag":"Integrations","count":86},{"language":"default","tag":"Connected apps","count":77},{"language":"default","tag":"OneCLI Cloud","count":71},{"language":"default","tag":"Organization","count":32},{"language":"default","tag":"Vaults and items","count":27},{"language":"default","tag":"Agents","count":23},{"language":"default","tag":"Approvals, rules and activity","count":14},{"language":"default","tag":"Items","count":14},{"language":"default","tag":"Groups","count":13}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"a.nav-anchor div.mr-4.rounded-md{--tw-ring-color: transparent !important;--tw-ring-shadow: 0 0 0 0 transparent !important;--tw-ring-offset-shadow: 0 0 0 0 transparent !important;box-shadow:none!important;background:transparent!important;filter:none!important;transition:opacity 0.15s ease!important}a.nav-anchor:hover div.mr-4.rounded-md{--tw-ring-color: transparent !important;--tw-ring-shadow: 0 0 0 0 transparent !important;--tw-ring-offset-shadow: 0 0 0 0 transparent !important;box-shadow:none!important;background:transparent!important;filter:none!important;opacity:0.7!important}a.nav-anchor div.mr-4.rounded-md img{opacity:1!important;filter:none!important;background:transparent!important}a.nav-anchor:hover div.mr-4.rounded-md img{opacity:1!important;filter:none!important;background:transparent!important}.dark a.nav-anchor div.mr-4.rounded-md img,[data-theme=\"dark\"] a.nav-anchor div.mr-4.rounded-md img{filter:invert(1)!important}html:not(.dark) .card,html:not(.dark) .code-block [data-component-part=\"code-block-root\"],html:not(.dark) .callout{background-color:#f3efe1!important}html:not(.dark) .card,html:not(.dark) .code-block{border-color:#cbc3a8!important}[data-component-part=\"step-indicator\"]{border-radius:4px!important;width:1.5rem!important;height:1.5rem!important;margin:0.125rem!important;font-weight:600!important}html:not(.dark) [data-component-part=\"step-indicator\"]{background-color:#f3efe1!important;border:1px solid #cbc3a8!important;color:#0b5530!important}.dark [data-component-part=\"step-indicator\"]{border:1px solid rgba(255, 255, 255, 0.16)!important}[data-component-part=\"step-indicator\"]>div{background-color:transparent!important;color:inherit!important}html:not(.dark) .code-block .code-block-fade-overlay{background-image:linear-gradient(\n to right,\n rgba(243, 239, 225, 0) 0,\n rgba(243, 239, 225, 0.5) 25px,\n #f3efe1 45px\n )!important}#theme-preference-menu-item-system,[data-theme-preference=\"system\"]{display:none!important}"}]}
{"page":{"pagePath":"integrations/twilio","slug":"/integrations/twilio","pageMetadata":{"title":"Send SMS and WhatsApp From AI Agents With Twilio","sidebarTitle":"Twilio","description":"Let agents send SMS and WhatsApp messages, place calls, look up numbers, and send verification codes with a Twilio API key the gateway keeps hidden.","canonical":"https://onecli.sh/docs/integrations/twilio","href":"/integrations/twilio"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Let agents send SMS and WhatsApp messages, place calls, look up numbers, and send verification codes with a Twilio API key the gateway keeps hidden.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,CodeBlock,Frame,Heading,Note,OptimizedImage,Step,Steps,Table,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`OneCLI connects AI agents to `,_jsx(_components.a,{href:`https://www.twilio.com`,children:`Twilio`}),` with an API key. Agents can send and read SMS, MMS, and WhatsApp messages, place calls and read call logs, look up phone numbers, and send one-time verification codes. The gateway signs every request with the key, so your agent never sees it.`]}),`\n`,_jsx(_components.p,{children:`This suits support and operations agents: texting a customer an update, checking whether a message was delivered, or verifying a phone number before an account change.`}),`\n`,_jsx(_components.p,{children:`Connecting takes about two minutes.`}),`\n`,_jsx(Heading,{level:`2`,id:`what-you-will-set-up`,children:`What you will set up`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`A Twilio API key (SID and secret) in your account’s region`}),`\n`,_jsx(_components.li,{children:`Automatic credential injection on Twilio API requests`}),`\n`,_jsx(_components.li,{children:`Per-tool permissions on the item, such as approval before sending messages`}),`\n`]}),`\n`,_jsx(`a`,{id:`self-hosted`,style:{scrollMarginTop:`8rem`}}),`\n`,_jsx(Heading,{level:`2`,id:`connect-twilio`,children:`Connect Twilio`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Create an API key in Twilio`,children:[_jsxs(_components.p,{children:[`In the `,_jsx(_components.a,{href:`https://console.twilio.com`,children:`Twilio Console`}),`, select `,_jsx(_components.strong,{children:`API keys \u0026 tokens`}),` on the home page (or open `,_jsx(_components.strong,{children:`Account`}),` > `,_jsx(_components.strong,{children:`API keys \u0026 tokens`}),`), then select `,_jsx(_components.strong,{children:`Create API key`}),`.`]}),_jsx(Frame,{caption:`The Twilio Console home page. API keys \u0026 tokens is under your Account SID and Auth Token.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/twilio-console-home.png?fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=062d0cb7f285ab0f90042325595087c2`,alt:`Twilio Console home page showing the account card with a masked Account SID, a hidden Auth Token, and the API keys \u0026 auth tokens link.`,\"data-og-width\":`1600`,width:`1600`,\"data-og-height\":`456`,height:`456`,\"data-path\":`images/integrations/twilio/twilio-console-home.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/twilio-console-home.png?w=280\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=502f9838c5d0afd168465f9dd8ae7e50 280w, https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/twilio-console-home.png?w=560\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=7b4867d080f94f1f5c0fba2c60579c6c 560w, https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/twilio-console-home.png?w=840\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=80c84c05407b05efee0af3e64d632dc1 840w, https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/twilio-console-home.png?w=1100\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=3563877bb21f0af7efe91b958fe8cbee 1100w, https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/twilio-console-home.png?w=1650\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=ec86c2b6cb2f4c4d7bf03fd38cd5c0d1 1650w, https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/twilio-console-home.png?w=2500\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=ca62254d7fbfd55836c62244b330c670 2500w`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Setting`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Friendly name`})}),_jsxs(_components.td,{children:[`Something you’ll recognize, such as `,_jsx(_components.code,{children:`OneCLI`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Region`})}),_jsxs(_components.td,{children:[`The region your account’s data lives in. Most accounts use `,_jsx(_components.strong,{children:`United States (US1)`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Key type`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Standard`}),`. Pick `,_jsx(_components.strong,{children:`Restricted`}),` to limit the key to specific products`]})]})]})]}),_jsxs(_components.p,{children:[`Select `,_jsx(_components.strong,{children:`Create`}),`, then copy the key’s `,_jsx(_components.strong,{children:`SID`}),` (it starts with `,_jsx(_components.code,{children:`SK`}),`) and its `,_jsx(_components.strong,{children:`Secret`}),`. Twilio shows the secret only once.`]}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`Prefer an API key over your Auth Token. You can revoke a key on its own, without touching anything else that uses your account. Avoid `,_jsx(_components.strong,{children:`Main`}),` keys: they can manage subaccounts and other keys, which agents don’t need.`]})})]}),_jsxs(Step,{title:`Paste it in OneCLI`,children:[_jsxs(_components.p,{children:[`In the OneCLI dashboard, open your vault and click `,_jsx(_components.strong,{children:`Add item`}),`. Pick `,_jsx(_components.strong,{children:`Twilio`}),` on the `,_jsx(_components.strong,{children:`Connected app`}),` tab and click `,_jsx(_components.strong,{children:`Connect`}),`. In the window that opens, fill in the form.`]}),_jsx(Frame,{caption:`The Twilio connect window in OneCLI.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/onecli-connect-twilio.png?fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=a6b044ff07d849656f7e6a92ca32a7da`,alt:`OneCLI connect window for Twilio, showing the setup guide link, the Region dropdown set to United States (US1), the API key SID and API key secret fields, and the Connect Twilio button.`,\"data-og-width\":`976`,width:`976`,\"data-og-height\":`1813`,height:`1813`,\"data-path\":`images/integrations/twilio/onecli-connect-twilio.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/onecli-connect-twilio.png?w=280\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=edb9b50e4d18832a69144a9e9fe4848a 280w, https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/onecli-connect-twilio.png?w=560\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=b28af9543089c111b9a451126ee22a4a 560w, https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/onecli-connect-twilio.png?w=840\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=5863f1827fb7d9456ccf950fdc50c2f3 840w, https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/onecli-connect-twilio.png?w=1100\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=ec5536c26c753f8541c0f7684600f65a 1100w, https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/onecli-connect-twilio.png?w=1650\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=e838ee30172ec39cfb386dc5c70a4535 1650w, https://mintcdn.com/onecli-sh-docs/sLClq-IdqwxvWct5/images/integrations/twilio/onecli-connect-twilio.png?w=2500\u0026fit=max\u0026auto=format\u0026n=sLClq-IdqwxvWct5\u0026q=85\u0026s=6304e676ee7f5e876c1b501d9bc96131 2500w`})}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Region`})}),_jsxs(_components.td,{children:[`The region you created the key in: `,_jsx(_components.strong,{children:`US1`}),` (the default), `,_jsx(_components.strong,{children:`IE1`}),` (Ireland), or `,_jsx(_components.strong,{children:`AU1`}),` (Australia)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`API key SID`})}),_jsxs(_components.td,{children:[`The key’s SID, starting with `,_jsx(_components.code,{children:`SK`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`API key secret`})}),_jsx(_components.td,{children:`The key’s secret`})]})]})]}),_jsxs(_components.p,{children:[`Select `,_jsx(_components.strong,{children:`Connect Twilio`}),`. OneCLI checks the key with Twilio in that region before saving it, so a wrong secret, or a key from another region, is rejected right away.`]}),_jsx(_components.p,{children:`You don’t need to enter your Account SID. OneCLI looks it up from the key and uses it as the connection’s name, so agents know which account they are working in.`})]})]}),`\n`,_jsxs(Accordion,{title:`Using your Account SID and Auth Token instead`,id:`using-your-account-sid-and-auth-token-instead`,children:[_jsxs(_components.p,{children:[`If you can’t create an API key, paste your `,_jsx(_components.strong,{children:`Account SID`}),` (it starts with `,_jsx(_components.code,{children:`AC`}),`) into `,_jsx(_components.strong,{children:`API key SID`}),`, and your `,_jsx(_components.strong,{children:`Auth Token`}),` into `,_jsx(_components.strong,{children:`API key secret`}),`. Both are on the Twilio Console home page.`]}),_jsx(Warning,{children:_jsx(_components.p,{children:`The Auth Token has full access to your account. If it leaks, you have to rotate it, which breaks everything else that uses it. An API key is safer.`})})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Twilio keeps credentials per region: a US1 key doesn’t work in IE1 or AU1. Agents can always call the US hosts in Twilio’s docs, such as `,_jsx(_components.code,{children:`https://api.twilio.com`}),`. For an IE1 or AU1 connection, the gateway sends each request to that region’s host for you.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`what-agents-can-do`,children:`What agents can do`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Area`}),_jsx(_components.th,{children:`What agents can do`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Messages`})}),_jsx(_components.td,{children:`Send SMS, MMS, and WhatsApp messages, list and read messages and their media, and cancel or delete messages`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Calls`})}),_jsx(_components.td,{children:`Place outbound calls, list and read calls and recordings, and end or redirect a live call`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Phone numbers`})}),_jsx(_components.td,{children:`List the account’s numbers, search numbers available to buy, and buy, configure, or release numbers`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Lookup`})}),_jsx(_components.td,{children:`Validate and format a phone number, and read its carrier and line type`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Verify`})}),_jsx(_components.td,{children:`Send a one-time code by SMS, WhatsApp, voice, or email, and check it`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Messaging services`})}),_jsx(_components.td,{children:`Read and manage messaging services and their senders`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Conversations`})}),_jsx(_components.td,{children:`Read conversations, add participants, and send conversation messages`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Account`})}),_jsx(_components.td,{children:`Read the account balance and usage records`})]})]})]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Some products, including Studio, Conversations, and Functions, aren’t available on Twilio trial accounts. On a trial account, Twilio only sends messages and calls to phone numbers you’ve verified.`})}),`\n`,_jsx(Heading,{level:`2`,id:`quick-example`,children:`Quick example`}),`\n`,_jsxs(_components.p,{children:[`No `,_jsx(_components.code,{children:`Authorization`}),` header is needed. The gateway adds Twilio’s Basic auth:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Send an SMS (replace AC... with the Account SID shown on the connection)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.twilio.com/2010-04-01/Accounts/ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/Messages.json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-urlencode`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"To=+14155550100\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-urlencode`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"From=+14155550199\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-urlencode`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Body=Your order has shipped.\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Look up a phone number's carrier and line type`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://lookups.twilio.com/v2/PhoneNumbers/+14155552671?Fields=line_type_intelligence\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`For every endpoint and parameter, see the `,_jsx(_components.a,{href:`https://www.twilio.com/docs/usage/api`,children:`Twilio API reference`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`controlling-access`,children:`Controlling access`}),`\n`,_jsxs(_components.p,{children:[`Permissions are set on the item, per tool. In the vault, click `,_jsx(_components.strong,{children:`Manage`}),` next to the item and set each tool to `,_jsx(_components.strong,{children:`Always allow`}),`, `,_jsx(_components.strong,{children:`Needs approval`}),`, or `,_jsx(_components.strong,{children:`Never`}),`. A new app starts with every tool on `,_jsx(_components.strong,{children:`Always allow`}),`, so tighten the tools you want held or refused. Every agent connected to the vault gets the same permissions.`]}),`\n`,_jsxs(_components.p,{children:[`Twilio writes reach real people and cost money. `,_jsx(_components.strong,{children:`Send a message`}),`, `,_jsx(_components.strong,{children:`Place a call`}),`, and `,_jsx(_components.strong,{children:`Send a verification code`}),` each contact someone, and `,_jsx(_components.strong,{children:`Buy, configure, or release phone numbers`}),` changes what you’re billed for. A good default is to let agents read messages, calls, and lookups freely, and put every one of those writes behind approval.`]}),`\n`,_jsxs(_components.p,{children:[`Organization `,_jsx(_components.a,{href:`/guides/rules`,children:`rules`}),` can block, require approval, or rate-limit on top. A request that is not allowed is never sent to Twilio.`]}),`\n`,_jsxs(_components.p,{children:[`To disconnect, open the Twilio item in its vault and choose `,_jsx(_components.strong,{children:`Delete`}),` from the `,_jsx(_components.strong,{children:`More`}),` menu, then delete the key in the Twilio Console under `,_jsx(_components.strong,{children:`Account`}),` > `,_jsx(_components.strong,{children:`API keys \u0026 tokens`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`faq`,children:`FAQ`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`How do I rotate my Twilio API key?`,id:`how-do-i-rotate-my-twilio-api-key`,children:_jsxs(_components.p,{children:[`Create a new API key in the Twilio Console, then open the Twilio item in its vault, choose `,_jsx(_components.strong,{children:`Reconnect`}),` from the `,_jsx(_components.strong,{children:`More`}),` menu, and enter it. Agents on the vault use it on their next request. Then delete the old key.`]})}),_jsx(Accordion,{title:`How do I keep Twilio credentials out of the agent's context?`,id:`how-do-i-keep-twilio-credentials-out-of-the-agents-context`,children:_jsxs(_components.p,{children:[`Don’t set `,_jsx(_components.code,{children:`TWILIO_AUTH_TOKEN`}),` in the agent’s environment. Store the API key in OneCLI, and the gateway injects it at the proxy. See `,_jsx(_components.a,{href:`/how-it-works`,children:`How it works`}),`.`]})}),_jsx(Accordion,{title:`API key or Auth Token?`,id:`api-key-or-auth-token`,children:_jsxs(_components.p,{children:[`Prefer an API key. You can revoke it on its own without touching anything else that uses your account. Avoid `,_jsx(_components.strong,{children:`Main`}),` keys.`]})}),_jsx(Accordion,{title:`Can I approve messages before they're sent?`,id:`can-i-approve-messages-before-they-re-sent`,children:_jsxs(_components.p,{children:[`Yes. Put sending tools behind approval in the item’s `,_jsx(_components.a,{href:`/integrations/app-connections#permissions`,children:`permissions`}),`.`]})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Send SMS and WhatsApp From AI Agents With Twilio","sidebarTitle":"Twilio","description":"Let agents send SMS and WhatsApp messages, place calls, look up numbers, and send verification codes with a Twilio API key the gateway keeps hidden.","canonical":"https://onecli.sh/docs/integrations/twilio","href":"/integrations/twilio"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"What you will set up","slug":"what-you-will-set-up","depth":2,"children":[]},{"title":"Connect Twilio","slug":"connect-twilio","depth":2,"children":[]},{"title":"What agents can do","slug":"what-agents-can-do","depth":2,"children":[]},{"title":"Quick example","slug":"quick-example","depth":2,"children":[]},{"title":"Controlling access","slug":"controlling-access","depth":2,"children":[]},{"title":"FAQ","slug":"faq","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/onecli-sh-docs/e8c5fc0faf4d8de9/infra/cloudfront/docs-response-headers.js"],"subdomain":"onecli-sh-docs","siteName":"OneCLI","title":"Send SMS and WhatsApp From AI Agents With Twilio - OneCLI","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-01T21:30:27.342Z","originalFileLocation":"integrations/twilio.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Let agents send SMS and WhatsApp messages, place calls, look up numbers, and send verification codes with a Twilio API key the gateway keeps hidden.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OneCLI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/onecli-sh-docs/kVhcqu1MSXl6LB8G/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/onecli-sh-docs/kVhcqu1MSXl6LB8G/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/onecli-sh-docs/kVhcqu1MSXl6LB8G/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/onecli-sh-docs/kVhcqu1MSXl6LB8G/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/onecli-sh-docs/kVhcqu1MSXl6LB8G/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/onecli-sh-docs/kVhcqu1MSXl6LB8G/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/onecli-sh-docs/kVhcqu1MSXl6LB8G/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/onecli-sh-docs/kVhcqu1MSXl6LB8G/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/onecli-sh-docs/kVhcqu1MSXl6LB8G/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Send SMS and WhatsApp From AI Agents With Twilio - OneCLI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Let agents send SMS and WhatsApp messages, place calls, look up numbers, and send verification codes with a Twilio API key the gateway keeps hidden.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OneCLI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://onecli.sh/docs/integrations/twilio\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://onecli-sh-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Connected+apps\u0026amp;title=Send+SMS+and+WhatsApp+From+AI+Agents+With+Twilio\u0026amp;description=Let+agents+send+SMS+and+WhatsApp+messages%2C+place+calls%2C+look+up+numbers%2C+and+send+verification+codes+with+a+Twilio+API+key+the+gateway+keeps+hidden.\u0026amp;theme=c07fb6f5c2da82bc69807d12\u0026amp;signature=123bf3be7e2dc192510cd55d40529a47a3a11f2ab69b8e4a1dc318e1b00887b8\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Send SMS and WhatsApp From AI Agents With Twilio - OneCLI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Let agents send SMS and WhatsApp messages, place calls, look up numbers, and send verification codes with a Twilio API key the gateway keeps hidden.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://onecli-sh-docs.mintlify.site/docs/_mintlify/api/og/v2?division=Connected+apps\u0026amp;title=Send+SMS+and+WhatsApp+From+AI+Agents+With+Twilio\u0026amp;description=Let+agents+send+SMS+and+WhatsApp+messages%2C+place+calls%2C+look+up+numbers%2C+and+send+verification+codes+with+a+Twilio+API+key+the+gateway+keeps+hidden.\u0026amp;theme=c07fb6f5c2da82bc69807d12\u0026amp;signature=123bf3be7e2dc192510cd55d40529a47a3a11f2ab69b8e4a1dc318e1b00887b8\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/onecli-sh-docs/kVhcqu1MSXl6LB8G/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OneCLI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0b5530\">\u003clink data-mint-head rel=\"canonical\" href=\"https://onecli.sh/docs/integrations/twilio\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/integrations/twilio.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://onecli-sh-docs.mintlify.dev/#organization\",\"name\":\"OneCLI\",\"url\":\"https://onecli-sh-docs.mintlify.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/onecli-sh-docs/RTC5pGoFGh943jJc/logo/logo-full-light.svg?fit=max\u0026auto=format\u0026n=RTC5pGoFGh943jJc\u0026q=85\u0026s=9323ee06c8de13b4c5507ab8a6fbf2ac\"}},{\"@type\":\"WebSite\",\"@id\":\"https://onecli-sh-docs.mintlify.dev/docs#website\",\"name\":\"OneCLI\",\"url\":\"https://onecli-sh-docs.mintlify.dev/docs\",\"publisher\":{\"@id\":\"https://onecli-sh-docs.mintlify.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://onecli.sh/docs/integrations/twilio#webpage\",\"url\":\"https://onecli.sh/docs/integrations/twilio\",\"name\":\"Send SMS and WhatsApp From AI Agents With Twilio\",\"description\":\"Let agents send SMS and WhatsApp messages, place calls, look up numbers, and send verification codes with a Twilio API key the gateway keeps hidden.\",\"dateModified\":\"2026-12-01T21:30:27.342Z\",\"isPartOf\":{\"@id\":\"https://onecli-sh-docs.mintlify.dev/docs#website\"},\"breadcrumb\":{\"@id\":\"https://onecli.sh/docs/integrations/twilio#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://onecli.sh/docs/integrations/twilio#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Connected apps\",\"item\":\"https://onecli-sh-docs.mintlify.dev/docs/integrations/affinity\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Send SMS and WhatsApp From AI Agents With Twilio\",\"item\":\"https://onecli.sh/docs/integrations/twilio\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://onecli.sh/docs/integrations/twilio#article\",\"headline\":\"Send SMS and WhatsApp From AI Agents With Twilio\",\"name\":\"Send SMS and WhatsApp From AI Agents With Twilio\",\"description\":\"Let agents send SMS and WhatsApp messages, place calls, look up numbers, and send verification codes with a Twilio API key the gateway keeps hidden.\",\"url\":\"https://onecli.sh/docs/integrations/twilio\",\"mainEntityOfPage\":{\"@id\":\"https://onecli.sh/docs/integrations/twilio#webpage\"},\"dateModified\":\"2026-12-01T21:30:27.342Z\",\"publisher\":{\"@id\":\"https://onecli-sh-docs.mintlify.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://onecli-sh-docs.mintlify.dev/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OneCLI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"OneCLI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/integrations/twilio.md","siteName":"OneCLI","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"https://mintlify.s3.us-west-1.amazonaws.com/onecli-sh-docs/images/github.svg","href":"https://github.com/onecli"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Integrations","groups":[{"group":"Items","root":{"title":"Integrations: Apps, API Keys, and LLM Keys in a Vault","sidebarTitle":"Overview","href":"/integrations"},"pages":[{"title":"Connected Apps: Connect, Set Permissions, Reconnect","sidebarTitle":"Connected apps","href":"/integrations/app-connections"},{"title":"API Keys: Connect Any API With a Key","sidebarTitle":"API keys","href":"/integrations/custom-connections"},{"title":"Keep LLM API Keys Out of Your AI Agents","sidebarTitle":"LLM keys","href":"/integrations/llms"}]},{"group":"LLM keys","pages":[{"title":"Connect Claude to Agents With a Subscription or API Key","sidebarTitle":"Anthropic","href":"/integrations/anthropic"},{"title":"Use OpenAI API Keys or a ChatGPT Plan With AI Agents","sidebarTitle":"OpenAI","href":"/integrations/openai"}]},{"group":"External sources","root":{"title":"External Sources: Keys From Your Password Manager","sidebarTitle":"External sources","href":"/vaults/overview"},"pages":[{"title":"Bitwarden: Fetch Keys on Demand for a OneCLI Vault","sidebarTitle":"Bitwarden","href":"/vaults/bitwarden"},{"title":"1Password: Read Key Values From op:// References","sidebarTitle":"1Password","href":"/vaults/1password"}]},{"group":"Connected apps","pages":[{"title":"Connect AI Agents to Affinity CRM With an API Key","sidebarTitle":"Affinity","href":"/integrations/affinity"},{"title":"Prospect and Enrich Leads in Apollo.io With Agents","sidebarTitle":"Apollo.io","href":"/integrations/apollo-io"},{"title":"Let AI Agents Manage Attio CRM Records","sidebarTitle":"Attio","href":"/integrations/attio"},{"title":"Use AWS From AI Agents Without Exposing Keys","sidebarTitle":"AWS","href":"/integrations/aws"},{"title":"Give Agents AWS Access With an IAM Role, Not Keys","sidebarTitle":"AWS Role","href":"/integrations/aws-role"},{"title":"Bitbucket Repos, Pull Requests, and Pipelines","sidebarTitle":"Bitbucket","href":"/integrations/bitbucket"},{"title":"Let Agents Search Circleback Meeting Notes","sidebarTitle":"Circleback","href":"/integrations/circleback"},{"title":"Run Clay Enrichment From AI Agents","sidebarTitle":"Clay","href":"/integrations/clay"},{"title":"Scoped Cloudflare API Tokens for AI Agents","sidebarTitle":"Cloudflare","href":"/integrations/cloudflare"},{"title":"Give AI Agents Search and Edit Access to Confluence","sidebarTitle":"Confluence","href":"/integrations/confluence"},{"title":"Query Coralogix Logs and Metrics From Agents","sidebarTitle":"Coralogix","href":"/integrations/coralogix"},{"title":"Let AI Agents Query Datadog Metrics and Monitors","sidebarTitle":"Datadog","href":"/integrations/datadog"},{"title":"Manage Docker Hub Repositories From AI Agents","sidebarTitle":"Docker Hub","href":"/integrations/docker"},{"title":"Automate Dripify LinkedIn Outreach With Agents","sidebarTitle":"Dripify","href":"/integrations/dripify"},{"title":"Give AI Agents Safe Access to Your Dropbox Files","sidebarTitle":"Dropbox","href":"/integrations/dropbox"},{"title":"Read Fathom Meeting Summaries From AI Agents","sidebarTitle":"Fathom","href":"/integrations/fathom"},{"title":"Give AI Agents Access to Fireflies Transcripts","sidebarTitle":"Fireflies","href":"/integrations/fireflies"},{"title":"Deploy to Fly.io From an Agent Without Exposing Tokens","sidebarTitle":"Fly.io","href":"/integrations/flyio"},{"title":"Let AI Agents Open PRs and Issues on GitHub","sidebarTitle":"GitHub","href":"/integrations/github"},{"title":"Org-Approved GitHub Repo Access for AI Agents","sidebarTitle":"GitHub App","href":"/integrations/github-app"},{"title":"Let AI Agents Work With GitLab Merge Requests","sidebarTitle":"GitLab","href":"/integrations/gitlab"},{"title":"Let AI Agents Search, Draft, and Send Gmail","sidebarTitle":"Gmail","href":"/integrations/gmail"},{"title":"Set Up One Google OAuth Client for All Google Apps","sidebarTitle":"Google (setup)","href":"/integrations/google"},{"title":"Automate Google Workspace User Admin With Agents","sidebarTitle":"Google Admin","href":"/integrations/google-admin"},{"title":"Pull GA4 Reports Into AI Agents","sidebarTitle":"Google Analytics","href":"/integrations/google-analytics"},{"title":"Let AI Agents Schedule Meetings in Google Calendar","sidebarTitle":"Google Calendar","href":"/integrations/google-calendar"},{"title":"Send Google Chat Messages From AI Agents","sidebarTitle":"Google Chat","href":"/integrations/google-chat"},{"title":"Automate Google Classroom Coursework With Agents","sidebarTitle":"Google Classroom","href":"/integrations/google-classroom"},{"title":"Let AI Agents Look Up and Update Google Contacts","sidebarTitle":"Google Contacts","href":"/integrations/google-contacts"},{"title":"Let AI Agents Draft and Edit Google Docs","sidebarTitle":"Google Docs","href":"/integrations/google-docs"},{"title":"Give AI Agents Access to Google Drive Files","sidebarTitle":"Google Drive","href":"/integrations/google-drive"},{"title":"Build Google Forms and Read Responses With Agents","sidebarTitle":"Google Forms","href":"/integrations/google-forms"},{"title":"Read and Create Google Keep Notes From AI Agents","sidebarTitle":"Google Keep","href":"/integrations/google-keep"},{"title":"Create Google Meet Links From AI Agents","sidebarTitle":"Google Meet","href":"/integrations/google-meet"},{"title":"Search and Organize Google Photos With AI Agents","sidebarTitle":"Google Photos","href":"/integrations/google-photos"},{"title":"Let AI Agents Check Indexing in Search Console","sidebarTitle":"Google Search Console","href":"/integrations/google-search-console"},{"title":"Let AI Agents Read and Update Google Sheets","sidebarTitle":"Google Sheets","href":"/integrations/google-sheets"},{"title":"Generate Google Slides Decks With AI Agents","sidebarTitle":"Google Slides","href":"/integrations/google-slides"},{"title":"Track To-Dos in Google Tasks From AI Agents","sidebarTitle":"Google Tasks","href":"/integrations/google-tasks"},{"title":"Let AI Agents Read Your Granola Meeting Notes","sidebarTitle":"Granola","href":"/integrations/granola"},{"title":"Run HeyReach LinkedIn Campaigns From AI Agents","sidebarTitle":"HeyReach","href":"/integrations/heyreach"},{"title":"Let AI Agents Update HubSpot CRM Records","sidebarTitle":"HubSpot","href":"/integrations/hubspot"},{"title":"Route Agent Package Installs Through JFrog","sidebarTitle":"JFrog Artifactory","href":"/integrations/jfrog-artifactory"},{"title":"Let AI Agents Create and Triage Jira Issues","sidebarTitle":"Jira","href":"/integrations/jira"},{"title":"Let AI Agents File and Update Linear Issues","sidebarTitle":"Linear","href":"/integrations/linear"},{"title":"Let AI Agents Post to LinkedIn on Your Behalf","sidebarTitle":"LinkedIn","href":"/integrations/linkedin"},{"title":"Let AI Agents Read and Write OneNote Notebooks","sidebarTitle":"Microsoft OneNote","href":"/integrations/microsoft-onenote"},{"title":"Let AI Agents Draft Word Docs in OneDrive","sidebarTitle":"Microsoft Word","href":"/integrations/microsoft-word"},{"title":"Connect AI Agents to Monday.com Boards","sidebarTitle":"Monday.com","href":"/integrations/monday"},{"title":"Administer MongoDB Atlas Clusters With Agents","sidebarTitle":"MongoDB Atlas","href":"/integrations/mongodb-atlas"},{"title":"Sync Navan Bookings and Expenses With AI Agents","sidebarTitle":"Navan","href":"/integrations/navan"},{"title":"Let AI Agents Search and Update Notion Pages","sidebarTitle":"Notion","href":"/integrations/notion"},{"title":"Search Company Knowledge in Onyx From Agents","sidebarTitle":"Onyx","href":"/integrations/onyx"},{"title":"Let AI Agents Book Meetings in Outlook Calendar","sidebarTitle":"Outlook Calendar","href":"/integrations/outlook-calendar"},{"title":"Connect AI Agents to Outlook Mail in Microsoft 365","sidebarTitle":"Outlook Mail","href":"/integrations/outlook-mail"},{"title":"Let On-Call Agents Triage PagerDuty Incidents","sidebarTitle":"PagerDuty","href":"/integrations/pagerduty"},{"title":"Query PostHog Analytics and Flags From Agents","sidebarTitle":"PostHog","href":"/integrations/posthog"},{"title":"Let AI Agents Work Pylon Support Issues","sidebarTitle":"Pylon","href":"/integrations/pylon"},{"title":"Let AI Agents Send Email With Resend","sidebarTitle":"Resend","href":"/integrations/resend"},{"title":"Connect AI Agents to Salesforce With an External App","sidebarTitle":"Salesforce","href":"/integrations/salesforce"},{"title":"Let AI Agents Triage Sentry Errors","sidebarTitle":"Sentry","href":"/integrations/sentry"},{"title":"Run Snowflake SQL From an Agent, Token Hidden","sidebarTitle":"Snowflake","href":"/integrations/snowflake"},{"title":"Use a Restricted Stripe Key With AI Agents","sidebarTitle":"Stripe","href":"/integrations/stripe"},{"title":"Manage Supabase Projects With AI Agents","sidebarTitle":"Supabase","href":"/integrations/supabase"},{"title":"Give AI Agents Web Search With Tavily","sidebarTitle":"Tavily","href":"/integrations/tavily"},{"title":"Turn Timeless Meetings Into Agent Follow-Ups","sidebarTitle":"Timeless","href":"/integrations/timeless"},{"title":"Let AI Agents Manage Your Todoist Tasks","sidebarTitle":"Todoist","href":"/integrations/todoist"},{"title":"Let AI Agents Manage Trello Boards and Cards","sidebarTitle":"Trello","description":"Let agents read Trello boards and lists, and create or update cards. Connect in one click on OneCLI Cloud, and the gateway keeps the token from the agent.","href":"/integrations/trello"},{"title":"Send SMS and WhatsApp From AI Agents With Twilio","sidebarTitle":"Twilio","href":"/integrations/twilio"},{"title":"Let AI Agents Deploy and Manage Vercel Projects","sidebarTitle":"Vercel","description":"Let agents check Vercel deployments, manage environment variables and domains, and ship new deploys with an access token the gateway keeps hidden.","href":"/integrations/vercel"},{"title":"Call Claude and Gemini on Vertex AI From Agents","sidebarTitle":"Vertex AI","href":"/integrations/vertex-ai"},{"title":"Let AI Agents Edit Webflow CMS and Publish Sites","sidebarTitle":"Webflow","href":"/integrations/webflow"},{"title":"Let AI Agents Post and Read on X (Twitter)","sidebarTitle":"X","href":"/integrations/x"},{"title":"Manage YouTube Playlists and Analytics With Agents","sidebarTitle":"YouTube","href":"/integrations/youtube"},{"title":"Zendesk Integration: Tickets and Help Center","sidebarTitle":"Zendesk","href":"/integrations/zendesk"},{"title":"Let AI Agents Work Zoho CRM Leads and Deals","sidebarTitle":"Zoho CRM","href":"/integrations/zoho-crm"},{"title":"Let AI Agents Schedule Zoom Meetings and Get Recordings","sidebarTitle":"Zoom","href":"/integrations/zoom"}]}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks"}]}]},"basePath":"","title":"Send SMS and WhatsApp From AI Agents With Twilio - OneCLI","deploymentId":"dpl_FJXVBuj1Gbcjzv4BLN7d4WGZQfWn","buildId":"dpl_FJXVBuj1Gbcjzv4BLN7d4WGZQfWn","dynamics":["07c022d89b","a74be98ba7","a9bb46feb3"],"chunks":["Frame-DW3qQrLz.js","DynamicMarkdown-rJ80e-H3.js","zoom-image-lightbox-D9Ym--Vh.js","lightbox-handle-r17bVUz3.js","Markdown-CrWcS0iW.js","AssistantPageLink-C5g489Fj.js","dist-D0mIFLFs.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}