SlideShare a Scribd company logo
1 of 15
Download to read offline
twilio
         CLOUD COMMUNICATIONS




      Designing the Best
Telecommunications API
   Tim Milliron, Director of Engineering
                            @timmilliron
Who is twilio?
          RESTful web APIs to automate
          Voice & SMS communications


      Voice             SMS           Phone
                                     Numbers
•   Inbound        • Incoming      • PhoneNumber
•   Outbound       • Outgoing        Provisioning
•   Mobile VoIP    • Short Codes   • ShortCode
•   Browser VoIP                     Applications
(415) 233-WAZA
    • Find & buy a number:
curl -u $U:$P
https://api.twilio.com/2010-04-01/Accounts/AC123/
AvailablePhoneNumbers/US/Local?Contains=415***WAZA

curl -u $U:$P -d “PhoneNumber=415233WAZA”
https://api.twilio.com/2010-04-01/Accounts/AC123/IncomingPhoneNumbers/


    • Make an outgoing call:
curl -u $U:$P -d “Url=www.example.com/outgoing.xml”
-d “From=4152339292” -d “To=4158675309”
https://api.twilio.com/2010-04-01/Accounts/AC123/Calls/



    • Receive an incoming call:
<Response>
    <Say>Thanks for calling the Waza Twilio number! Huzzah!</Say>
    <Sms>Heroku’s Waza Rocks!</Sms>
</Response>
7 Principles
#1 APIs are for Abstraction
Example: DIDs
  DID	
  (Direct	
  Inward	
  Dial)	
  —	
  Inbound-­‐only	
  phone	
  number	
  
  assigned	
  to	
  a	
  group	
  of	
  phone	
  lines	
  that	
  allows	
  a	
  
  phone	
  system	
  to	
  route	
  to	
  a	
  unique	
  location	
  or	
  person.	
  
  A	
  group	
  of	
  DIDs	
  is	
  often	
  assigned	
  to	
  a	
  single	
  trunk	
  
  group.	
  DID	
  numbers	
  are	
  not	
  sent	
  out	
  as	
  the	
  ANI	
  when	
  
  the	
  caller	
  places	
  an	
  outbound	
  call.



Developers don’t give a f*** about DIDs
  twilio’s API talks PhoneNumbers
  (they work for incoming & outgoing)
#2 What’s the noun?
Speak resources:
  GET api.twilio.com/.../Calls
  GET api.twilio.com/.../Calls/CA123
  POST api.twilio.com/.../Calls


Not RPC:
  GET api.twilio.com/.../GetCalls/
  POST api.twilio.com/.../PlaceCall
#3 Be RESTful
Hypermedia for sub-resource traversal:
  <Account>
     <Sid>AC123</Sid>
     <OwnerAccountSid>AC456</OwnerAccountSid>
     <FriendlyName>tim@twilio.com's Account</FriendlyName>
     <Status>active</Status>
     ...
     <Uri>
        /2010-04-01/Accounts/AC123
     </Uri>
     <SubresourceUris>
        <AvailablePhoneNumbers>
           /2010-04-01/Accounts/AC123/AvailablePhoneNumbers
        </AvailablePhoneNumbers>
        <Calls>
           /2010-04-01/Accounts/AC123/Calls
        </Calls>
        ...
     </SubresourceUris>
  </Account>
#3 Be RESTful
Hypermedia for list traversal:
 <SMSMessages page="0" numpages="16" pagesize="50" total="780"
 start="0" end="49" uri="/2010-04-01/Accounts/AC123/SMS/
 Messages" firstpageuri="/2010-04-01/Accounts/AC123/SMS/
 Messages?Page=0&PageSize=50" previouspageuri="" nextpageuri="/
 2010-04-01/Accounts/AC123/SMS/Messages?Page=1&PageSize=50"
 lastpageuri="/2010-04-01/Accounts/AC123/SMS/Messages?
 Page=15&PageSize=50">
    ...
 </SMSMessages>
#4 The API Giveth...
... but the API can’t (usually) taketh away


It’s much easier to add something
than to remove something
  ➡ Get it in developers’ hands,
      see what use cases develop.
  ➡ Then, aggressively add
      frequently-requested features
#5 The Smallest API Possible...


                    twilio.com/
                     authorize



                   access_token=
                     xxxyyyzzz

/Calls?access_token=xxxyyyzzz
/IncomingPhoneNumbers?access_token=xxxyyyzzz
...
#5 The Smallest API Possible...


                    twilio.com/
                     authorize



                   account_sid=
                      AC678

