{"openapi":"3.1.0","info":{"title":"Twilio (BYOK) API","version":"0.1.0","description":"Twilio (BYOK) lets an AI assistant read your own Twilio data through the Twilio API with a key you supply (Account SID or API key SID (use a restricted read-only API key, SID starts with SK, rather than the main Auth Token where possible)). Read-only: 6 tools (get_account, list_accounts, list_phone_numbers, list_calls, list_messages, list_usage_records). The BYOK key travels with each request, is...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-twilio.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-twilio/docs"},"termsOfService":"https://connectorbay.com/byok-twilio/terms"},"servers":[{"url":"https://byok-twilio.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-twilio/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_account":{"post":{"operationId":"get_account","summary":"Show one Twilio account: friendly name, status (active, suspended, closed), type (Trial or Full), dates and owner accoun","description":"Show one Twilio account: friendly name, status (active, suspended, closed), type (Trial or Full), dates and owner account. Does not return the Auth Token. Use for \"Is my Twilio account active and is it a trial account\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_sid":{"description":"The Twilio Account SID: 'AC' followed by 32 hex characters (shown on the Twilio console home page).","maxLength":34,"title":"Account Sid","type":"string"}},"required":["account_sid"],"title":"get_accountArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_accounts":{"post":{"operationId":"list_accounts","summary":"List the account and its subaccounts with friendly name, status and type. Needs the main Auth Token or a Main API key (S","description":"List the account and its subaccounts with friendly name, status and type. Needs the main Auth Token or a Main API key (Standard and Restricted keys cannot read Accounts). Use for \"What Twilio subaccounts do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"friendly_name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only accounts with exactly this friendly name.","title":"Friendly Name"},"status":{"anyOf":[{"enum":["active","suspended","closed"],"type":"string"},{"type":"null"}],"default":null,"description":"Only accounts with this status.","title":"Status"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: take the PageToken value from next_page_uri in the previous answer (leave empty for the first page).","title":"Page Token"}},"title":"list_accountsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_phone_numbers":{"post":{"operationId":"list_phone_numbers","summary":"List the phone numbers owned by the account with number, friendly name, capabilities (voice, sms, mms, fax), origin and ","description":"List the phone numbers owned by the account with number, friendly name, capabilities (voice, sms, mms, fax), origin and webhook URLs. Use for \"Which phone numbers do I have in Twilio\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_sid":{"description":"The Twilio Account SID: 'AC' followed by 32 hex characters (shown on the Twilio console home page).","maxLength":34,"title":"Account Sid","type":"string"},"phone_number":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Only numbers matching this E.164 number (partial numbers allowed, * is a one-digit wildcard).","title":"Phone Number"},"friendly_name":{"anyOf":[{"maxLength":64,"type":"string"},{"type":"null"}],"default":null,"description":"Only numbers with this friendly name.","title":"Friendly Name"},"origin":{"anyOf":[{"enum":["twilio","hosted"],"type":"string"},{"type":"null"}],"default":null,"description":"Only numbers from this origin: twilio or hosted.","title":"Origin"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: take the pageToken value from next_page_uri in the previous answer (leave empty for the first page).","title":"Page Token"}},"required":["account_sid"],"title":"list_phone_numbersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_calls":{"post":{"operationId":"list_calls","summary":"List call logs with from, to, status, direction, start and end time, duration and price, newest first. Filter by number,","description":"List call logs with from, to, status, direction, start and end time, duration and price, newest first. Filter by number, status or start date. Only reads; never places a call. Use for \"Which calls did my Twilio number receive this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_sid":{"description":"The Twilio Account SID: 'AC' followed by 32 hex characters (shown on the Twilio console home page).","maxLength":34,"title":"Account Sid","type":"string"},"to":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only calls to this phone number, SIP address or client identifier.","title":"To"},"from_number":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only calls from this phone number, SIP address or client identifier.","title":"From Number"},"status":{"anyOf":[{"enum":["queued","ringing","in-progress","canceled","completed","failed","busy","no-answer"],"type":"string"},{"type":"null"}],"default":null,"description":"Only calls with this status.","title":"Status"},"start_time_after":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only calls that started after this day. Date as YYYY-MM-DD (UTC).","title":"Start Time After"},"start_time_before":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only calls that started before this day. Date as YYYY-MM-DD (UTC).","title":"Start Time Before"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: take the PageToken value from next_page_uri in the previous answer (leave empty for the first page).","title":"Page Token"}},"required":["account_sid"],"title":"list_callsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_messages":{"post":{"operationId":"list_messages","summary":"List SMS and MMS message logs with from, to, body, status, direction, sent time, segments, price and error code, newest ","description":"List SMS and MMS message logs with from, to, body, status, direction, sent time, segments, price and error code, newest first. Only reads; never sends a message. Use for \"What texts did my Twilio number receive today\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_sid":{"description":"The Twilio Account SID: 'AC' followed by 32 hex characters (shown on the Twilio console home page).","maxLength":34,"title":"Account Sid","type":"string"},"to":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages to this phone number or channel address.","title":"To"},"from_number":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages from this phone number or channel address.","title":"From Number"},"date_sent_after":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages sent after this date, YYYY-MM-DD (GMT).","title":"Date Sent After"},"date_sent_before":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only messages sent before this date, YYYY-MM-DD (GMT).","title":"Date Sent Before"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: take the PageToken value from next_page_uri in the previous answer (leave empty for the first page).","title":"Page Token"}},"required":["account_sid"],"title":"list_messagesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_usage_records":{"post":{"operationId":"list_usage_records","summary":"List usage and spend per category (calls, sms, phone numbers ...) for a period, with usage, count and price. Without dat","description":"List usage and spend per category (calls, sms, phone numbers ...) for a period, with usage, count and price. Without dates it returns all-time totals. Use for \"How much did I spend on Twilio SMS this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"account_sid":{"description":"The Twilio Account SID: 'AC' followed by 32 hex characters (shown on the Twilio console home page).","maxLength":34,"title":"Account Sid","type":"string"},"category":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Usage category to return, for example 'calls' or 'sms'.","title":"Category"},"start_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Include usage on or after this day (offsets such as -30days also work). Date as YYYY-MM-DD (UTC).","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Include usage on or before this day. Date as YYYY-MM-DD (UTC).","title":"End Date"},"include_subaccounts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"False to leave out usage of subaccounts (Twilio's default is true).","title":"Include Subaccounts"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many results to return (1 to 100).","title":"Page Size"},"page_token":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"default":null,"description":"Paging token: take the pageToken value from next_page_uri in the previous answer (leave empty for the first page).","title":"Page Token"}},"required":["account_sid"],"title":"list_usage_recordsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}