/Calls
/IncomingPhoneNumbers
...
#6 ...But No Smaller
“As close to C as possible, but no closer”
 - Bjarne Stroustrup, creator of C++


Make the common case easy.

This works, and it’s generic:
   curl api.twilio.com/.../AvailablePhoneNumbers?
   Contains=510*******



But, this is what most developers want:
   curl api.twilio.com/.../AvailablePhoneNumbers?
   AreaCode=510
#7 Don’t Settle
• Late changes are OK
• Don’t be afraid to version
  (with good reason)
• Get feedback early, often, & throughout
     Discuss, spec, write, try it, rewrite
      discuss it some more, rewrite again
Process    Perspective
 Discuss      Developers
              Developers
  Spec
              Developers

  Build
twilio
        CLOUD COMMUNICATIONS




Tim Milliron, Director of Engineering
                         @timmilliron

More Related Content

What's hot

Twilio SMS - API for Sending & Receiving SMS Messages
Twilio SMS - API for Sending & Receiving SMS MessagesTwilio SMS - API for Sending & Receiving SMS Messages
Twilio SMS - API for Sending & Receiving SMS MessagesTwilio Inc
 
AWS Customer Presentation - Twilio
AWS Customer Presentation - TwilioAWS Customer Presentation - Twilio
AWS Customer Presentation - TwilioAmazon Web Services
 
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More FeaturesSmarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More FeaturesTwilio Inc
 
Twilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Real-time Communications OverviewTwilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Real-time Communications OverviewTwilio Inc
 
Twilio Signal 2016 Keynote
Twilio Signal 2016 Keynote Twilio Signal 2016 Keynote
Twilio Signal 2016 Keynote Twilio Inc
 
Twilio API: Build SMS Text Message Into Web Apps
Twilio API: Build SMS Text Message Into Web AppsTwilio API: Build SMS Text Message Into Web Apps
Twilio API: Build SMS Text Message Into Web AppsMindfire Solutions
 
What Can You Do With Twilio
What Can You Do With TwilioWhat Can You Do With Twilio
What Can You Do With TwilioTwilio Inc
 
Twilio Presentation
Twilio PresentationTwilio Presentation
Twilio PresentationChelsea Pugh
 
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIP
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIPTwilio Signal 2016 Build Your Own Cloud Enterprise VoIP
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIPTwilio Inc
 
Final Twilio Under the Radar 2009 Cloud
Final Twilio Under the Radar 2009 CloudFinal Twilio Under the Radar 2009 Cloud
Final Twilio Under the Radar 2009 CloudDealmaker Media
 
Tropo Presentation for TADHack
Tropo Presentation for TADHackTropo Presentation for TADHack
Tropo Presentation for TADHackAlan Quayle
 
Cloud Telephony Public
Cloud Telephony PublicCloud Telephony Public
Cloud Telephony PublicMark Plakias
 
Otra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefoníaOtra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefoníaMartin Perez
 
How the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsHow the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsPhil Leggetter
 
Create an IVR that Keeps Up with Your Customers
Create an IVR that Keeps Up with Your CustomersCreate an IVR that Keeps Up with Your Customers
Create an IVR that Keeps Up with Your CustomersTwilio Inc
 
Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Twilio Inc
 
Twilio MMS Deep Dive
Twilio MMS Deep DiveTwilio MMS Deep Dive
Twilio MMS Deep DiveTwilio Inc
 
Twilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-onsTwilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-onsTwilio Inc
 
Twilio using Groovy Grails
Twilio using Groovy GrailsTwilio using Groovy Grails
Twilio using Groovy GrailsAli Tanwir
 
Twilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Taking Your SMS App GlobalTwilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Taking Your SMS App GlobalTwilio Inc
 

What's hot (20)

Twilio SMS - API for Sending & Receiving SMS Messages
Twilio SMS - API for Sending & Receiving SMS MessagesTwilio SMS - API for Sending & Receiving SMS Messages
Twilio SMS - API for Sending & Receiving SMS Messages
 
AWS Customer Presentation - Twilio
AWS Customer Presentation - TwilioAWS Customer Presentation - Twilio
AWS Customer Presentation - Twilio
 
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More FeaturesSmarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
Smarter SIP Trunks: 6 Ways You Can Save Time and Get More Features
 
Twilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Real-time Communications OverviewTwilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Real-time Communications Overview
 
Twilio Signal 2016 Keynote
Twilio Signal 2016 Keynote Twilio Signal 2016 Keynote
Twilio Signal 2016 Keynote
 
Twilio API: Build SMS Text Message Into Web Apps
Twilio API: Build SMS Text Message Into Web AppsTwilio API: Build SMS Text Message Into Web Apps
Twilio API: Build SMS Text Message Into Web Apps
 
What Can You Do With Twilio
What Can You Do With TwilioWhat Can You Do With Twilio
What Can You Do With Twilio
 
Twilio Presentation
Twilio PresentationTwilio Presentation
Twilio Presentation
 
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIP
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIPTwilio Signal 2016 Build Your Own Cloud Enterprise VoIP
Twilio Signal 2016 Build Your Own Cloud Enterprise VoIP
 
Final Twilio Under the Radar 2009 Cloud
Final Twilio Under the Radar 2009 CloudFinal Twilio Under the Radar 2009 Cloud
Final Twilio Under the Radar 2009 Cloud
 
Tropo Presentation for TADHack
Tropo Presentation for TADHackTropo Presentation for TADHack
Tropo Presentation for TADHack
 
Cloud Telephony Public
Cloud Telephony PublicCloud Telephony Public
Cloud Telephony Public
 
Otra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefoníaOtra forma de hacer aplicaciones de telefonía
Otra forma de hacer aplicaciones de telefonía
 
How the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communicationsHow the Realtime Web is influencing the future of communications
How the Realtime Web is influencing the future of communications
 
Create an IVR that Keeps Up with Your Customers
Create an IVR that Keeps Up with Your CustomersCreate an IVR that Keeps Up with Your Customers
Create an IVR that Keeps Up with Your Customers
 
Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010Building A Great API - Evan Cooke, Cloudstock, December 2010
Building A Great API - Evan Cooke, Cloudstock, December 2010
 
Twilio MMS Deep Dive
Twilio MMS Deep DiveTwilio MMS Deep Dive
Twilio MMS Deep Dive
 
Twilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-onsTwilio Signal 2016 Using Add-ons
Twilio Signal 2016 Using Add-ons
 
Twilio using Groovy Grails
Twilio using Groovy GrailsTwilio using Groovy Grails
Twilio using Groovy Grails
 
Twilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Taking Your SMS App GlobalTwilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Taking Your SMS App Global
 

Similar to 7 Principles of API Design - Waza

How to Implement Conversational IVR
How to Implement Conversational  IVRHow to Implement Conversational  IVR
How to Implement Conversational IVRkore.ai
 
Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012Michael Peacock
 
Twilio - Social App Workshop - 2010-07-24
Twilio - Social App Workshop - 2010-07-24Twilio - Social App Workshop - 2010-07-24
Twilio - Social App Workshop - 2010-07-24Twilio Inc
 
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016Codemotion
 
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016Cisco DevNet
 
How to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and ChatbotsHow to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and ChatbotsCisco DevNet
 
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...eCommConf
 
Subscribed 2017: Understanding Zuora’s API Framework
Subscribed 2017: Understanding Zuora’s API FrameworkSubscribed 2017: Understanding Zuora’s API Framework
Subscribed 2017: Understanding Zuora’s API FrameworkZuora, Inc.
 
Astricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installationsAstricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installationsOlle E Johansson
 
The Real World - Plugging the Enterprise Into It (nodejs)
The Real World - Plugging  the Enterprise Into It (nodejs)The Real World - Plugging  the Enterprise Into It (nodejs)
The Real World - Plugging the Enterprise Into It (nodejs)Aman Kohli
 
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...CA API Management
 
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Moshe Kaplan
 
Contact Center fundamentals for Kids
Contact Center fundamentals for KidsContact Center fundamentals for Kids
Contact Center fundamentals for KidsJulian Frank
 
The Momentum of Collaboration and the Customer Experience
The Momentum of Collaboration and the Customer ExperienceThe Momentum of Collaboration and the Customer Experience
The Momentum of Collaboration and the Customer ExperienceAvaya Inc.
 
How serverless changes the cost paradigm
How serverless changes the cost paradigmHow serverless changes the cost paradigm
How serverless changes the cost paradigmYan Cui
 
SignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ CodetockSignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ CodetockSam Basu
 
Getting Started with Twilio
Getting Started with TwilioGetting Started with Twilio
Getting Started with TwilioMichael Kimsal
 
BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.Sumutiu Marius
 

Similar to 7 Principles of API Design - Waza (20)

How to Implement Conversational IVR
How to Implement Conversational  IVRHow to Implement Conversational  IVR
How to Implement Conversational IVR
 
Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012Real time voice call integration - Confoo 2012
Real time voice call integration - Confoo 2012
 
Twilio - Social App Workshop - 2010-07-24
Twilio - Social App Workshop - 2010-07-24Twilio - Social App Workshop - 2010-07-24
Twilio - Social App Workshop - 2010-07-24
 
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016
IoT to Human interactions - Stève Sfartz - Codemotion Milan 2016
 
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
DevNet @TAG - Spark & Tropo APIs - Milan/Rome May 2016
 
How to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and ChatbotsHow to Build Advanced Voice Assistants and Chatbots
How to Build Advanced Voice Assistants and Chatbots
 
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...
Chris Matthieu's Presentation at Emerging Communication Conference & Awards 2...
 
Subscribed 2017: Understanding Zuora’s API Framework
Subscribed 2017: Understanding Zuora’s API FrameworkSubscribed 2017: Understanding Zuora’s API Framework
Subscribed 2017: Understanding Zuora’s API Framework
 
Astricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installationsAstricon 2010: Scaling Asterisk installations
Astricon 2010: Scaling Asterisk installations
 
The Real World - Plugging the Enterprise Into It (nodejs)
The Real World - Plugging  the Enterprise Into It (nodejs)The Real World - Plugging  the Enterprise Into It (nodejs)
The Real World - Plugging the Enterprise Into It (nodejs)
 
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
Best Practices You Must Apply to Secure Your APIs - Scott Morrison, SVP & Dis...
 
Look Who's Talking
Look Who's TalkingLook Who's Talking
Look Who's Talking
 
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTCKamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
Kamailio World 2014 - Kamailio - The Platform for Interoperable WebRTC
 
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
Expert Days 2011: The VP R&D Open Seminar: Systems Performance Seminar
 
Contact Center fundamentals for Kids
Contact Center fundamentals for KidsContact Center fundamentals for Kids
Contact Center fundamentals for Kids
 
The Momentum of Collaboration and the Customer Experience
The Momentum of Collaboration and the Customer ExperienceThe Momentum of Collaboration and the Customer Experience
The Momentum of Collaboration and the Customer Experience
 
How serverless changes the cost paradigm
How serverless changes the cost paradigmHow serverless changes the cost paradigm
How serverless changes the cost paradigm
 
SignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ CodetockSignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ Codetock
 
Getting Started with Twilio
Getting Started with TwilioGetting Started with Twilio
Getting Started with Twilio
 
BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.BlackHat Hacking - Hacking VoIP.
BlackHat Hacking - Hacking VoIP.
 

More from Twilio Inc

Salesforce’s Andy Kung on the Power of CRM Integrations
 Salesforce’s Andy Kung on the Power of CRM Integrations Salesforce’s Andy Kung on the Power of CRM Integrations
Salesforce’s Andy Kung on the Power of CRM IntegrationsTwilio Inc
 
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call CenterAll Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call CenterTwilio Inc
 
Why Mobile Messaging Works?
Why Mobile Messaging Works?Why Mobile Messaging Works?
Why Mobile Messaging Works?Twilio Inc
 
Understand How Consumers Use Messaging
Understand How Consumers Use MessagingUnderstand How Consumers Use Messaging
Understand How Consumers Use MessagingTwilio Inc
 
How To Track Calls Using Twilio?
How To Track Calls Using Twilio?How To Track Calls Using Twilio?
How To Track Calls Using Twilio?Twilio Inc
 
Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Inc
 
Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Technical Blogging Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Technical Blogging Twilio Inc
 
Twilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Serverless Contact CenterTwilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Serverless Contact CenterTwilio Inc
 
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + TwilioTwilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + TwilioTwilio Inc
 
Twilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 Leading An Open Hardware RevolutionTwilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 Leading An Open Hardware RevolutionTwilio Inc
 
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 IoT Using LittleBits and Twilio SMSTwilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 IoT Using LittleBits and Twilio SMSTwilio Inc
 
Twilio Signal 2016 Chaos Patterns
Twilio Signal 2016 Chaos PatternsTwilio Signal 2016 Chaos Patterns
Twilio Signal 2016 Chaos PatternsTwilio Inc
 
Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 How to Impact Non-profits Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 How to Impact Non-profits Twilio Inc
 
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Bringing P2P to the Masses with WebRTCTwilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Bringing P2P to the Masses with WebRTCTwilio Inc
 
Twilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Listing Services and Lead GenerationTwilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Listing Services and Lead GenerationTwilio Inc
 
Twilio Signal 2016 Bots
Twilio Signal 2016 BotsTwilio Signal 2016 Bots
Twilio Signal 2016 BotsTwilio Inc
 
Twilio Signal 2016 Omni-channel Routing Bots
Twilio Signal 2016 Omni-channel Routing BotsTwilio Signal 2016 Omni-channel Routing Bots
Twilio Signal 2016 Omni-channel Routing BotsTwilio Inc
 
Twilio Signal 2016 New Documentation
Twilio Signal 2016 New DocumentationTwilio Signal 2016 New Documentation
Twilio Signal 2016 New DocumentationTwilio Inc
 
Twilio Signal 2016 How to Build Next Generation Speech Analytics
Twilio Signal 2016 How to Build Next Generation Speech AnalyticsTwilio Signal 2016 How to Build Next Generation Speech Analytics
Twilio Signal 2016 How to Build Next Generation Speech AnalyticsTwilio Inc
 
Twilio Signal 2016 Designing Multi-party Call Flows
Twilio Signal 2016 Designing Multi-party Call FlowsTwilio Signal 2016 Designing Multi-party Call Flows
Twilio Signal 2016 Designing Multi-party Call FlowsTwilio Inc
 

More from Twilio Inc (20)

Salesforce’s Andy Kung on the Power of CRM Integrations
 Salesforce’s Andy Kung on the Power of CRM Integrations Salesforce’s Andy Kung on the Power of CRM Integrations
Salesforce’s Andy Kung on the Power of CRM Integrations
 
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call CenterAll Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
 
Why Mobile Messaging Works?
Why Mobile Messaging Works?Why Mobile Messaging Works?
Why Mobile Messaging Works?
 
Understand How Consumers Use Messaging
Understand How Consumers Use MessagingUnderstand How Consumers Use Messaging
Understand How Consumers Use Messaging
 
How To Track Calls Using Twilio?
How To Track Calls Using Twilio?How To Track Calls Using Twilio?
How To Track Calls Using Twilio?
 
Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC RebornTwilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 WebRTC Reborn
 
Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Technical Blogging Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Technical Blogging
 
Twilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Serverless Contact CenterTwilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Serverless Contact Center
 
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + TwilioTwilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
 
Twilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 Leading An Open Hardware RevolutionTwilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 Leading An Open Hardware Revolution
 
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 IoT Using LittleBits and Twilio SMSTwilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
 
Twilio Signal 2016 Chaos Patterns
Twilio Signal 2016 Chaos PatternsTwilio Signal 2016 Chaos Patterns
Twilio Signal 2016 Chaos Patterns
 
Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 How to Impact Non-profits Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 How to Impact Non-profits
 
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Bringing P2P to the Masses with WebRTCTwilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
 
Twilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Listing Services and Lead GenerationTwilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Listing Services and Lead Generation
 
Twilio Signal 2016 Bots
Twilio Signal 2016 BotsTwilio Signal 2016 Bots
Twilio Signal 2016 Bots
 
Twilio Signal 2016 Omni-channel Routing Bots
Twilio Signal 2016 Omni-channel Routing BotsTwilio Signal 2016 Omni-channel Routing Bots
Twilio Signal 2016 Omni-channel Routing Bots
 
Twilio Signal 2016 New Documentation
Twilio Signal 2016 New DocumentationTwilio Signal 2016 New Documentation
Twilio Signal 2016 New Documentation
 
Twilio Signal 2016 How to Build Next Generation Speech Analytics
Twilio Signal 2016 How to Build Next Generation Speech AnalyticsTwilio Signal 2016 How to Build Next Generation Speech Analytics
Twilio Signal 2016 How to Build Next Generation Speech Analytics
 
Twilio Signal 2016 Designing Multi-party Call Flows
Twilio Signal 2016 Designing Multi-party Call FlowsTwilio Signal 2016 Designing Multi-party Call Flows
Twilio Signal 2016 Designing Multi-party Call Flows
 

Recently uploaded

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

7 Principles of API Design - Waza

  • 1. twilio CLOUD COMMUNICATIONS Designing the Best Telecommunications API Tim Milliron, Director of Engineering @timmilliron
  • 2. Who is twilio? RESTful web APIs to automate Voice & SMS communications Voice SMS Phone Numbers • Inbound • Incoming • PhoneNumber • Outbound • Outgoing Provisioning • Mobile VoIP • Short Codes • ShortCode • Browser VoIP Applications
  • 3. (415) 233-WAZA • Find & buy a number: curl -u $U:$P https://api.twilio.com/2010-04-01/Accounts/AC123/ AvailablePhoneNumbers/US/Local?Contains=415***WAZA curl -u $U:$P -d “PhoneNumber=415233WAZA” https://api.twilio.com/2010-04-01/Accounts/AC123/IncomingPhoneNumbers/ • Make an outgoing call: curl -u $U:$P -d “Url=www.example.com/outgoing.xml” -d “From=4152339292” -d “To=4158675309” https://api.twilio.com/2010-04-01/Accounts/AC123/Calls/ • Receive an incoming call: <Response> <Say>Thanks for calling the Waza Twilio number! Huzzah!</Say> <Sms>Heroku’s Waza Rocks!</Sms> </Response>
  • 5. #1 APIs are for Abstraction Example: DIDs DID  (Direct  Inward  Dial)  —  Inbound-­‐only  phone  number   assigned  to  a  group  of  phone  lines  that  allows  a   phone  system  to  route  to  a  unique  location  or  person.   A  group  of  DIDs  is  often  assigned  to  a  single  trunk   group.  DID  numbers  are  not  sent  out  as  the  ANI  when   the  caller  places  an  outbound  call. Developers don’t give a f*** about DIDs twilio’s API talks PhoneNumbers (they work for incoming & outgoing)
  • 6. #2 What’s the noun? Speak resources: GET api.twilio.com/.../Calls GET api.twilio.com/.../Calls/CA123 POST api.twilio.com/.../Calls Not RPC: GET api.twilio.com/.../GetCalls/ POST api.twilio.com/.../PlaceCall
  • 7. #3 Be RESTful Hypermedia for sub-resource traversal: <Account> <Sid>AC123</Sid> <OwnerAccountSid>AC456</OwnerAccountSid> <FriendlyName>tim@twilio.com's Account</FriendlyName> <Status>active</Status> ... <Uri> /2010-04-01/Accounts/AC123 </Uri> <SubresourceUris> <AvailablePhoneNumbers> /2010-04-01/Accounts/AC123/AvailablePhoneNumbers </AvailablePhoneNumbers> <Calls> /2010-04-01/Accounts/AC123/Calls </Calls> ... </SubresourceUris> </Account>
  • 8. #3 Be RESTful Hypermedia for list traversal: <SMSMessages page="0" numpages="16" pagesize="50" total="780" start="0" end="49" uri="/2010-04-01/Accounts/AC123/SMS/ Messages" firstpageuri="/2010-04-01/Accounts/AC123/SMS/ Messages?Page=0&PageSize=50" previouspageuri="" nextpageuri="/ 2010-04-01/Accounts/AC123/SMS/Messages?Page=1&PageSize=50" lastpageuri="/2010-04-01/Accounts/AC123/SMS/Messages? Page=15&PageSize=50"> ... </SMSMessages>
  • 9. #4 The API Giveth... ... but the API can’t (usually) taketh away It’s much easier to add something than to remove something ➡ Get it in developers’ hands, see what use cases develop. ➡ Then, aggressively add frequently-requested features
  • 10. #5 The Smallest API Possible... twilio.com/ authorize access_token= xxxyyyzzz /Calls?access_token=xxxyyyzzz /IncomingPhoneNumbers?access_token=xxxyyyzzz ...
  • 11. #5 The Smallest API Possible... twilio.com/ authorize account_sid= AC678 /Calls /IncomingPhoneNumbers ...
  • 12. #6 ...But No Smaller “As close to C as possible, but no closer” - Bjarne Stroustrup, creator of C++ Make the common case easy. This works, and it’s generic: curl api.twilio.com/.../AvailablePhoneNumbers? Contains=510******* But, this is what most developers want: curl api.twilio.com/.../AvailablePhoneNumbers? AreaCode=510
  • 13. #7 Don’t Settle • Late changes are OK • Don’t be afraid to version (with good reason) • Get feedback early, often, & throughout Discuss, spec, write, try it, rewrite discuss it some more, rewrite again
  • 14. Process Perspective Discuss Developers Developers Spec Developers Build
  • 15. twilio CLOUD COMMUNICATIONS Tim Milliron, Director of Engineering @timmilliron